From 38b40d8c5a8915716b3aa46aac4a0a84d0113b25 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Sun, 6 Apr 2025 19:44:27 +0200 Subject: Add test site --- .../site-1/2020-10-01-single-logbook-page.md | 5 + .../logbook-page/2020-10-01-logbook-entry.md | 5 + .../2020-10-02-another-logbook-entry.md | 5 + .../site-1/mixed-page/2020-11-06-log-entry.md | 3 + test/content/site-1/mixed-page/long-lived.md | 3 + .../site-1/multi-entry-page/another-topic.md | 3 + test/content/site-1/multi-entry-page/one-topic.md | 3 + test/content/site-1/single-entry-page.md | 3 + test/generation/config.toml | 14 ++ test/generation/style.css | 204 +++++++++++++++++++++ test/generation/template.html | 28 +++ 11 files changed, 276 insertions(+) create mode 100644 test/content/site-1/2020-10-01-single-logbook-page.md create mode 100644 test/content/site-1/logbook-page/2020-10-01-logbook-entry.md create mode 100644 test/content/site-1/logbook-page/2020-10-02-another-logbook-entry.md create mode 100644 test/content/site-1/mixed-page/2020-11-06-log-entry.md create mode 100644 test/content/site-1/mixed-page/long-lived.md create mode 100644 test/content/site-1/multi-entry-page/another-topic.md create mode 100644 test/content/site-1/multi-entry-page/one-topic.md create mode 100644 test/content/site-1/single-entry-page.md create mode 100644 test/generation/config.toml create mode 100644 test/generation/style.css create mode 100644 test/generation/template.html (limited to 'test') diff --git a/test/content/site-1/2020-10-01-single-logbook-page.md b/test/content/site-1/2020-10-01-single-logbook-page.md new file mode 100644 index 0000000..2ad7935 --- /dev/null +++ b/test/content/site-1/2020-10-01-single-logbook-page.md @@ -0,0 +1,5 @@ +# 2020-10-01 + +## Log entry + +This is a single page in the root, but it starts with an ISO date so it's a log entry too. diff --git a/test/content/site-1/logbook-page/2020-10-01-logbook-entry.md b/test/content/site-1/logbook-page/2020-10-01-logbook-entry.md new file mode 100644 index 0000000..f1c65ac --- /dev/null +++ b/test/content/site-1/logbook-page/2020-10-01-logbook-entry.md @@ -0,0 +1,5 @@ +# 2020-10-01 + +## Log entry + +This is one entry in a page with multiple entries. diff --git a/test/content/site-1/logbook-page/2020-10-02-another-logbook-entry.md b/test/content/site-1/logbook-page/2020-10-02-another-logbook-entry.md new file mode 100644 index 0000000..c445c87 --- /dev/null +++ b/test/content/site-1/logbook-page/2020-10-02-another-logbook-entry.md @@ -0,0 +1,5 @@ +# 2020-10-02 + +## Bla Bla + +This is a another entry in a page with multiple entries. diff --git a/test/content/site-1/mixed-page/2020-11-06-log-entry.md b/test/content/site-1/mixed-page/2020-11-06-log-entry.md new file mode 100644 index 0000000..32e2470 --- /dev/null +++ b/test/content/site-1/mixed-page/2020-11-06-log-entry.md @@ -0,0 +1,3 @@ +# 2020-11-06 - Log Entry + +This is a log entry in the same page as a long-lived entry. diff --git a/test/content/site-1/mixed-page/long-lived.md b/test/content/site-1/mixed-page/long-lived.md new file mode 100644 index 0000000..ddeba09 --- /dev/null +++ b/test/content/site-1/mixed-page/long-lived.md @@ -0,0 +1,3 @@ +# Long-Lived Entry + +This is a long-lived entry in the same page as a log entry. diff --git a/test/content/site-1/multi-entry-page/another-topic.md b/test/content/site-1/multi-entry-page/another-topic.md new file mode 100644 index 0000000..848894e --- /dev/null +++ b/test/content/site-1/multi-entry-page/another-topic.md @@ -0,0 +1,3 @@ +# Another Topic + +This is in the same page as the other entry, but it also doesn't have a date. diff --git a/test/content/site-1/multi-entry-page/one-topic.md b/test/content/site-1/multi-entry-page/one-topic.md new file mode 100644 index 0000000..a0bff9e --- /dev/null +++ b/test/content/site-1/multi-entry-page/one-topic.md @@ -0,0 +1,3 @@ +# One Topic + +This is a long-lived, non-logbook entry about some interesting topic. diff --git a/test/content/site-1/single-entry-page.md b/test/content/site-1/single-entry-page.md new file mode 100644 index 0000000..d02573d --- /dev/null +++ b/test/content/site-1/single-entry-page.md @@ -0,0 +1,3 @@ +# Some Title + +This is a page with a single entry. There are no other entries besides this. diff --git a/test/generation/config.toml b/test/generation/config.toml new file mode 100644 index 0000000..1e83ebc --- /dev/null +++ b/test/generation/config.toml @@ -0,0 +1,14 @@ +# This is where the logbook entries are actually stored +docsRoot = "/tmp/godocs-test/content" + +# All pages are generated from this template +templateFile = "/tmp/godocs-test/generation/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-test/output" + +# This CSS file is copied to the root of the generated site +cssFile = "/tmp/godocs-test/generation/style.css" + +# This is the base URL for all generated links +baseUrl = "file:///tmp/godocs-test/output" diff --git a/test/generation/style.css b/test/generation/style.css new file mode 100644 index 0000000..5f1ca6c --- /dev/null +++ b/test/generation/style.css @@ -0,0 +1,204 @@ +/* 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%;
+    overflow-x: hidden; 
+    overflow-x: auto;
+}
+
+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/test/generation/template.html b/test/generation/template.html new file mode 100644 index 0000000..1e56d6f --- /dev/null +++ b/test/generation/template.html @@ -0,0 +1,28 @@ + + + + {{.SiteTitle}} - Docs + + + + + +
{{.SiteTitle}}
+ +
+ {{range .Content}} +
+ {{.}} +
+ {{end}} +
+ + -- cgit v1.2.3