From 70876f195f739d88151c86d4e601d662122d6dcf Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Mon, 6 Mar 2023 11:14:55 -0700 Subject: [PATCH] Initial site of temporary Solarpunk City website --- .gitignore | 114 +++++++++++++++ content/.obsidian/app.json | 11 ++ content/.obsidian/appearance.json | 4 + content/.obsidian/core-plugins.json | 15 ++ content/.obsidian/graph.json | 22 +++ content/.obsidian/hotkeys.json | 1 + content/.obsidian/workspace | 113 ++++++++++++++ content/Helios Alpha.md | 6 + content/extra/favicon.svg | 1 + content/extra/robots.txt | 2 + logo/logo.svg | 166 +++++++++++++++++++++ pelicanconf.py | 58 ++++++++ publishconf.py | 64 ++++++++ requirements.txt | 16 ++ themes/theme/templates/article.html | 49 +++++++ themes/theme/templates/base.html | 68 +++++++++ themes/theme/templates/index.html | 25 ++++ themes/theme/templates/style.css | 219 ++++++++++++++++++++++++++++ 18 files changed, 954 insertions(+) create mode 100644 .gitignore create mode 100644 content/.obsidian/app.json create mode 100644 content/.obsidian/appearance.json create mode 100644 content/.obsidian/core-plugins.json create mode 100644 content/.obsidian/graph.json create mode 100644 content/.obsidian/hotkeys.json create mode 100644 content/.obsidian/workspace create mode 100644 content/Helios Alpha.md create mode 100644 content/extra/favicon.svg create mode 100644 content/extra/robots.txt create mode 100644 logo/logo.svg create mode 100644 pelicanconf.py create mode 100644 publishconf.py create mode 100644 requirements.txt create mode 100644 themes/theme/templates/article.html create mode 100644 themes/theme/templates/base.html create mode 100644 themes/theme/templates/index.html create mode 100644 themes/theme/templates/style.css diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8936d40 --- /dev/null +++ b/.gitignore @@ -0,0 +1,114 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + +# Editor +*.swp +*.swo + +# DB +db.sqlite3 + +# Test mount +test/ + +# VS Code +.vscode/ + +output/ diff --git a/content/.obsidian/app.json b/content/.obsidian/app.json new file mode 100644 index 0000000..ab1b3a6 --- /dev/null +++ b/content/.obsidian/app.json @@ -0,0 +1,11 @@ +{ + "spellcheck": true, + "autoPairBrackets": false, + "autoPairMarkdown": false, + "vimMode": true, + "useMarkdownLinks": false, + "attachmentFolderPath": "media", + "alwaysUpdateLinks": true, + "legacyEditor": false, + "promptDelete": false +} \ No newline at end of file diff --git a/content/.obsidian/appearance.json b/content/.obsidian/appearance.json new file mode 100644 index 0000000..a4f4710 --- /dev/null +++ b/content/.obsidian/appearance.json @@ -0,0 +1,4 @@ +{ + "theme": "moonstone", + "baseFontSize": 16 +} \ No newline at end of file diff --git a/content/.obsidian/core-plugins.json b/content/.obsidian/core-plugins.json new file mode 100644 index 0000000..f849cf9 --- /dev/null +++ b/content/.obsidian/core-plugins.json @@ -0,0 +1,15 @@ +[ + "file-explorer", + "global-search", + "switcher", + "graph", + "backlink", + "page-preview", + "note-composer", + "command-palette", + "editor-status", + "markdown-importer", + "outline", + "word-count", + "file-recovery" +] \ No newline at end of file diff --git a/content/.obsidian/graph.json b/content/.obsidian/graph.json new file mode 100644 index 0000000..a0c660b --- /dev/null +++ b/content/.obsidian/graph.json @@ -0,0 +1,22 @@ +{ + "collapse-filter": true, + "search": "", + "showTags": false, + "showAttachments": false, + "hideUnresolved": false, + "showOrphans": true, + "collapse-color-groups": true, + "colorGroups": [], + "collapse-display": true, + "showArrow": false, + "textFadeMultiplier": 0, + "nodeSizeMultiplier": 1, + "lineSizeMultiplier": 3.32478632478632, + "collapse-forces": true, + "centerStrength": 0.518713248970312, + "repelStrength": 10, + "linkStrength": 1, + "linkDistance": 250, + "scale": 0.9044367002205442, + "close": true +} \ No newline at end of file diff --git a/content/.obsidian/hotkeys.json b/content/.obsidian/hotkeys.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/content/.obsidian/hotkeys.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/content/.obsidian/workspace b/content/.obsidian/workspace new file mode 100644 index 0000000..6ca2e14 --- /dev/null +++ b/content/.obsidian/workspace @@ -0,0 +1,113 @@ +{ + "main": { + "id": "69e9da393623ab60", + "type": "split", + "children": [ + { + "id": "160122bd13ae4b72", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "Helios Alpha.md", + "mode": "source", + "source": false + } + } + } + ], + "direction": "vertical" + }, + "left": { + "id": "3885f82c1ab72e1b", + "type": "split", + "children": [ + { + "id": "0e37795504669957", + "type": "tabs", + "children": [ + { + "id": "e5f5df16367f5f9a", + "type": "leaf", + "state": { + "type": "file-explorer", + "state": {} + } + }, + { + "id": "15b64333baa0fbc2", + "type": "leaf", + "state": { + "type": "search", + "state": { + "query": "", + "matchingCase": false, + "explainSearch": false, + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical" + } + } + } + ] + } + ], + "direction": "horizontal", + "width": 300 + }, + "right": { + "id": "260bba8f76f307a9", + "type": "split", + "children": [ + { + "id": "21c556d6660f839b", + "type": "tabs", + "children": [ + { + "id": "528c8f9657044ea2", + "type": "leaf", + "state": { + "type": "backlink", + "state": { + "file": "Helios Alpha.md", + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical", + "showSearch": false, + "searchQuery": "", + "backlinkCollapsed": false, + "unlinkedCollapsed": true + } + } + }, + { + "id": "79f3ff4100fe3ae6", + "type": "leaf", + "state": { + "type": "outline", + "state": { + "file": "Helios Alpha.md" + } + } + } + ], + "currentTab": 1 + } + ], + "direction": "horizontal", + "width": 300 + }, + "active": "e5f5df16367f5f9a", + "lastOpenFiles": [ + "media/dress1.jpg", + "pages/creations.md", + "pages/projects.md", + "pages/writing.md", + "Hydroponics.md", + "Backup Strategy.md", + "Acoustic Panels.md", + "About.md", + "Helios Alpha.md", + "Fake Dog.md" + ] +} \ No newline at end of file diff --git a/content/Helios Alpha.md b/content/Helios Alpha.md new file mode 100644 index 0000000..77c212a --- /dev/null +++ b/content/Helios Alpha.md @@ -0,0 +1,6 @@ +Title: Helios Alpha +Date: 2023-03-06 +Category: Designs +Summary: A one-tank Kratky hydroponics design + +Content here \ No newline at end of file diff --git a/content/extra/favicon.svg b/content/extra/favicon.svg new file mode 100644 index 0000000..3778d94 --- /dev/null +++ b/content/extra/favicon.svg @@ -0,0 +1 @@ +🏴‍☠️ diff --git a/content/extra/robots.txt b/content/extra/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/content/extra/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/logo/logo.svg b/logo/logo.svg new file mode 100644 index 0000000..45e0351 --- /dev/null +++ b/logo/logo.svg @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pelicanconf.py b/pelicanconf.py new file mode 100644 index 0000000..85292c9 --- /dev/null +++ b/pelicanconf.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- # +from __future__ import unicode_literals + +PATH = 'content' + +TIMEZONE = 'Canada/Mountain' + +DEFAULT_LANG = 'en' + +# Feed generation is usually not desired when developing +FEED_ALL_ATOM = None +CATEGORY_FEED_ATOM = None +TRANSLATION_FEED_ATOM = None +AUTHOR_FEED_ATOM = None +AUTHOR_FEED_RSS = None + +DEFAULT_PAGINATION = False + +MARKDOWN = { + 'extension_configs': { + 'markdown.extensions.codehilite': {'css_class': 'highlight'}, + 'markdown.extensions.extra': {}, + 'markdown.extensions.meta': {}, + 'markdown.extensions.toc': { + 'toc_depth': '2-3', + 'anchorlink': True, + }, + }, + 'output_format': 'html5', +} + +PLUGINS = [ + 'obsidian', + 'linkclass', +] + +STATIC_PATHS = ['media', 'extra'] + +EXTRA_PATH_METADATA = { + 'extra/favicon.svg': {'path': 'favicon.svg'}, +} + +# Uncomment following line if you want document-relative URLs when developing +#RELATIVE_URLS = True + +THEME = 'themes/theme' + +# turn off useless outputs +TAG_SAVE_AS = '' +CATEGORY_SAVE_AS = '' +AUTHOR_SAVE_AS = '' +ARCHIVES_SAVE_AS = '' +AUTHORS_SAVE_AS = '' +CATEGORIES_SAVE_AS = '' +TAGS_SAVE_AS = '' + +PROD = False diff --git a/publishconf.py b/publishconf.py new file mode 100644 index 0000000..304521f --- /dev/null +++ b/publishconf.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- # +from __future__ import unicode_literals + +PATH = 'content' + +TIMEZONE = 'Canada/Mountain' + +DEFAULT_LANG = 'en' + +# Feed generation is usually not desired when developing +FEED_ALL_ATOM = None +CATEGORY_FEED_ATOM = None +TRANSLATION_FEED_ATOM = None +AUTHOR_FEED_ATOM = None +AUTHOR_FEED_RSS = None + +DEFAULT_PAGINATION = False + +MARKDOWN = { + 'extension_configs': { + 'markdown.extensions.codehilite': {'css_class': 'highlight'}, + 'markdown.extensions.extra': {}, + 'markdown.extensions.meta': {}, + 'markdown.extensions.toc': { + 'toc_depth': '2-3', + 'anchorlink': True, + }, + }, + 'output_format': 'html5', +} + +PLUGINS = [ + 'obsidian', + 'linkclass', +] + +STATIC_PATHS = ['media', 'extra'] + +EXTRA_PATH_METADATA = { + 'extra/favicon.svg': {'path': 'favicon.svg'}, +} + +# Uncomment following line if you want document-relative URLs when developing +#RELATIVE_URLS = True + +THEME = 'themes/theme' + +# turn off useless outputs +TAG_SAVE_AS = '' +CATEGORY_SAVE_AS = '' +AUTHOR_SAVE_AS = '' +ARCHIVES_SAVE_AS = '' +AUTHORS_SAVE_AS = '' +CATEGORIES_SAVE_AS = '' +TAGS_SAVE_AS = '' + +INDEX_SAVE_AS = 'index.html' +ARTICLE_URL = '{slug}/' +ARTICLE_SAVE_AS = '{slug}/index.html' +PAGE_URL = '{slug}/' +PAGE_SAVE_AS = '{slug}/index.html' + +PROD = True diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..89be57b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,16 @@ +blinker==1.4 +commonmark==0.9.1 +docutils==0.18.1 +feedgenerator==2.0.0 +Jinja2==3.1.2 +Markdown==3.3.6 +MarkupSafe==2.1.1 +pelican==4.7.2 +pelican-linkclass==2.0.2 +pelican-obsidian @ git+https://git.tannercollin.com/tanner/pelican-obsidian.git@41dd1d649127ae2833f5a4b1c3b6b6cb571117d8 +Pygments==2.12.0 +python-dateutil==2.8.2 +pytz==2022.1 +rich==12.3.0 +six==1.16.0 +Unidecode==1.3.4 diff --git a/themes/theme/templates/article.html b/themes/theme/templates/article.html new file mode 100644 index 0000000..195cace --- /dev/null +++ b/themes/theme/templates/article.html @@ -0,0 +1,49 @@ +{% extends "base.html" %} + +{% block title %}{{ article.title|striptags }} | Solarpunk City{% endblock %} + +{% block head %} +{{ super() }} + + {% if article.date %} + + {% endif %} + + {% if article.summary %} + + + {% endif %} + + {% if article.category %} + + {% endif %} + + {% for tag in article.tags %} + + {% endfor %} + +{% endblock %} + +{% block content %} +
+
+

{{ article.title }}

+
+ {{ article.summary }} +
+ +
+
+
+ +{{ article.content }} + +
+
+{% endblock %} + diff --git a/themes/theme/templates/base.html b/themes/theme/templates/base.html new file mode 100644 index 0000000..c1133a3 --- /dev/null +++ b/themes/theme/templates/base.html @@ -0,0 +1,68 @@ + + + + {% block head %} + + + + {% block title %}Solarpunk City{% endblock title %} + + {% endblock head %} + + + + + +
+ + + {% block content %} + {% endblock %} +
+ + + + + diff --git a/themes/theme/templates/index.html b/themes/theme/templates/index.html new file mode 100644 index 0000000..8cd67f7 --- /dev/null +++ b/themes/theme/templates/index.html @@ -0,0 +1,25 @@ +{% extends "base.html" %} + +{% block head %} +{{ super() }} + + +{% endblock %} + +{% block content %} +
+

Designs

+ +

+ Open source solarpunk inspiried designs that you can build yourself. +

+ + {% for article in articles_page.object_list if article.category.name == 'Designs' %} +

{{ article.title }}

+
+ {{ article.summary }} +
+ + {% endfor %} +
+{% endblock %} diff --git a/themes/theme/templates/style.css b/themes/theme/templates/style.css new file mode 100644 index 0000000..2b40d3a --- /dev/null +++ b/themes/theme/templates/style.css @@ -0,0 +1,219 @@ + html { + overflow-y: scroll; + } + + body { + text-rendering: optimizeLegibility; + font-family: serif; + } + + a { + text-decoration: none; + outline: none; + } + + a.external { + background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%23fff' stroke='%23000' d='M1.5 4.518h5.982V10.5H1.5z'/%3E%3Cpath fill='%23000' d='M5.765 1H11v5.39L9.427 7.937l-1.31-1.31L5.393 9.35l-2.69-2.688 2.81-2.808L4.2 2.544z'/%3E%3Cpath fill='%23fff' d='m9.995 2.004.022 4.885L8.2 5.07 5.32 7.95 4.09 6.723l2.882-2.88-1.85-1.852z'/%3E%3C/svg%3E%0A"); + background-position: center right; + background-repeat: no-repeat; + padding-right: 15px; + } + + .index h2 { + margin-top: 3rem; + } + + .index h3 { + font: 1.2rem/1.5 serif; + } + + .source { + font: 0.9rem/1.5 serif; + } + + pre { + font-size: 0.9rem; + line-height: 1.2; + padding: 1rem; + overflow-x: auto; + } + + :not(pre)>code { + padding: 0 2px; + font-size: 0.8rem; + } + + .container { + max-width: 42rem; + margin: 1rem auto 12rem auto; + } + + .logo { + width: 10rem; + height: auto; + } + + .container .logo a { + border-bottom: none; + } + + .footer { + font: 0.9rem/1.5 serif; + text-align: center; + } + + .toc { + float: right; + padding: 0.75rem; + padding-top: 0; + margin-left: 0.75rem; + } + + .toc ul { + padding-left: 1.2rem; + margin: 0; + } + + .toc li { + margin-top: 0.75rem; + } + + .content p.metadata { + font: 0.9rem/1.0 serif; + font-style: italic; + } + + .content div.summary p { + margin-top: -0.6rem; + margin-left: 1.5rem; + } + + .content p { + font: 1.2rem/1.5 serif; + } + + .content ul { + padding-left: 1.1rem; + } + + .content li { + font: 1.2rem/1.5 serif; + } + + .content img:not(.floated) { + width: 100%; + max-width: 36rem; + height: auto; + display: block; + margin: 0 auto; + } + + .content .floated { + float: left; + margin-right: 1rem; + } + + .content.index { + margin-top: 3rem; + } + + .toclink:not(:hover) { + border-bottom: none; + } + + @media screen and (min-width:62rem) { + .content .aside { + display: inline; + float: left; + position: relative; + width: 8rem; + margin-left: -9rem; + font-size: 0.9rem; + } + } + + + body { + background-color: #fff; + color: #000; + } + + a { + color: #000; + border-bottom: 1px solid #000; + } + + a:visited { + color: #555; + border-bottom: 1px solid #555; + } + + .return-home { + margin-bottom: 2rem; + } + + .return-home a:visited, a.toclink:visited, .toc a:visited { + color: inherit; + border-bottom: inherit; + } + + pre { + background-color: #ddd; + } + + :not(pre)>code { + background-color: #ddd; + } + + .toc { + background-color: #ddd; + } + + .content p.metadata { + color: #555; + } + + @media (prefers-color-scheme: dark) { + body { + background-color: #000; + color: #fff; + } + + a { + color: #fff; + border-bottom: 1px solid #fff; + } + + a:visited { + color: #aaa; + border-bottom: 1px solid #aaa; + } + + pre { + background-color: #222; + } + + :not(pre)>code { + background-color: #222; + } + + .toc { + background-color: #222; + } + + .content p.metadata { + color: #aaa; + } + + .content.index { + margin-top: 0; + } + + .content img { + filter: brightness(75%); + } + + .contact-icons img { + filter: invert(1); + } + }