commit c3fd40c1359345cc2063ae70c5c5140198086529 Author: finga Date: Mon Feb 6 12:20:18 2023 +0100 Create a theme out of my page diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..29d4d9a --- /dev/null +++ b/config.toml @@ -0,0 +1,11 @@ +base_url = "https://blog.onders.org" +title = "blog.onders.org" +description = "My humble blog." +default_language = "en" +compile_sass = true +minify_html = true +generate_feed = true +feed_filename = "rss.xml" + +[markdown] +external_links_target_blank = true diff --git a/content/2023-something/_index.md b/content/2023-something/_index.md new file mode 100644 index 0000000..1ba23fe --- /dev/null +++ b/content/2023-something/_index.md @@ -0,0 +1,6 @@ ++++ +title = "Title of some section" +sort_by = "date" ++++ + +Content of some section. diff --git a/content/2023-something/day0/index.md b/content/2023-something/day0/index.md new file mode 100644 index 0000000..ef904b5 --- /dev/null +++ b/content/2023-something/day0/index.md @@ -0,0 +1,10 @@ ++++ +title = "Day 0" +date = 2023-02-06 ++++ + +{{ modal(path="pic.jpg") }} + +Some content... + +{{ gallery(images=["pic.jpg", "pic.jpg", "pic.jpg"]) }} diff --git a/content/2023-something/day0/pic.jpg b/content/2023-something/day0/pic.jpg new file mode 100644 index 0000000..61ac3b8 Binary files /dev/null and b/content/2023-something/day0/pic.jpg differ diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..ab480c0 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,4 @@ ++++ ++++ + +The landing page... diff --git a/content/credits.md b/content/credits.md new file mode 100644 index 0000000..f070b83 --- /dev/null +++ b/content/credits.md @@ -0,0 +1,12 @@ ++++ +title = "Credits" +template = "credits.html" ++++ + +This webiste uses the +[onders.org](https://git.onders.org/finga/onders.org_zola_theme.git) +Zola theme. + +### Technology +* Websitegenerator: [zola](https://www.getzola.org/) +* CSS Framework: [bulma](https://www.bulma.io/) diff --git a/sass/style.scss b/sass/style.scss new file mode 100644 index 0000000..24347a6 --- /dev/null +++ b/sass/style.scss @@ -0,0 +1,147 @@ +@charset "utf-8"; +@import "../vendor/bulma/bulma.sass"; + +html, .navbar, .footer { + background-color: $light; +} + +.footer { + padding-bottom: 0; +} + +@media (prefers-color-scheme: dark) { + html, .navbar, .footer, p, strong, .title, li { + background-color: $dark; + color: $white; + } + + .subtitle, a:hover { + color: $light; + } + + a { + color: hsl(217, 71%, 70%); + } + + .lightbox a.delete { + color: $light; + } +} + +.lightbox { + opacity: 0; + z-index: 900; + position: fixed; + transition: opacity 0.2s linear; + height: 100%; + width: 100%; + background-color: rgba($black, 0.5); + top: 0; + left: 0; + pointer-events: none; + @supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) { + -webkit-backdrop-filter: blur(5px); + backdrop-filter: blur(5px); + } +} + +.lightbox span.spacer { + display: inline-block; + height: 100%; + vertical-align: middle; +} + +.lightbox img { + display: inline-block; + box-shadow: 0 0 20px $black; + max-width: 90%; + max-height: 90%; + width: auto; + vertical-align: middle; + @include touch { + margin-top: 35px; + max-height: 80%; + } +} + +.lightbox a { + font-size: $size-1; + color: $light; + z-index: 900; + @include touch { + height: 100%; + width: 50%; + font-size: $size-3; + } +} + +.lightbox a.lightbox-nav-previous { + z-index: 900; + @include touch { + position: absolute; + left: 0%; + font-size: $size-3; + } +} + +.lightbox a.lightbox-nav-next { + z-index: 900; + @include touch { + position: absolute; + left: 50%; + } +} + +.lightbox a.close { + display: block; + height: 100%; + width: 100%; + z-index: 999; +} + +.lightbox a.delete { + z-index: 999; + position: fixed; + top: 1%; + right: 1%; +} + +.lightbox:target { + opacity: 1; + pointer-events: auto; +} + +.lightbox-previous { + position: absolute; + height: 100%; + width: 50%; + top: 0%; + left: 0%; +} + +.lightbox-next { + position: absolute; + height: 100%; + width: 50%; + top: 0%; + left: 50%; +} + +.gallery { + gap: $gap / 4; +} + +.thumbnail { + width: 120px; + height: 120px; + vertical-align: middle; + transition: transform .2s; +} + +.thumbnail:hover { + transform: scale(1.1); +} + +.isso-postbox .form-wrapper .textarea-wrapper .textarea { + overflow-y: auto; +} diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..6bd0988 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block content %} + +
+ home +
+
+

404

+

Diese URL führt zu nichts!

+{% endblock content %} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..232a8b3 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,24 @@ + + + + + + + {{ config.title }} + + + {% if config.generate_feed %} + + {% endif %} + {% block js %} + {% endblock js %} + + +
+
+ {% block content %} {% endblock content %} +
+ {% include "footer.html" %} +
+ + diff --git a/templates/comments.html b/templates/comments.html new file mode 100644 index 0000000..0600e3b --- /dev/null +++ b/templates/comments.html @@ -0,0 +1,5 @@ +{% block js %} + +{% endblock js %} + +
diff --git "a/templates/comments.html\n" "b/templates/comments.html\n" new file mode 100644 index 0000000..d81cc25 --- /dev/null +++ "b/templates/comments.html\n" @@ -0,0 +1,5 @@ +{% block js %} + +{% endblock js %} + +
diff --git a/templates/credits.html b/templates/credits.html new file mode 100644 index 0000000..50ab1ac --- /dev/null +++ b/templates/credits.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% block content %} +

