Added code syntax
This commit is contained in:
parent
3dc5a02dd7
commit
e089b4e0da
@ -7,7 +7,8 @@ title = "HAASP"
|
||||
theme = "docdock"
|
||||
#themesdir = "../.."
|
||||
pygmentsCodeFences = true
|
||||
pygmentsStyle = "monokailight"
|
||||
pygmentsStyle = "monokai"
|
||||
pygmentsUseClasses=true
|
||||
|
||||
defaultContentLanguage = "en"
|
||||
defaultContentLanguageInSubdir= false
|
||||
|
||||
@ -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!")
|
||||
|
||||
```
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ To run the cli then add the ip for the core to the command `haasp_cli --ip <CORE
|
||||
|
||||
### Enable autostart
|
||||
Create file /etc/init.d/haasp and add following code (`sudo vi /etc/init.d/haasp`):
|
||||
```
|
||||
```bash
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: haasp
|
||||
@ -74,7 +74,7 @@ esac
|
||||
|
||||
exit 0
|
||||
|
||||
```
|
||||
```
|
||||
Change the `USER=pi` if you don't use pi as user.
|
||||
|
||||
Make the init file executable:
|
||||
@ -84,7 +84,7 @@ Enable autostart of the file:
|
||||
`sudo update-rc.d haasp defaults`
|
||||
|
||||
Make sure the user have privilege to run the init file as sudo without password prompt. If not then add following code to visudo:
|
||||
```
|
||||
```bash
|
||||
# User privilege specification
|
||||
%users ALL=(ALL) NOPASSWD: /etc/init.d/haasp
|
||||
```
|
||||
|
||||
@ -1 +1,2 @@
|
||||
<link rel="stylesheet" href="/css/custom.css">
|
||||
<link rel="stylesheet" href="/css/syntax.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 {
|
||||
|
||||
59
static/css/syntax.css
Normal file
59
static/css/syntax.css
Normal file
@ -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 }
|
||||
Loading…
x
Reference in New Issue
Block a user