From e089b4e0dac1caade2ddd9b8f37a83ef05c7dc04 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Sun, 28 Oct 2018 17:32:30 +0100 Subject: [PATCH] Added code syntax --- config.toml | 3 +- content/configuration/_index.md | 4 +-- content/installation/_index.md | 6 ++-- layouts/partials/custom-head.html | 1 + static/css/custom.css | 27 ++++++++++++-- static/css/syntax.css | 59 +++++++++++++++++++++++++++++++ 6 files changed, 91 insertions(+), 9 deletions(-) create mode 100644 static/css/syntax.css diff --git a/config.toml b/config.toml index 5fb023a..2d8d936 100644 --- a/config.toml +++ b/config.toml @@ -7,7 +7,8 @@ title = "HAASP" theme = "docdock" #themesdir = "../.." pygmentsCodeFences = true -pygmentsStyle = "monokailight" +pygmentsStyle = "monokai" +pygmentsUseClasses=true defaultContentLanguage = "en" defaultContentLanguageInSubdir= false diff --git a/content/configuration/_index.md b/content/configuration/_index.md index d2f3e29..9a856ff 100644 --- a/content/configuration/_index.md +++ b/content/configuration/_index.md @@ -6,8 +6,7 @@ Weight=3 The config file is located at `~/.haasp/haasp_config.py` ### Template - -``` +```python from haasp import EventObject, ConfigObject class Config(ConfigObject): @@ -41,4 +40,3 @@ class Config(ConfigObject): self.log.debug("Timer DONE!") ``` - diff --git a/content/installation/_index.md b/content/installation/_index.md index a1a3d8c..adae23c 100644 --- a/content/installation/_index.md +++ b/content/installation/_index.md @@ -35,7 +35,7 @@ To run the cli then add the ip for the core to the command `haasp_cli --ip + diff --git a/static/css/custom.css b/static/css/custom.css index d0a3a10..5d491c6 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -25,6 +25,10 @@ article > aside .menu .dd-item div a:hover, article > aside .menu .dd-item div a color: #c6c6c6; } +article > aside .menu .dd-item div a:hover { + color: #808080; +} + article > aside .menu .dd-item div i.category-icon:hover { background-color: #161616; } @@ -81,7 +85,11 @@ section strong { } article section.page a{ - color: #262626; + color: #808080; +} + +article section.page a:hover { + color: #c6c6c6; } #navigation { @@ -95,6 +103,14 @@ article section.page h1:first-of-type { font-family: "Helvetica"; } +article section.page h2 { + font-size: 1.5rem; +} + +article section.page h3 { + font-size: 1.2rem; +} + .nav i { color: #c6c6c6; } @@ -107,8 +123,15 @@ body { background-color: #262626; } +code { + border-radius: 3px; + background: #303030; + color: #c6c6c6; +} + article section.page pre { - background: #c6c6c6; + background: #303030; + color: #c6c6c6; } .nav-select { diff --git a/static/css/syntax.css b/static/css/syntax.css new file mode 100644 index 0000000..681758d --- /dev/null +++ b/static/css/syntax.css @@ -0,0 +1,59 @@ +/* Background */ .chroma { color: #f8f8f2; background-color: #272822 } +/* Error */ .chroma .err { color: #960050; background-color: #1e0010 } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } +/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } +/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } +/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } +/* Keyword */ .chroma .k { color: #66d9ef } +/* KeywordConstant */ .chroma .kc { color: #66d9ef } +/* KeywordDeclaration */ .chroma .kd { color: #66d9ef } +/* KeywordNamespace */ .chroma .kn { color: #f92672 } +/* KeywordPseudo */ .chroma .kp { color: #66d9ef } +/* KeywordReserved */ .chroma .kr { color: #66d9ef } +/* KeywordType */ .chroma .kt { color: #66d9ef } +/* NameAttribute */ .chroma .na { color: #a6e22e } +/* NameClass */ .chroma .nc { color: #a6e22e } +/* NameConstant */ .chroma .no { color: #66d9ef } +/* NameDecorator */ .chroma .nd { color: #a6e22e } +/* NameException */ .chroma .ne { color: #a6e22e } +/* NameFunction */ .chroma .nf { color: #a6e22e } +/* NameOther */ .chroma .nx { color: #a6e22e } +/* NameTag */ .chroma .nt { color: #f92672 } +/* Literal */ .chroma .l { color: #ae81ff } +/* LiteralDate */ .chroma .ld { color: #e6db74 } +/* LiteralString */ .chroma .s { color: #e6db74 } +/* LiteralStringAffix */ .chroma .sa { color: #e6db74 } +/* LiteralStringBacktick */ .chroma .sb { color: #e6db74 } +/* LiteralStringChar */ .chroma .sc { color: #e6db74 } +/* LiteralStringDelimiter */ .chroma .dl { color: #e6db74 } +/* LiteralStringDoc */ .chroma .sd { color: #e6db74 } +/* LiteralStringDouble */ .chroma .s2 { color: #e6db74 } +/* LiteralStringEscape */ .chroma .se { color: #ae81ff } +/* LiteralStringHeredoc */ .chroma .sh { color: #e6db74 } +/* LiteralStringInterpol */ .chroma .si { color: #e6db74 } +/* LiteralStringOther */ .chroma .sx { color: #e6db74 } +/* LiteralStringRegex */ .chroma .sr { color: #e6db74 } +/* LiteralStringSingle */ .chroma .s1 { color: #e6db74 } +/* LiteralStringSymbol */ .chroma .ss { color: #e6db74 } +/* LiteralNumber */ .chroma .m { color: #ae81ff } +/* LiteralNumberBin */ .chroma .mb { color: #ae81ff } +/* LiteralNumberFloat */ .chroma .mf { color: #ae81ff } +/* LiteralNumberHex */ .chroma .mh { color: #ae81ff } +/* LiteralNumberInteger */ .chroma .mi { color: #ae81ff } +/* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff } +/* LiteralNumberOct */ .chroma .mo { color: #ae81ff } +/* Operator */ .chroma .o { color: #f92672 } +/* OperatorWord */ .chroma .ow { color: #f92672 } +/* Comment */ .chroma .c { color: #75715e } +/* CommentHashbang */ .chroma .ch { color: #75715e } +/* CommentMultiline */ .chroma .cm { color: #75715e } +/* CommentSingle */ .chroma .c1 { color: #75715e } +/* CommentSpecial */ .chroma .cs { color: #75715e } +/* CommentPreproc */ .chroma .cp { color: #75715e } +/* CommentPreprocFile */ .chroma .cpf { color: #75715e } +/* GenericDeleted */ .chroma .gd { color: #f92672 } +/* GenericEmph */ .chroma .ge { font-style: italic } +/* GenericInserted */ .chroma .gi { color: #a6e22e } +/* GenericStrong */ .chroma .gs { font-weight: bold } +/* GenericSubheading */ .chroma .gu { color: #75715e }