{{ config.title }}

+

{{ page.title }}

+ +
+ home +
+
+
+
+ {{ page.content | safe }} +
+
+ +
+ home +
+
+{% endblock content %} diff --git a/templates/footer.html b/templates/footer.html new file mode 100644 index 0000000..fba31da --- /dev/null +++ b/templates/footer.html @@ -0,0 +1,10 @@ + diff --git a/templates/header.html b/templates/header.html new file mode 100644 index 0000000..e623825 --- /dev/null +++ b/templates/header.html @@ -0,0 +1,12 @@ +
+

{{ config.title }}

+ {% if section.title %} +

{{ section.title }}

+ {% endif %} + {% if page.title %} +

{{ page.title }}

+ {% endif %} + + home + +
diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..7c03502 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block content %} +

{{ config.title }}

+
+
+ {{ section.content | safe }} +
+
+
    + {% for subsection in section.subsections | reverse %} + {% set subsection = get_section(path=subsection) %} +
  • {{ subsection.title | safe }}
  • + {% endfor %} +
+
+
+{% endblock content %} diff --git a/templates/navbar.html b/templates/navbar.html new file mode 100644 index 0000000..c4d7e68 --- /dev/null +++ b/templates/navbar.html @@ -0,0 +1,19 @@ +{% set section = get_section(path=page.ancestors | last) %} + +
+ +
+
+ +
+
diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..9330515 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block content %} +{% set section = get_section(path=page.ancestors | last) %} +

{{ config.title }}

+

{{ section.title }}

+{% include "navbar.html" %} +

{{ page.title }} ({{ page.date }})

+
+
+ {{ page.content | safe }} +
+
+ {% include "comments.html" %} +
+
+{% include "navbar.html" %} +{% endblock content %} diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..b891e25 --- /dev/null +++ b/templates/section.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} + +{% block content %} +

{{ config.title }}

+

{{ section.title }}

+ +
+ home +
+
+
+
+ {{ section.content | safe }} +
+
+ +
+
+ +
+ home +
+
+{% endblock content %} diff --git a/templates/shortcodes/gallery.html b/templates/shortcodes/gallery.html new file mode 100644 index 0000000..134fb2b --- /dev/null +++ b/templates/shortcodes/gallery.html @@ -0,0 +1,67 @@ + diff --git a/templates/shortcodes/modal.html b/templates/shortcodes/modal.html new file mode 100644 index 0000000..63c9d75 --- /dev/null +++ b/templates/shortcodes/modal.html @@ -0,0 +1,19 @@ +{% if section %} +{% set full_path = section.path ~ path %} +{% endif %} +{% if page %} +{% set full_path = page.path ~ path %} +{% endif %} +{% set thumb = resize_image(path=full_path, width=400, height=400, op="fit") %} + +
+ + + + +
diff --git a/templates/shortcodes/video.html b/templates/shortcodes/video.html new file mode 100644 index 0000000..54d055a --- /dev/null +++ b/templates/shortcodes/video.html @@ -0,0 +1,4 @@ + diff --git a/templates/shortcodes/youtube.html b/templates/shortcodes/youtube.html new file mode 100644 index 0000000..f6f2bd5 --- /dev/null +++ b/templates/shortcodes/youtube.html @@ -0,0 +1 @@ +