From 282405f468f43c0a0b6fbffc57924e609c0cce36 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Sat, 25 Jan 2020 17:17:59 +0100 Subject: Initial commit, added HTML template and config file --- README.md | 2 + config.toml | 17 +++++ style.css | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ template.html | 28 ++++++++ 4 files changed, 249 insertions(+) create mode 100644 README.md create mode 100644 config.toml create mode 100644 style.css create mode 100644 template.html diff --git a/README.md b/README.md new file mode 100644 index 0000000..8c9c822 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# godocs +HTML generator for the docs site. diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..bae7ca2 --- /dev/null +++ b/config.toml @@ -0,0 +1,17 @@ +# Test golog config +# These values are intended to generate a temporary, test version of the website that is navigable with a web browser + +# This is where the logbook entries are actually stored +docsRoot = "/home/eddy/projects/logbook" + +# All pages are generated from this template +templateFile = "/home/eddy/projects/godocs/template.html" + +# This is the location where the final product is located (the directory specified here is deleted and re-created with the new files) +targetDir = "/tmp/godocs_out" + +# This CSS file is copied to the root of the generated site +cssFile = "/home/eddy/projects/godocs/style.css" + +# This is the base URL for all generated links +baseUrl = "file:///tmp/godocs_out" diff --git a/style.css b/style.css new file mode 100644 index 0000000..6a4a56b --- /dev/null +++ b/style.css @@ -0,0 +1,202 @@ +/* Tango colour scheme: http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines#Color_Palette */ +* { + --aluminium-light: #eeeeec; + --aluminium-medium: #d3d7cf; + --aluminium-dark: #babdb6; + + --slate-light: #888a85; + --slate-medium: #555753; + --slate-dark: #2e3436; + + --butter-light: #fce94f; + --butter-medium: #edd400; + --butter-dark: #c4a000; + + --chameleon-light: #8ae234; + --chameleon-medium: #73d216; + --chameleon-dark: #4e9a06; + + --orange-light: #fcaf3e; + --orange-medium: #f57900; + --orange-dark: #ce5c00; + + --chocolate-light: #e9b96e; + --chocolate-medium: #c17d11; + --chocolate-dark: #8f5902; + + --sky-blue-light: #729fcf; + --sky-blue-medium: #3465a4; + --sky-blue-dark: #204a87; + + --plum-light: #ad7fa8; + --plum-medium: #75507b; + --plum-dark: #5c3566; + + --scarlet-red-light: #ef2929; + --scarlet-red-medium: #cc0000; + --scarlet-red-dark: #a40000; +} + +body { + margin: 0; + background: black; + font-family: monospace; +} + +header { + position: fixed; + top: 0; + width: 100%; + color: var(--slate-medium); + background: black; + padding: 10px; + font-weight: bold; + font-size: 18px; +} + +main { + margin-left: 120px; + margin-top: 42px; +} + +/* Average article stuff */ +article, section { + margin-bottom: 20px; + margin-right: 10px; + padding: 6px; + background: var(--slate-dark); + border: 1px solid var(--slate-medium); + color: var(--aluminium-light); +} + +article a, section a { + color: var(--sky-blue-light); + text-decoration: none; +} + +article a:hover, section a:hover { + color: var(--sky-blue-medium); + text-decoration: none; +} + +h1 { + margin-top: 0; +} + +h1, h2, h3, h4, h5 { + color: var(--chameleon-light); +} + +p { + font-size: 14px; +} + +article li, section li { + font-size: 14px; + line-height: 1.3em; +} + +img { + display: block; + margin: 0 auto 0; + max-width: 100%; +} + +/* Inline code and program outputs */ +code, samp { + background: var(--slate-medium); + white-space: pre; +} + +/* If wrapped in
, we get block code and program outputs */
+pre > code, pre > samp {
+    display: block;
+    overflow: auto;
+    border: 1px dashed var(--slate-light);
+    padding: 10px;
+
+    background: var(--slate-medium);
+    line-height: 1.4em;
+    margin: 0 8px 0;
+}
+
+/* Navigation */
+nav {
+    width: 120px;
+    position: fixed;
+    left: 0;
+    top: 41px;
+    height: 100%;
+}
+
+nav ul {
+    list-style: none;
+    padding: 0;
+}
+
+nav a {
+    display: block;
+    padding: 2px;
+    color: var(--slate-medium);
+    text-decoration: none;
+    font-size: 16px;
+}
+
+nav a:hover {
+    display: block;
+    padding: 2px;
+    color: var(--slate-light);
+    text-decoration: none;
+}
+
+nav ul, nav ul ul {
+    margin: 0;
+}
+
+nav ul {
+    padding-left: 5px;
+}
+
+nav ul ul {
+    padding-left: 10px;
+    padding-bottom: 10px;
+}
+
+/* Mouse highlight style */
+::selection {
+    background: var(--slate-light);
+}
+
+/* Scrollbar style for 
*/ +::-webkit-scrollbar { + width: 8px; +} + +::-webkit-scrollbar-track { + background: black; +} + +::-webkit-scrollbar-thumb { + background: var(--slate-medium); +} + +::-webkit-scrollbar-thumb:hover { + background: var(--slate-light); +} + +/* Scrollbar style for */ +code::-webkit-scrollbar { + height: 8px; +} + +code::-webkit-scrollbar-track { + background: var(--slate-medium); +} + +code::-webkit-scrollbar-thumb { + background: var(--slate-light); +} + +code::-webkit-scrollbar-thumb:hover { + background: var(--slate-light); +} diff --git a/template.html b/template.html new file mode 100644 index 0000000..7dcbf5b --- /dev/null +++ b/template.html @@ -0,0 +1,28 @@ + + + + Docs + + + + + +
{{.SiteTitle}}
+ +
+ {{range .Entries}} +
+ {{.Content}} +
+ {{end}} +
+ + -- cgit v1.2.3