diff options
Diffstat (limited to '')
48 files changed, 811 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..11099f6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/public +/static/processed_images diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..12b77f1 --- /dev/null +++ b/config.toml @@ -0,0 +1,16 @@ +base_url = "https://zunzuncito.oriole.systems" + +title = "zunzuncito" +description = "Wolf's humming microblog" + +compile_sass = true +generate_feed = true +smart_punctuation = true + +taxonomies = [ + { name = "tags", feed = true, paginate_by = 100 }, +] + +[extra] +author = "wolf" +avatar = "/avatars/wolf.jpg" diff --git a/content/1/index.md b/content/1/index.md new file mode 100644 index 0000000..494bbe6 --- /dev/null +++ b/content/1/index.md @@ -0,0 +1,17 @@ ++++ +title = "Launching zunzuncito" +date = 2021-06-12T13:35:46+02:00 + +[taxonomies] +tags = ["meta"] ++++ + +Hi, welcome to my bespoke microblog. + +This is where I'll talk about things that aren't fit for inclusion on [my main +site](https://oriole.systems), like smaller posts, stuff of less relevance or +depth, and anything else for which a proper post would take too much effort. + +Expect this space to be updated very frequently. If you dare, subscribe to [the +feed](/atom.xml). Per-tag feeds are also available on the respective tag +pages. diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..807ce8f --- /dev/null +++ b/content/_index.md @@ -0,0 +1,4 @@ ++++ +paginate_by = 100 +sort_by = "date" ++++ @@ -0,0 +1,45 @@ +#!/bin/sh + +set -e + +find_next_id() { + last_id=$(fd -td '\d+' content/ -x echo '{/}' | sort -nr | head -n1) + printf '%d\n' $((last_id + 1)) +} + +print_front_matter() { + cat <<-EOF + +++ + # title = "" + + [taxonomies] + tags = [] + + [extra] + mentions = [] + +++ + EOF +} + +add_date() { + sed -i "1a date = $(date -Iseconds)" "$1" +} + +cleanup() { + rm -f "$tmpfile" + exit 1 +} + +tmpfile=$(mktemp --suffix=.md) + +trap "{ rm -f $tmpfile; }" EXIT + +print_front_matter > "$tmpfile" +$EDITOR "$tmpfile" + +add_date "$tmpfile" + +dir="content/$(find_next_id)" + +mkdir "$dir/" +cp "$tmpfile" "$dir/index.md" diff --git a/sass/_responsive_fonts.sass b/sass/_responsive_fonts.sass new file mode 100644 index 0000000..12fa50f --- /dev/null +++ b/sass/_responsive_fonts.sass @@ -0,0 +1,18 @@ +@mixin font-size($size) + html + font-size: $size; + +@media (max-width: 480px) + @include font-size(12px) + +@media (min-width: 480px) + @include font-size(13px) + +@media (min-width: 786px) + @include font-size(14px) + +@media (min-width: 992px) + @include font-size(15px) + +@media (min-width: 1200px) + @include font-size(16px) diff --git a/sass/_webfonts.sass b/sass/_webfonts.sass new file mode 100644 index 0000000..546e19a --- /dev/null +++ b/sass/_webfonts.sass @@ -0,0 +1,239 @@ +$cyrillic-ext: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F +$cyrillic: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116 +$greek-ext: U+1F00-1FFF +$greek: U+0370-03FF +$latin-ext: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF +$latin: U+0000-00FF, U+0131, U+0152-0153, U+2190-21FF, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD +$vietnamese: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB + +@font-face + font-family: 'Alegreya' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Regular'), local('Alegreya-Regular'), url(fonts/alegreya-cyrillic-ext.woff2) format('woff2') + unicode-range: $cyrillic-ext + +@font-face + font-family: 'Alegreya' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Regular'), local('Alegreya-Regular'), url(fonts/alegreya-cyrillic.woff2) format('woff2') + unicode-range: $cyrillic + +@font-face + font-family: 'Alegreya' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Regular'), local('Alegreya-Regular'), url(fonts/alegreya-greek-ext.woff2) format('woff2') + unicode-range: $greek-ext + +@font-face + font-family: 'Alegreya' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Regular'), local('Alegreya-Regular'), url(fonts/alegreya-greek.woff2) format('woff2') + unicode-range: $greek + +@font-face + font-family: 'Alegreya' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Regular'), local('Alegreya-Regular'), url(fonts/alegreya-vietnamese.woff2) format('woff2') + unicode-range: $vietnamese + +@font-face + font-family: 'Alegreya' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Regular'), local('Alegreya-Regular'), url(fonts/alegreya-latin-ext.woff2) format('woff2') + unicode-range: $latin-ext + + +@font-face + font-family: 'Alegreya' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Regular'), local('Alegreya-Regular'), url(fonts/alegreya-latin.woff2) format('woff2') + unicode-range: $latin + + +@font-face + font-family: 'Alegreya Sans' + font-style: italic + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Italic'), local('AlegreyaSans-Italic'), url(fonts/alegreya-sans-italic-cyrillic-ext.woff2) format('woff2') + unicode-range: $cyrillic-ext + + +@font-face + font-family: 'Alegreya Sans' + font-style: italic + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Italic'), local('AlegreyaSans-Italic'), url(fonts/alegreya-sans-italic-cyrillic.woff2) format('woff2') + unicode-range: $cyrillic + + +@font-face + font-family: 'Alegreya Sans' + font-style: italic + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Italic'), local('AlegreyaSans-Italic'), url(fonts/alegreya-sans-italic-greek-ext.woff2) format('woff2') + unicode-range: $greek-ext + + +@font-face + font-family: 'Alegreya Sans' + font-style: italic + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Italic'), local('AlegreyaSans-Italic'), url(fonts/alegreya-sans-italic-greek.woff2) format('woff2') + unicode-range: $greek + + +@font-face + font-family: 'Alegreya Sans' + font-style: italic + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Italic'), local('AlegreyaSans-Italic'), url(fonts/alegreya-sans-italic-vietnamese.woff2) format('woff2') + unicode-range: $vietnamese + + +@font-face + font-family: 'Alegreya Sans' + font-style: italic + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Italic'), local('AlegreyaSans-Italic'), url(fonts/alegreya-sans-italic-latin-ext.woff2) format('woff2') + unicode-range: $latin-ext + + +@font-face + font-family: 'Alegreya Sans' + font-style: italic + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Italic'), local('AlegreyaSans-Italic'), url(fonts/alegreya-sans-italic-latin.woff2) format('woff2') + unicode-range: $latin + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Regular'), local('AlegreyaSans-Regular'), url(fonts/alegreya-sans-regular-cyrillic-ext.woff2) format('woff2') + unicode-range: $cyrillic-ext + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Regular'), local('AlegreyaSans-Regular'), url(fonts/alegreya-sans-regular-cyrillic.woff2) format('woff2') + unicode-range: $cyrillic + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Regular'), local('AlegreyaSans-Regular'), url(fonts/alegreya-sans-regular-greek-ext.woff2) format('woff2') + unicode-range: $greek-ext + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Regular'), local('AlegreyaSans-Regular'), url(fonts/alegreya-sans-regular-greek.woff2) format('woff2') + unicode-range: $greek + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Regular'), local('AlegreyaSans-Regular'), url(fonts/alegreya-sans-regular-vietnamese.woff2) format('woff2') + unicode-range: $vietnamese + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Regular'), local('AlegreyaSans-Regular'), url(fonts/alegreya-sans-regular-latin-ext.woff2) format('woff2') + unicode-range: $latin-ext + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 400 + font-display: swap + src: local('Alegreya Sans Regular'), local('AlegreyaSans-Regular'), url(fonts/alegreya-sans-regular-latin.woff2) format('woff2') + unicode-range: $latin + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 700 + font-display: swap + src: local('Alegreya Sans Bold'), local('AlegreyaSans-Bold'), url(fonts/alegreya-sans-bold-cyrillic-ext.woff2) format('woff2') + unicode-range: $cyrillic-ext + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 700 + font-display: swap + src: local('Alegreya Sans Bold'), local('AlegreyaSans-Bold'), url(fonts/alegreya-sans-bold-cyrillic.woff2) format('woff2') + unicode-range: $cyrillic + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 700 + font-display: swap + src: local('Alegreya Sans Bold'), local('AlegreyaSans-Bold'), url(fonts/alegreya-sans-bold-greek-ext.woff2) format('woff2') + unicode-range: $greek-ext + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 700 + font-display: swap + src: local('Alegreya Sans Bold'), local('AlegreyaSans-Bold'), url(fonts/alegreya-sans-bold-greek.woff2) format('woff2') + unicode-range: $greek + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 700 + font-display: swap + src: local('Alegreya Sans Bold'), local('AlegreyaSans-Bold'), url(fonts/alegreya-sans-bold-vietnamese.woff2) format('woff2') + unicode-range: $vietnamese + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 700 + font-display: swap + src: local('Alegreya Sans Bold'), local('AlegreyaSans-Bold'), url(fonts/alegreya-sans-bold-latin-ext.woff2) format('woff2') + unicode-range: $latin-ext + +@font-face + font-family: 'Alegreya Sans' + font-style: normal + font-weight: 700 + font-display: swap + src: local('Alegreya Sans Bold'), local('AlegreyaSans-Bold'), url(fonts/alegreya-sans-bold-latin.woff2) format('woff2') + unicode-range: $latin diff --git a/sass/style.sass b/sass/style.sass new file mode 100644 index 0000000..9393dfb --- /dev/null +++ b/sass/style.sass @@ -0,0 +1,172 @@ +@import 'responsive_fonts' +@import 'webfonts' + +// need to prefix :root with a backslash +// https://github.com/sass/libsass/issues/2511 +\:root + --font-sans: Alegreya Sans, sans + --font-serif: Alegreya, serif + --font-mono: Iosevka, Inconsolata, monospace + + --font-size-pre: 85% + + --fg-color: black + --fg-color-mute: #5a5a5a + --fg-href: #0000ee + --fg-href-visited: #551a8b + + --bg-color: white + + --border-color-light: lightgrey + --border-color-dark: darkgrey + +@media (prefers-color-scheme: dark) + \:root + --fg-color: #f0f0f0 + --fg-color-mute: #7a7a7a + --fg-href: #6464ff + --fg-href-visited: #9547dd + + --bg-color: #000000 + +a + text-decoration: none + + &, &:visited + color: var(--fg-href) + + &:hover + text-decoration: underline + +a.tag + &, &:visited + color: var(--fg-color-mute) + + &::before + content: "#" + +a.bold-hover:hover + text-decoration: none + text-shadow: 0px 0px 1px var(--fg-href) + +h2.mentions + margin-bottom: .2rem + +pre + font-family: var(--font-mono) + + margin-left: 1rem + +code + font-size: var(--font-size-pre) + +.mute + color: var(--fg-color-mute) + +.smaller + font-size: smaller + +.bigger + font-size: larger + +.warning + font-weight: bold + color: red + +ul.inline + margin: 0 + padding: 0 + list-style-type: none + display: inline-block + + > li + display: inline-block + + > li:not(:first-of-type) + padding-left: .2em + +div.footnote-definition > + p + font-size: smaller + display: inline-block + margin: 0 .2em + + sup + vertical-align: inherit + + sup::after + content: "." + +html + overflow-y: scroll + +body + font-family: var(--font-sans) + font-size: 1.3rem + + margin: 0 auto + max-width: 720px + padding: 0 1rem + + color: var(--fg-color) + background-color: var(--bg-color) + +main + display: flex + flex-direction: column + +header + margin: 1rem 0 + +header > h1 + margin: 0 + + > a, a:visited + color: inherit + +article + margin: 1rem 0 + padding-left: 78px + position: relative + +article > section.post + > :first-child + margin-top: .5rem + + > p + line-height: 1.3 + + a + text-decoration: underline + + a:visited + color: var(--fg-href-visited) + + img + border-radius: 8px + max-width: 100% + +article > header + margin: 0 + +article > header > img.avatar + position: absolute + left: 0 + width: 64px + + border-radius: 4px + border: 1px solid var(--border-color-light) + +article > header > div.banner + display: flex + justify-content: space-between + border-bottom: 1px dotted var(--border-color-dark) + +nav.pagination + display: flex + + margin: 1rem 0 + padding-top: .5rem + + > a.older + margin-left: auto diff --git a/static/avatars/wolf.jpg b/static/avatars/wolf.jpg Binary files differnew file mode 100644 index 0000000..d91ec8f --- /dev/null +++ b/static/avatars/wolf.jpg diff --git a/static/fonts/OFL.txt b/static/fonts/OFL.txt new file mode 100755 index 0000000..28afda7 --- /dev/null +++ b/static/fonts/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2011 The Alegreya Project Authors (https://github.com/huertatipografica/Alegreya) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/static/fonts/alegreya-cyrillic-ext.woff2 b/static/fonts/alegreya-cyrillic-ext.woff2 Binary files differnew file mode 100644 index 0000000..42ac8ae --- /dev/null +++ b/static/fonts/alegreya-cyrillic-ext.woff2 diff --git a/static/fonts/alegreya-cyrillic.woff2 b/static/fonts/alegreya-cyrillic.woff2 Binary files differnew file mode 100644 index 0000000..124ffff --- /dev/null +++ b/static/fonts/alegreya-cyrillic.woff2 diff --git a/static/fonts/alegreya-greek-ext.woff2 b/static/fonts/alegreya-greek-ext.woff2 Binary files differnew file mode 100644 index 0000000..d5c835d --- /dev/null +++ b/static/fonts/alegreya-greek-ext.woff2 diff --git a/static/fonts/alegreya-greek.woff2 b/static/fonts/alegreya-greek.woff2 Binary files differnew file mode 100644 index 0000000..c786e8d --- /dev/null +++ b/static/fonts/alegreya-greek.woff2 diff --git a/static/fonts/alegreya-latin-ext.woff2 b/static/fonts/alegreya-latin-ext.woff2 Binary files differnew file mode 100644 index 0000000..a9ef1b2 --- /dev/null +++ b/static/fonts/alegreya-latin-ext.woff2 diff --git a/static/fonts/alegreya-latin.woff2 b/static/fonts/alegreya-latin.woff2 Binary files differnew file mode 100644 index 0000000..c47936e --- /dev/null +++ b/static/fonts/alegreya-latin.woff2 diff --git a/static/fonts/alegreya-sans-bold-cyrillic-ext.woff2 b/static/fonts/alegreya-sans-bold-cyrillic-ext.woff2 Binary files differnew file mode 100644 index 0000000..43b5ba1 --- /dev/null +++ b/static/fonts/alegreya-sans-bold-cyrillic-ext.woff2 diff --git a/static/fonts/alegreya-sans-bold-cyrillic.woff2 b/static/fonts/alegreya-sans-bold-cyrillic.woff2 Binary files differnew file mode 100644 index 0000000..dafc6f8 --- /dev/null +++ b/static/fonts/alegreya-sans-bold-cyrillic.woff2 diff --git a/static/fonts/alegreya-sans-bold-greek-ext.woff2 b/static/fonts/alegreya-sans-bold-greek-ext.woff2 Binary files differnew file mode 100644 index 0000000..49c5654 --- /dev/null +++ b/static/fonts/alegreya-sans-bold-greek-ext.woff2 diff --git a/static/fonts/alegreya-sans-bold-greek.woff2 b/static/fonts/alegreya-sans-bold-greek.woff2 Binary files differnew file mode 100644 index 0000000..7415e7b --- /dev/null +++ b/static/fonts/alegreya-sans-bold-greek.woff2 diff --git a/static/fonts/alegreya-sans-bold-latin-ext.woff2 b/static/fonts/alegreya-sans-bold-latin-ext.woff2 Binary files differnew file mode 100644 index 0000000..1896761 --- /dev/null +++ b/static/fonts/alegreya-sans-bold-latin-ext.woff2 diff --git a/static/fonts/alegreya-sans-bold-latin.woff2 b/static/fonts/alegreya-sans-bold-latin.woff2 Binary files differnew file mode 100644 index 0000000..4ea8f12 --- /dev/null +++ b/static/fonts/alegreya-sans-bold-latin.woff2 diff --git a/static/fonts/alegreya-sans-bold-vietnamese.woff2 b/static/fonts/alegreya-sans-bold-vietnamese.woff2 Binary files differnew file mode 100644 index 0000000..83a26cb --- /dev/null +++ b/static/fonts/alegreya-sans-bold-vietnamese.woff2 diff --git a/static/fonts/alegreya-sans-italic-cyrillic-ext.woff2 b/static/fonts/alegreya-sans-italic-cyrillic-ext.woff2 Binary files differnew file mode 100644 index 0000000..4ead31c --- /dev/null +++ b/static/fonts/alegreya-sans-italic-cyrillic-ext.woff2 diff --git a/static/fonts/alegreya-sans-italic-cyrillic.woff2 b/static/fonts/alegreya-sans-italic-cyrillic.woff2 Binary files differnew file mode 100644 index 0000000..3ebce2c --- /dev/null +++ b/static/fonts/alegreya-sans-italic-cyrillic.woff2 diff --git a/static/fonts/alegreya-sans-italic-greek-ext.woff2 b/static/fonts/alegreya-sans-italic-greek-ext.woff2 Binary files differnew file mode 100644 index 0000000..4ddc332 --- /dev/null +++ b/static/fonts/alegreya-sans-italic-greek-ext.woff2 diff --git a/static/fonts/alegreya-sans-italic-greek.woff2 b/static/fonts/alegreya-sans-italic-greek.woff2 Binary files differnew file mode 100644 index 0000000..c1cebd7 --- /dev/null +++ b/static/fonts/alegreya-sans-italic-greek.woff2 diff --git a/static/fonts/alegreya-sans-italic-latin-ext.woff2 b/static/fonts/alegreya-sans-italic-latin-ext.woff2 Binary files differnew file mode 100644 index 0000000..c15ce0e --- /dev/null +++ b/static/fonts/alegreya-sans-italic-latin-ext.woff2 diff --git a/static/fonts/alegreya-sans-italic-latin.woff2 b/static/fonts/alegreya-sans-italic-latin.woff2 Binary files differnew file mode 100644 index 0000000..22c7a00 --- /dev/null +++ b/static/fonts/alegreya-sans-italic-latin.woff2 diff --git a/static/fonts/alegreya-sans-italic-vietnamese.woff2 b/static/fonts/alegreya-sans-italic-vietnamese.woff2 Binary files differnew file mode 100644 index 0000000..3b31705 --- /dev/null +++ b/static/fonts/alegreya-sans-italic-vietnamese.woff2 diff --git a/static/fonts/alegreya-sans-regular-cyrillic-ext.woff2 b/static/fonts/alegreya-sans-regular-cyrillic-ext.woff2 Binary files differnew file mode 100644 index 0000000..f81ae10 --- /dev/null +++ b/static/fonts/alegreya-sans-regular-cyrillic-ext.woff2 diff --git a/static/fonts/alegreya-sans-regular-cyrillic.woff2 b/static/fonts/alegreya-sans-regular-cyrillic.woff2 Binary files differnew file mode 100644 index 0000000..3434d6e --- /dev/null +++ b/static/fonts/alegreya-sans-regular-cyrillic.woff2 diff --git a/static/fonts/alegreya-sans-regular-greek-ext.woff2 b/static/fonts/alegreya-sans-regular-greek-ext.woff2 Binary files differnew file mode 100644 index 0000000..f85a417 --- /dev/null +++ b/static/fonts/alegreya-sans-regular-greek-ext.woff2 diff --git a/static/fonts/alegreya-sans-regular-greek.woff2 b/static/fonts/alegreya-sans-regular-greek.woff2 Binary files differnew file mode 100644 index 0000000..19ba950 --- /dev/null +++ b/static/fonts/alegreya-sans-regular-greek.woff2 diff --git a/static/fonts/alegreya-sans-regular-latin-ext.woff2 b/static/fonts/alegreya-sans-regular-latin-ext.woff2 Binary files differnew file mode 100644 index 0000000..cc81c01 --- /dev/null +++ b/static/fonts/alegreya-sans-regular-latin-ext.woff2 diff --git a/static/fonts/alegreya-sans-regular-latin.woff2 b/static/fonts/alegreya-sans-regular-latin.woff2 Binary files differnew file mode 100644 index 0000000..cef491f --- /dev/null +++ b/static/fonts/alegreya-sans-regular-latin.woff2 diff --git a/static/fonts/alegreya-sans-regular-vietnamese.woff2 b/static/fonts/alegreya-sans-regular-vietnamese.woff2 Binary files differnew file mode 100644 index 0000000..93ef977 --- /dev/null +++ b/static/fonts/alegreya-sans-regular-vietnamese.woff2 diff --git a/static/fonts/alegreya-vietnamese.woff2 b/static/fonts/alegreya-vietnamese.woff2 Binary files differnew file mode 100644 index 0000000..061d8ec --- /dev/null +++ b/static/fonts/alegreya-vietnamese.woff2 diff --git a/static/icon.svg b/static/icon.svg new file mode 100644 index 0000000..3eff1ff --- /dev/null +++ b/static/icon.svg @@ -0,0 +1,18 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 135.467 135.467"> + <defs> + <filter id="a" color-interpolation-filters="sRGB"> + <feColorMatrix type="hueRotate" values="0"/> + <feColorMatrix type="saturate" values="1"/> + <feColorMatrix values="2 -1 0 0 0 0 2 -1 0 0 -1 0 2 0 0 0 0 0 1 0" result="fbSourceGraphic"/> + <feColorMatrix result="fbSourceGraphicAlpha" in="fbSourceGraphic" values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"/> + <feColorMatrix in="fbSourceGraphic" type="hueRotate" values="262" result="colormatrix1"/> + <feColorMatrix values="0.5 0 0.5 0 0 0 1 0 0 0 0.5 0 0.5 0 0 0 0 0 1 0" result="colormatrix2"/> + <feColorMatrix type="hueRotate" values="105" result="colormatrix3"/> + <feBlend in2="colormatrix3" result="blend1"/> + <feColorMatrix values="2.5 -0.75 -0.75 0 0 -0.75 2.5 -0.75 0 0 -0.75 -0.75 2.5 0 0 0 0 0 1 0" result="colormatrix4"/> + <feComposite in2="blend1" in="colormatrix4" operator="arithmetic" k2=".116" result="composite1"/> + <feBlend in2="blend1" mode="lighten" result="blend2"/> + </filter> + </defs> + <path d="M736.414 215.848c-24.039 2.064-46.704 11.404-68.827 20.443-49.768 21.418-98.014 46.39-144.515 74.18-36.954 22.243-72.632 46.677-110.645 67.114-6.28 3.851-13.54.348-18.568-3.897-20.432-16.13-37.98-35.811-51.494-58.08-14.297-21.962-26.805-46.975-49.833-61.206-18.877-12.094-43.655-13.499-64.045-4.413-25.312 10.141-47.864 25.812-72.266 37.755-11.827 3.377-24.506 2.437-36.733 3.276-25.6 1.116-51.424.5-76.795 4.54-3.209 1.106-7.847.75-9.953 3.76-.35 3.974 5.142 2.888 7.608 3.548 26.877 2.179 53.98.506 80.785 3.176 20.743 2.953 39.608 13.771 54.516 28.228 14.676 13.55 29.274 27.275 45.825 38.563 15.7 11.134 31.444 22.909 42.052 39.279 24.703 36.646 43.566 76.917 68.754 113.25 18.931 25.958 45.141 45.412 71.481 63.274 30.617 19.894 63.163 37.991 98.86 46.825 24.868 6.527 49.395 15.553 70.252 30.913 22.362 15.267 41.924 34.056 62.21 51.862 3.85 2.673 8.058 7.733 13.245 6.313 3.967-1.542 5.56-6.195 3.68-9.92-6.91-15.559-17.69-29.017-26.632-43.417-20.225-29.747-36.602-61.804-53.605-93.43-13.38-24.488-29.608-47.521-40.943-73.053-3.85-8.273-4.042-17.904.093-26.06 7.37-16.932 22.606-28.446 35.533-41.003 43.85-40.144 91.498-76.11 133.383-118.406 20.98-21.775 38.767-46.587 53.293-73.073 4.122-7.732 5.912-18.421-.83-25.292-3.805-4.62-10.318-5.254-15.886-5.049z" transform="matrix(.17786 0 0 .17786 -2.544 -15.4)" fill="#92a0f5" stroke="#3bcbff" stroke-width="2.16" filter="url(#a)"/> +</svg> diff --git a/templates/atom.xml b/templates/atom.xml new file mode 100644 index 0000000..ab0012c --- /dev/null +++ b/templates/atom.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}"> + <title>{{ config.title }} + {%- if term %} - {{ term.name }} + {%- elif section.title %} - {{ section.title }} + {%- endif -%} + </title> + {%- if config.description %} + <subtitle>{{ config.description }}</subtitle> + {%- endif %} + <link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/> + <link href=" + {%- if section -%} + {{ section.permalink | escape_xml | safe }} + {%- else -%} + {{ config.base_url | escape_xml | safe }} + {%- endif -%} + "/> + <generator uri="https://www.getzola.org/">Zola</generator> + <updated>{{ last_updated | date(format="%+") }}</updated> + <id>{{ feed_url | safe }}</id> + {%- for page in pages %} + <entry xml:lang="{{ page.lang }}"> + <author><name>{{ config.extra.author }}</name></author> + <title>{{ page.title | default(value="Post № " ~ page.slug)}}</title> + <published>{{ page.date | date(format="%+") }}</published> + <updated>{{ page.updated | default(value=page.date) | date(format="%+") }}</updated> + <link href="{{ page.permalink | safe }}" type="text/html"/> + <id>{{ page.permalink | safe }}</id> + <content type="html">{{ page.content }}</content> + </entry> + {%- endfor %} +</feed> diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..edce080 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,27 @@ +{% import "macros.html" as macros -%} +<!DOCTYPE html> +<html lang="en"> + <head> + <title>{{ config.title ~ " · " }}{% block title %}{{ config.description }}{% endblock %}</title> + <link rel="stylesheet" href="/style.css"/> + <link rel="icon" href="/icon.svg"/> + <link rel="alternate" type="application/atom+xml" title="zunzuncito" href="/atom.xml" /> + {%- block additional_feeds %}{% endblock %} + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1"/> + </head> + <body> + <main> + <header> + <h1><a href="/">{{ config.title }}</a></h1> + <div class="banner smaller"> + {{ config.description }} · + {%- block description %} + <a href="/atom.xml">feed</a> · <a href="/tags">tags</a> + {%- endblock %} + </div> + </header> + {%- block content %}{% endblock -%} + </main> + </body> +</html> diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..87220f7 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{%- block content %} +{%- for post in paginator.pages %} + {{ macros::render_post(post=post) }} +{%- endfor -%} +{{ macros::render_pagination(paginator=paginator) }} +{%- endblock content %} diff --git a/templates/macros.html b/templates/macros.html new file mode 100644 index 0000000..9f0f792 --- /dev/null +++ b/templates/macros.html @@ -0,0 +1,43 @@ +{% macro render_post(post, mention=false, in_feed=true) -%} +{% if mention -%} +<article class="mention"> +{% else -%} +<article> +{% endif -%} + <header> + <img class="avatar" alt="{{ config.extra.author }}" src="{{ config.extra.avatar }}" /> + <div class="banner smaller"> + <span class="info"> + <a class="bold-hover" title="permalink to this post" href="{{ post.permalink }}">{% if mention %}№ {{ post.slug }} {% else %}§{% endif %}</a> + <time class="mute" datetime="{{ post.date }}" title="{{ post.date }}">{{ post.date | date(format="%F %R") }}</time> + {%- if post.draft %}<span class="warning">DRAFT</span>{% endif %} + </span> + {%- if "tags" in post.taxonomies %} + <nav class="tags"> + <ul class="inline">{{ self::render_tags(tags=post.taxonomies.tags) }}</ul> + </nav> + {%- endif %} + </div> + </header> + <section class="post">{{ post.content | safe }}</section> +</article> +{% endmacro render_post -%} + +{%- macro render_pagination(paginator) %} +{%- if paginator.number_pagers > 1 %} +<nav class="pagination"> + {%- if paginator.previous %} + <a class="newer" href="{{ paginator.previous }}">‹ newer</a> + {%- endif %} + {%- if paginator.next %} + <a class="older" href="{{ paginator.next }}">older ›</a> + {%- endif %} +</nav> +{%- endif %} +{%- endmacro render_pagination -%} + +{%- macro render_tags(tags) %} +{%- for tag in tags %} + <li><a class="tag" href="{{ get_taxonomy_url(kind="tags", name=tag) }}">{{ tag }}</a></li> +{%- endfor %} +{%- endmacro render_tags %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..8703c7c --- /dev/null +++ b/templates/page.html @@ -0,0 +1,27 @@ +{% extends "base.html" -%} + +{%- block title -%} +{%- if page.title -%} +{{ page.title }} +{%- else -%} +post № {{ page.slug }} +{%- endif -%} +{%- endblock title -%} + +{%- block description %} +post № {{ page.slug }} +{%- if page.title -%} +· <em>{{ page.title }}</em> +{%- endif -%} +{%- endblock description %} + +{%- block content %} +{{ macros::render_post(post=page, in_feed=false) }} +{%- if "mentions" in page.extra and page.extra.mentions | length > 0 -%} +<h2 class="mentions">Mentioned posts</h2> +{%- for ref in page.extra.mentions %} +{%- set page = get_page(path=ref ~ "/index.md") -%} +{{ macros::render_post(post=page, mention=true) }} +{%- endfor %} +{%- endif %} +{%- endblock content %} diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html new file mode 100644 index 0000000..13d38d6 --- /dev/null +++ b/templates/shortcodes/img.html @@ -0,0 +1,9 @@ +{% set url = page.path ~ path | trim_start_matches(pat="/") -%} +<figure> + <a href="/{{ url }}"> + <img src="{{ resize_image(path=url, width=500, op="fit_width") }}" alt="{{ alt }}" /> + </a> + {% if caption -%} + <figcaption class="smaller">{{ caption }}</figcaption> + {% endif -%} +</figure> diff --git a/templates/shortcodes/ref.html b/templates/shortcodes/ref.html new file mode 100644 index 0000000..6708552 --- /dev/null +++ b/templates/shortcodes/ref.html @@ -0,0 +1 @@ +<a href="/{{ id }}">{{ text | default(value="№ " ~ id) }}</a> diff --git a/templates/tags/list.html b/templates/tags/list.html new file mode 100644 index 0000000..0cab254 --- /dev/null +++ b/templates/tags/list.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{%- block title -%} +all tags +{%- endblock title -%} + +{%- block description %} +all tags +{%- endblock description %} + +{% block content %} +<nav class="tags"> + <ul class="inline"> + {%- for term in terms %} + <li><a class="tag bigger" href="{{ get_taxonomy_url(kind="tags", name=term.name) }}">{{ term.name }}<sup>{{ term.pages | length }}</sup></a></li> + {%- endfor %} + </ul> +</nav> +{% endblock content %} diff --git a/templates/tags/single.html b/templates/tags/single.html new file mode 100644 index 0000000..2238061 --- /dev/null +++ b/templates/tags/single.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} + +{%- block additional_feeds %} +<link rel="alternate" type="application/atom+xml" title="zunzuncito - #{{ term.name }}" href="atom.xml" /> +{%- endblock %} + +{%- block title -%} +posts tagged with #{{ term.name }} +{%- endblock title -%} + +{%- block description %} +posts tagged with #{{ term.name }} · <a href="atom.xml">feed</a> +{%- endblock description %} + +{%- block content %} +{%- for post in paginator.pages %} + {{ macros::render_post(post=post) }} +{%- endfor %} +{{ macros::render_pagination(paginator=paginator) }} +{%- endblock content %} |