SELinux Security Module development
 help / color / mirror / Atom feed
From: bauen1 <j2468h@googlemail.com>
To: selinux@vger.kernel.org
Cc: j2468h@googlemail.com
Subject: [PATCH v2 3/3] secilc/docs: add custom color theme
Date: Sat, 6 Feb 2021 22:05:28 +0100	[thread overview]
Message-ID: <3cfe5057-8bfe-4058-a0f2-058ecc480ab9@gmail.com> (raw)
In-Reply-To: <a8abefda-5c2b-918d-65d9-e21b89e9a2bf@gmail.com>

Since the default pandoc themes either don't highlight everything or
don't fit the black/white color style of the html / pdf I've created my
own.

Signed-off-by: Jonathan Hettwer <j2468h@gmail.com>
---
 secilc/docs/Makefile    |  2 +-
 secilc/docs/theme.theme | 59 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 secilc/docs/theme.theme

diff --git a/secilc/docs/Makefile b/secilc/docs/Makefile
index a91bcde0..a03ebeed 100644
--- a/secilc/docs/Makefile
+++ b/secilc/docs/Makefile
@@ -28,7 +28,7 @@ FILE_LIST ?= cil_introduction.md \
 
 PANDOC_FILE_LIST = $(addprefix $(TMPDIR)/,$(FILE_LIST))
 
-PANDOC_HIGHLIGHT_STYLE="pygments"
+PANDOC_HIGHLIGHT_STYLE="theme.theme"
 
 PDF_OUT=CIL_Reference_Guide.pdf
 HTML_OUT=CIL_Reference_Guide.html
diff --git a/secilc/docs/theme.theme b/secilc/docs/theme.theme
new file mode 100644
index 00000000..5ffa9a65
--- /dev/null
+++ b/secilc/docs/theme.theme
@@ -0,0 +1,59 @@
+{
+    "text-color": null,
+    "background-color": null,
+    "line-number-color": null,
+    "line-number-background-color": null,
+    "text-styles": {
+        "String": {
+            "text-color": "#049b0a",
+            "background-color": null,
+            "bold": false,
+            "italic": false,
+            "underline": false
+        },
+        "SpecialChar": {
+            "text-color": "#049b0a",
+            "background-color": null,
+            "bold": false,
+            "italic": false,
+            "underline": false
+        },
+
+        "Function": {
+            "text-color": "#ff9358",
+            "background-color": null,
+            "bold": true,
+            "italic": false,
+            "underline": false
+        },
+
+        "Operator": {
+            "text-color": "#43a8ed",
+            "background-color": null,
+            "bold": true,
+            "italic": false,
+            "underline": false
+        },
+        "BuiltIn": {
+            "text-color": "#ff6dd3",
+            "background-color": null,
+            "bold": true,
+            "italic": false,
+            "underline": false
+        },
+        "Comment": {
+            "text-color": "#bc7a00",
+            "background-color": null,
+            "bold": false,
+            "italic": true,
+            "underline": false
+        },
+        "Keyword": {
+            "text-color": "#28648e",
+            "background-color": null,
+            "bold": true,
+            "italic": false,
+            "underline": false
+        }
+    }
+}
-- 
2.30.0


  parent reply	other threads:[~2021-02-06 21:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 17:05 [PATCH 0/2] secilc/docs: add syntax highlighting for cil examples bauen1
2021-02-04 20:17 ` James Carter
2021-02-04 21:28   ` bauen1
2021-02-04 23:19     ` James Carter
2021-02-05  9:31       ` Nicolas Iooss
2021-02-06 20:29       ` bauen1
2021-02-06 21:04         ` [PATCH v2 1/3] secilc/docs: use fenced code blocks " bauen1
2021-02-08 17:40           ` James Carter
2021-02-08 19:38             ` bauen1
2021-02-11 23:35           ` James Carter
2021-02-06 21:04         ` [PATCH v2 2/3] secilc/docs: add syntax highlighting for secil bauen1
2021-02-08 17:43           ` James Carter
2021-02-08 19:35             ` bauen1
2021-02-08 19:45               ` James Carter
2021-02-08 19:46           ` James Carter
2021-02-11 23:35           ` James Carter
2021-02-16 14:41             ` James Carter
2021-02-06 21:05         ` bauen1 [this message]
2021-02-08 17:44           ` [PATCH v2 3/3] secilc/docs: add custom color theme James Carter
2021-02-10 15:58         ` [PATCH v3 1/3] secilc/docs: use fenced code blocks for cil examples bauen1
2021-02-11 23:38           ` James Carter
2021-02-16 14:40             ` James Carter
2021-02-10 15:59         ` [PATCH v3 2/3] secilc/docs: add syntax highlighting for secil bauen1
2021-02-10 15:59         ` [PATCH v3 3/3] secilc/docs: add custom color theme bauen1
2021-02-11 23:37           ` James Carter
2021-02-16 14:41             ` James Carter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3cfe5057-8bfe-4058-a0f2-058ecc480ab9@gmail.com \
    --to=j2468h@googlemail.com \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox