commit c6fce194688cf5fc73e0117d756aaaa4a4c275e4 Author: drsatanic Date: Sat Oct 25 10:41:47 2025 +0630 first commit diff --git a/.forgejo/workflows/zola.yaml b/.forgejo/workflows/zola.yaml new file mode 100644 index 0000000..e69de29 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c75eecc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/public diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9a1261b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 The Satanic + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..42df71e --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# README + + diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..df6d919 --- /dev/null +++ b/config.toml @@ -0,0 +1,31 @@ +# The URL the site will be built for +base_url = "https://thesatanic.grebedoc.dev/" + +# Whether to automatically compile all Sass files in the sass directory +compile_sass = true + +# Whether to build a search index to be used later on by a JavaScript library +build_search_index = false + +title = "Awesome Gitnet Page" +description = "Gitnet Pages Project" +author = "The Satanic" +taxonomies = [ + { name = "categories" }, + { name = "tags" }, + { name = "authors" }, +] + +[markdown] +highlight_code = true +highlight_theme = "inspired-github" + +bottom_footnotes = true + +[extra] + +links = [ + { title = "Mail", href = "mailto:drsamael@zohomail.cn" }, + { title = "GitHub", href = "https://github.com/drsatanic" }, + { title = "Mastodon", href = "https://mstdn.plus/@drsatanic" } +] diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..d215a6f --- /dev/null +++ b/content/_index.md @@ -0,0 +1,4 @@ ++++ ++++ + +Hi! Welcome to Hook! Hook is a Zola theme. diff --git a/content/about.md b/content/about.md new file mode 100644 index 0000000..99316fa --- /dev/null +++ b/content/about.md @@ -0,0 +1,7 @@ ++++ +title = "About" + +extra.in_header = true ++++ + +Hook is a theme for [Zola](https://getzola.org), a static site generator. diff --git a/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..4cd72fc --- /dev/null +++ b/content/blog/_index.md @@ -0,0 +1,5 @@ ++++ +title = "Blog" +description = "Example blog page for Zola" +sort_by = "date" ++++ diff --git a/content/blog/hello-world.md b/content/blog/hello-world.md new file mode 100644 index 0000000..bdf5049 --- /dev/null +++ b/content/blog/hello-world.md @@ -0,0 +1,7 @@ ++++ +title = "Hello world" +date = 2021-07-29 +taxonomies.categories = ["intro"] ++++ + +Hello world! diff --git a/content/blog/markdown.md b/content/blog/markdown.md new file mode 100644 index 0000000..772d25f --- /dev/null +++ b/content/blog/markdown.md @@ -0,0 +1,66 @@ ++++ +title = "Markdown example" +description = "This page demonstrates how Markdown looks in the Hook theme for Zola" +date = 2021-07-30 +taxonomies.tags = [ + "markdown", + "syntax", +] +taxonomies.categories = [ + "intro" +] ++++ + +This post is a markdown example. + +Here is [a link](http://example.com). + +Some *italic text* and **bold text** and ~~strikethrough text~~ and `inline code`. [^1] + +```rust +// Here is a code block + +fn main() { + println!("Hello world!"); +} +``` + +Unordered list: [^2] +- An unordered, +- bulleted list +- of items + +Ordered list: +1. An ordered, +2. numbered list +3. of items + +> A quote. +> +> It contains multiple paragraphs. + +# Heading 1 + +## Heading 2 + +### Heading 3 + +#### Heading 4 + +##### Heading 5 + +###### Heading 6 + +![An example image](https://plchldr.co/i/480x360?bg=EB6361) + +![A large image](https://plchldr.co/i/1280x720?bg=3D8EB9) + +| Hello world! | This is a table. | Tables are also supported. | +|--------------|------------------|----------------------------| +| They even | have alternating | row colors! | +| Let me add | another row so | it's easier to see. | + +[^1]: A footnote. Footnotes can be used for things that could have explanation or extra context, but +for which the explanation is not relevant or otherwise desirable to have inline. + +[^2]: Another footnote. diff --git a/sass/_theme.scss b/sass/_theme.scss new file mode 100644 index 0000000..74eff09 --- /dev/null +++ b/sass/_theme.scss @@ -0,0 +1,173 @@ +@mixin light-theme { + --foreground: #222222; + --background: #eeeeee; + --secondary: #808080; + --tertiary: #dddddd; + --accent: #3d3cba; + --accent-highlight: #171746; + --table-border: #d0d0d0; + --table-row: #f7f7f7; +} + +@mixin dark-theme { + --foreground: #eeeeee; + --background: #161616; + --secondary: #999999; + --tertiary: #444444; + --accent: #959bf0; + --accent-highlight: #c2c5f6; + --table-border: var(--tertiary); + --table-row: #1e1e1e; +} + +:root { + --code-secondary: #999999; + --code-tertiary: #99999944; +} + +:root.light-mode { + @include light-theme; + + #dark-mode-on { + display: inline; + } + + #dark-mode-off { + display: none; + } +} + +:root.dark-mode { + @include dark-theme; + + #dark-mode-on { + display: none; + } + + #dark-mode-off { + display: inline; + } +} + +.dark-mode-buttons { + position: absolute; + + top: 1em; + right: 1em; +} + +.dark-mode-button { + border: none; + background-color: transparent; + + &:hover { + cursor: pointer; + } +} + +@media (prefers-color-scheme: light) { + :root { + @include light-theme; + + #dark-mode-on { + display: inline; + } + + #dark-mode-off { + display: none; + } + } +} + +@media (prefers-color-scheme: dark) { + :root { + @include dark-theme; + + #dark-mode-on { + display: none; + } + + #dark-mode-off { + display: inline; + } + } +} + +body { + color: var(--foreground); + background-color: var(--background); +} + +.secondary { + color: var(--secondary); +} + +a, a:link, a:visited { + color: var(--accent); +} + +a:hover { + color: var(--accent-highlight); +} + +blockquote { + border-left: 2px solid var(--secondary); +} + +code { + background-color: var(--tertiary); +} + +pre { + code { + background-color: transparent; + } + + mark { + color: inherit; + } + + table tr:nth-child(even) { + background-color: transparent; + } + + table td:first-child { + color: var(--code-tertiary); + } + + &[data-name]::before { + background-color: var(--code-tertiary); + color: var(--code-secondary); + } +} + +.footnote-definition sup { + color: var(--secondary); +} + +.footnotes { + border-top: 1px solid var(--table-border); +} + +.footnotes-list li { + color: var(--secondary); + + p { + color: var(--foreground); + } +} + +hr { + border: none; + border-bottom: 1px solid var(--table-border); +} + +table { + th, td { + border-color: var(--table-border); + } + + thead, tr:nth-child(even) { + background-color: var(--table-row); + } +} diff --git a/sass/style.scss b/sass/style.scss new file mode 100644 index 0000000..1114e56 --- /dev/null +++ b/sass/style.scss @@ -0,0 +1,146 @@ +@import "theme"; + +html, body { + margin: 0; + padding: 0; +} + +body { + font-family: Arial, Helvetica, sans-serif; + font-size: 14pt; + + line-height: 1.5em; + + padding: 5em 25%; +} + +.header-links { + a { + margin-right: 0.5em; + } + + a:last-of-type { + margin-right: 0; + } +} + +.space { + margin-bottom: 2em; +} + +.small { + font-size: 75%; +} + +h1, h2, h3, h4, h5, h6 { + line-height: 1.25; +} + +img { + max-width: 100%; +} + +blockquote { + margin-left: 0; + padding-left: 1em; +} + +code { + padding: 0.1em 0.2em; + font-size: 75%; +} + +pre { + overflow: auto; + padding: 0.3em; + line-height: 1.2em; + + code { + padding: 0; + min-width: 100%; + display: inline-block; + } + + mark { + display: block; + width: 100%; + } + + table { + width: 100%; + } + + table tr, table td { + padding: 0; + border: none; + } + + table td:first-child { + text-align: center; + vertical-align: middle; + border: none; + user-select: none; + } + + &[data-linenos] { + padding-inline: 0; + } + + &[data-name] { + padding-top: 1.8em; + position: relative; + } + + &[data-name]::before { + position: absolute; + top: 0; + left: 0; + + padding-inline: 0.3em; + + content: attr(data-name); + + font-size: 75%; + font-family: Arial, Helvetica, sans-serif; + } +} + +.footnote-definition { + margin-top: 1em; + + font-size: 75%; + + p { + display: inline; + } +} + +.footnotes { + margin-top: 4em; +} + +.footnotes-list { + font-size: 75%; +} + +table { + border-collapse: collapse; + + th, td { + border-width: 1px; + border-style: solid; + padding: 0.2em; + } +} + +@media all and (max-width: 1200px) { + body { + padding: 3em 15%; + } +} + +@media all and (max-width: 800px) { + body { + padding: 1em 1em; + } +} diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..8cb1eb7 Binary files /dev/null and b/screenshot.png differ diff --git a/static/dark_mode.svg b/static/dark_mode.svg new file mode 100644 index 0000000..49e0f57 --- /dev/null +++ b/static/dark_mode.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/light_mode.svg b/static/light_mode.svg new file mode 100644 index 0000000..9cf732f --- /dev/null +++ b/static/light_mode.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..01fdc32 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,10 @@ +{% extends "page.html" %} + +{% block title %}{{ config.title }} | Page Not Found{% endblock title %} + +{% block content %} +
+

Page Not Found (404)

+

The page you were looking for could not be found.

+
+{% endblock content %} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..6c25722 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,109 @@ + + + + + + + {% block title %}{{ config.title }}{% endblock title %} + {% block extra_head %} + + {% endblock extra_head %} + {% block feed_link %} + {% if config.generate_feeds %} + {% if config.feed_filenames %} + {% for feed in config.feed_filenames %} + {% if feed == "atom.xml" %} + + {% elif feed == "rss.xml" %} + + {% else %} + + {% endif %} + {% endfor %} + {% else %} + + {% endif %} + {% endif %} + {% endblock %} + + + {% block header %} +
+

{{ config.title }}

+ {% set linked_pages = section.pages | filter(attribute="extra.in_header") %} + {% if config.extra.links or linked_pages %} + + {% endif %} +
+ {% endblock header %} + {% block content %} + {% set blog = get_section(path="blog/_index.md") %} + {% if section.content or blog.pages %} +
+ {% if section.content %} +
+ {{ section.content | safe }} +
+ {% endif %} + {% if blog.pages %} +

Recent posts

+ +

Archive

+ {% endif %} +
+ {% endif %} + {% endblock content %} +
+ + +
+ + + + diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..3760fed --- /dev/null +++ b/templates/page.html @@ -0,0 +1,39 @@ +{% extends "index.html" %} + +{% block title %}{{ config.title }} | {{ page.title }}{% endblock title %} +{% block description %}{{ page.description | default(value=config.description) }}{% endblock description %} + +{% block header %} +
+ ← Home +
+{% endblock header %} + +{% block content %} +
+

