diff mbox series

[v3,3/3] secilc/docs: add custom color theme

Message ID acce2531-a70b-0df6-e258-d152e5b03bcf@gmail.com (mailing list archive)
State Accepted
Headers show
Series None | expand

Commit Message

bauen1 Feb. 10, 2021, 3:59 p.m. UTC
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>
---

v3:
    No changes.

 secilc/docs/Makefile    |  2 +-
 secilc/docs/theme.theme | 59 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 secilc/docs/theme.theme

--
2.30.0

Comments

James Carter Feb. 11, 2021, 11:37 p.m. UTC | #1
On Wed, Feb 10, 2021 at 11:01 AM bauen1 <j2468h@googlemail.com> wrote:
>
> 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>

Acked-by: James Carter <jwcart2@gmail.com>

> ---
>
> v3:
>     No changes.
>
>  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
>
James Carter Feb. 16, 2021, 2:41 p.m. UTC | #2
On Thu, Feb 11, 2021 at 6:37 PM James Carter <jwcart2@gmail.com> wrote:
>
> On Wed, Feb 10, 2021 at 11:01 AM bauen1 <j2468h@googlemail.com> wrote:
> >
> > 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>
>
> Acked-by: James Carter <jwcart2@gmail.com>
>

Applied.
Thanks,
Jim

> > ---
> >
> > v3:
> >     No changes.
> >
> >  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
> >
diff mbox series

Patch

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
+        }
+    }
+}