{{ page.title }}

+ {% if page.date or page.taxonomies %} +

+ {% if page.date %}{{ page.date | date(format="%-d %B, %Y") }}{% endif %} + + {% set_global sorted_taxonomies = [] %} + {% for taxonomy_name, _ in page.taxonomies %} + {% set_global sorted_taxonomies = sorted_taxonomies | concat(with=taxonomy_name) %} + {% endfor %} + {% set_global sorted_taxonomies = sorted_taxonomies | sort %} + + {% for taxonomy_name in sorted_taxonomies %} + {% set terms = page.taxonomies[taxonomy_name] %} + {% if not terms %}{% continue %}{% endif %} + - {{ taxonomy_name | capitalize }}: + {% for term_name in terms %} + {% set term = get_taxonomy_term(kind=taxonomy_name, term=term_name) %} + {{ term.name }}{% if not loop.last %},{% endif %} + {% endfor %} + {% endfor %} +

+ {% endif %} +
+ {{ page.content | safe }} +
+{% endblock content %} diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..d19ab96 --- /dev/null +++ b/templates/section.html @@ -0,0 +1,21 @@ +{% extends "page.html" %} + +{% block title %}{{ config.title }} | {{ section.title }}{% endblock title %} + +{% block content %} +
+

{{ section.title }}

+ {% if section.pages %} + {% for year, posts in section.pages | group_by(attribute="year") %} +

{{ year }}

+ + {% endfor %} + {% else %} +

No posts yet.

+ {% endif %} +
+{% endblock content %} diff --git a/templates/taxonomy_list.html b/templates/taxonomy_list.html new file mode 100644 index 0000000..1b3b216 --- /dev/null +++ b/templates/taxonomy_list.html @@ -0,0 +1,20 @@ +{% extends "page.html" %} + +{% block title %}{{ config.title }} | {{ taxonomy.name | capitalize }}{% endblock title %} + +{% block content %} +
+

{{ taxonomy.name | capitalize }}

+
+
    + {% for term in terms %} +
  • + {{ term.name }} + {% set count = term.pages | length %} + ({{ count }} page{{ count | pluralize }}) +
  • + {% endfor %} +
+
+
+{% endblock content %} diff --git a/templates/taxonomy_single.html b/templates/taxonomy_single.html new file mode 100644 index 0000000..f6ce7fd --- /dev/null +++ b/templates/taxonomy_single.html @@ -0,0 +1,18 @@ +{% extends "page.html" %} + +{% block title %}{{ config.title }} | {{ term.name }}{% endblock title %} + +{% block content %} +
+

{{ taxonomy.name | capitalize }} - {{ term.name }}

+ +

All {{ taxonomy.name }}

+
+{% endblock content %}