diff options
author | Friedrich Beckmann <friedrich.beckmann@gmx.de> | 2025-06-14 13:48:40 +0200 |
---|---|---|
committer | Friedrich Beckmann <friedrich.beckmann@gmx.de> | 2025-06-14 13:48:40 +0200 |
commit | e4a8a804aa5353bcaa4403da291e02bd9fcd22db (patch) | |
tree | 140e3b62e66c10952392c6c1bb36104d40d4e24a |
initial version
35 files changed, 766 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..67e6ec6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +public +.hugo_build.lock +resources
\ No newline at end of file diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..bf1852b --- /dev/null +++ b/Readme.md @@ -0,0 +1,7 @@ +# SillaB Website + +This is the [hugo](https://gohugo.io) project for SillaBs Website. The sites html is rendered as static html code. View the site at + + * http://fredowski.duckdns.org + +Further hints are [here](http://fredowski.duckdns.org/help). diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..25b6752 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +date = '{{ .Date }}' +draft = true +title = '{{ replace .File.ContentBaseName "-" " " | title }}' ++++ diff --git a/assets/img/doccione1.jpg b/assets/img/doccione1.jpg Binary files differnew file mode 100755 index 0000000..e6f9efe --- /dev/null +++ b/assets/img/doccione1.jpg diff --git a/assets/img/doccione2.jpg b/assets/img/doccione2.jpg Binary files differnew file mode 100755 index 0000000..5e68e21 --- /dev/null +++ b/assets/img/doccione2.jpg diff --git a/assets/img/lecoqchristmessi.jpg b/assets/img/lecoqchristmessi.jpg Binary files differnew file mode 100644 index 0000000..e548dcd --- /dev/null +++ b/assets/img/lecoqchristmessi.jpg diff --git a/assets/img/schiffe.jpg b/assets/img/schiffe.jpg Binary files differnew file mode 100644 index 0000000..ffa316b --- /dev/null +++ b/assets/img/schiffe.jpg diff --git a/assets/img/silke.jpg b/assets/img/silke.jpg Binary files differnew file mode 100644 index 0000000..875537e --- /dev/null +++ b/assets/img/silke.jpg diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..00bdf4b --- /dev/null +++ b/content/_index.md @@ -0,0 +1,5 @@ ++++ +author = "Fritz Beckmann" ++++ + +Das ist die Startseite!!!
\ No newline at end of file diff --git a/content/about.md b/content/about.md new file mode 100644 index 0000000..2fedd59 --- /dev/null +++ b/content/about.md @@ -0,0 +1,22 @@ ++++ +title = "About Me" ++++ + + + +Ich bin die Silke. + + * [ShadesOfBlue](/posts/shadesofblue) + * [Bayern Hawaiians](/posts/hawaians) + +Kontakt: [silke.beckmann@posteo.de](mailto:silke.beckmann@posteo.de) + +Adresse: + +``` +Silke Beckmann +Bismarckstr. 11 +86159 Augsburg +``` + +[Hilfe](/help) um die Webseite zu ändern. diff --git a/content/help.md b/content/help.md new file mode 100644 index 0000000..8fcfef9 --- /dev/null +++ b/content/help.md @@ -0,0 +1,135 @@ ++++ +title = "Help" ++++ + +# SillaB Website + +This website is rendered as static html with [hugo](https://gohugo.io). The SillaB hugo project is at https://caeis.etech.fh-augsburg.de/beckmanf/sillab. The website itself is hosted at + + * http://fredowski.duckdns.org + +# Test the website + +#### Install hugo via homebrew + +You need the hugo software to render the website. The software is available via [homebrew](https://brew.sh). + +``` +brew install hugo +``` + +#### Download the git repository + +``` +cd +git clone https://caeis.etech.fh-augsburg.de/beckmanf/sillab +``` + +#### Run the hugo test server + +``` +hugo serve +``` + +and open the http://localhost:1313 at port 1313 to view the website in test mode. You can quit the server with "CTRL-c". + +# How to add or edit posts + +Change the files in the "content" directory. The basic syntax is [markdown](https://docs.github.com/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) with some special parts like the frontmatter described at [hugos syntax](https://gohugo.io/content-management/formats/). + +#### Frontmatter +Start the markdown file with a "toml" section limited by "+++" to configure some parameters. After the "toml" section the regular markdown starts. + +``` ++++ +title = 'Getting started' +publishdate = 2024-03-17 +eventdate = 2029-08-19 +summary = "Paolo, Petja, Stefan und Tom haben in Doccione Tag und Nacht an den neuen Stücken gearbeitet" +image = "/img/doccione1.jpg" +caption = "Doccione in Italien" +bands = ['ShadesOfBlue'] ++++ + +Here the markdown starts. +``` + +The parameters have the following meaning: + +| Parameter | Meaning | +| :-------- | :------ | +| `title` | The title of the page is shown in the link and as the first heading in the content | +| `publishdate` | The date when the article is published. The posts are sorted according to this date. When the date is in the future, the post will not be shown | +| `eventdate` | The date when this event will or did happen | +| `summary` | The summary is shown in the post preview list, e.g. on the homepage | +| `image` | The image is shown in the post preview as a thumbview and bigger if you look at the full post | +| `caption` | This caption is used for the image as a figure caption | +| `bands` | This should be "Hawaiians", "ShadesOfBlue" or "SnoopAndTheGang". The band is shown in the preview near the date | + +#### Add an image +In the markdown file add the following code + +``` + +``` + +The first word "schiffe" is a textual description of the image. It will normally not be visible. The part "Schiffe in Italien" will be the caption of the image. + +Copy the file "schiffe.jpg" to the [assets/img](assets/img) directory. The image file will the be resized by hugo and copied to the final "public/img" directory. + +#### Add an audio file + +To add an mpeg4 audio file use the following code in the markdown file: + + + +``` +{{</* audio + src="/audio/LandUnter.m4a" + caption="ShadesOfBlue, Land Unter" +*/>}} +``` + + +in the markdown file. Copy the audio file to "static/audio" directory. It will be copied by hugo to the final "public/audio" directory. + +#### Add a video file + +Use the following code to add a mpeg4 video file to the markdown file: + +``` +{{</* video + src="/video/flug.mov" + caption="Flugzeug" +*/>}} +``` + +Copy the video file to the "static/video" directory. + +# How to upload website to the server + +#### Build the website + +The "hugo build" command will compile the static html files and copy them together with the media data to the "public" directory. That directory then has to be copied to the webserver. + +``` +hugo build +``` + +#### Fix file permissions + +You need to make sure that all files in "public" folder are accessible for group and others. +``` +cd +cd sillab +chmod -R go+r public +``` + +#### Upload the files + +Copy the files in the folder "public" via [secure copy](https://manpages.debian.org/testing/openssh-client/scp.1.en.html) to the webserver. + +``` +scp -r public/* silke@fredowski.duckdns.org:/var/www +``` + diff --git a/content/posts/_index.md b/content/posts/_index.md new file mode 100644 index 0000000..e972948 --- /dev/null +++ b/content/posts/_index.md @@ -0,0 +1,6 @@ ++++ +aliases = ["posts", "articles", "blog", "showcase", "docs"] +title = "Posts" +description = "Halo hier" +tags = ["index"] ++++ diff --git a/content/posts/hawaiians/230313-aichach.md b/content/posts/hawaiians/230313-aichach.md new file mode 100644 index 0000000..722faf8 --- /dev/null +++ b/content/posts/hawaiians/230313-aichach.md @@ -0,0 +1,10 @@ ++++ +title = "Aichach" +summary = "Raus aus Augsburg - raus aufs Land" +image = "/img/doccione2.jpg" +date = 2023-07-13 +bands = ["Hawaiians"] ++++ + +Aichach. Ein kleiner Ort in der Nähe von Augsburg. Und wir waren da. + diff --git a/content/posts/hawaiians/_index.md b/content/posts/hawaiians/_index.md new file mode 100644 index 0000000..d0664a1 --- /dev/null +++ b/content/posts/hawaiians/_index.md @@ -0,0 +1,10 @@ ++++ +title = "Bayern Hawaiians" ++++ + + +Brotzeit und Okilihau! + +Die [Bayern Hawaiians](https://www.facebook.com/DieBayernHawaiians/) verbinden den Hawaischnaps mit dem Leberkäse. + +I
\ No newline at end of file diff --git a/content/posts/my-first-post.md b/content/posts/my-first-post.md new file mode 100644 index 0000000..cea0bfc --- /dev/null +++ b/content/posts/my-first-post.md @@ -0,0 +1,12 @@ ++++ +date = '2025-06-11' +draft = false +title = 'My First Post' +bands = ['ShadesOfBlue', 'SnoopAndTheGang'] ++++ + +## Jetzt mal was neues! + +Und das sind die Bayern Hawains. + +Das ist ein Post, der nicht direkt einer Kapelle zugeordnet ist. diff --git a/content/posts/shadesofblue/240317-gettingstarted.md b/content/posts/shadesofblue/240317-gettingstarted.md new file mode 100644 index 0000000..66c5176 --- /dev/null +++ b/content/posts/shadesofblue/240317-gettingstarted.md @@ -0,0 +1,99 @@ ++++ +title = 'Getting started' +publishdate = 2024-03-17 +summary = "Paolo, Petja, Stefan und Tom haben in Doccione Tag und Nacht an den neuen Stücken gearbeitet. Wir sind total happy, dass wir in einer Woche auch noch “Night in Tunisia“ hinbekommen haben. Es fehlt noch eine Schlagzeugerin!" +image = "/img/doccione1.jpg" +caption = "Doccione in Italien" +bands = ['ShadesOfBlue'] ++++ + + + +{{< video + src="/video/flug.mov" + caption="Flugzeug" +>}} + +{{< audio + src="/audio/LandUnter.m4a" + caption="ShadesOfBlue, Land Unter" +>}} + +{{< audio + src="/audio/ComesLove.m4a" + caption="ShadesOfBlue, Comes Love" +>}} + +### From Source +With the Rust toolchain installed, you can install Blades from [crates.io](https://crates.io/crates/blades) +```sh +cargo install blades +``` + +Or from its repository +``` sh +git clone https://github.com/grego/blades +cd blades +cargo install --path . +``` + +### macOS + +Using the package manager [MacPorts](https://www.macports.org) +```sh +sudo port install blades +``` + +## Blades Commands +Once installed, you can run the executable `blades` with the following subcommands: +<div id="commands"> + +`init` Initialise the site in the current directory, creating the basic files and folders + +`build` Build the site according to config, content, templates and themes in the current directory + +`colocate` Move the assets from the "assets" directory and from the theme, if one is used, into the output directory + +`all` Build the site and colocate the assets + +`lazy` Build the site and (colocate assets only if the theme was switched) [default] + +`new` Create a new page + +</div> + +## Themes +When you specify a theme in the [config](config.html), templates and assets from the theme are used. +Every site that doesn't use a theme can be used as a theme for another site. +To use it, simply clone it into the themes directory. +```sh +cd themes +git clone $site_repository +``` + +Then, set it as a theme in `Blades.toml`: +```toml +theme = "$site_name" +``` + +To overwrite the theme, simply use the files in the `templates`, resp. `assets` subdirectories of the +page root directory. + +## Assets +All the files from the `assets` directory (and from the theme) are moved into the directory +specified in the [config](config.html), which is emptied before. This is a subdirectory of the +output directory (defaults to `assets`). + +Blades takes of the pages it rendered before and if some of them is deleted, the corresponding +files in the output directory will be deleted, too. The other files in the output directory +are left intact. This way, you can place anything in the output directory and (as long as its name +differs from all the page names and it's not in the assets subdirectory), Blades won't touch it. + +## Meta +Blades renders [sitemap](https://www.sitemaps.org) (into `sitemap.xml`), [Atom](https://en.wikipedia.org/wiki/Atom_(Web_standard)) (into `atom.xml`) +and [RSS](https://en.wikipedia.org/wiki/RSS) (into `rss.xml`) feeds, unless explicitly disabled in the [config](config.html). + +## Contribution +If you found a bug or would like to see some feature in Blades, you are the most welcome to submit an issue +or a pull request! Likewise if you found something in this documentation not clear or imprecise. +""" diff --git a/content/posts/shadesofblue/241219-lecoq.md b/content/posts/shadesofblue/241219-lecoq.md new file mode 100644 index 0000000..9ee35e0 --- /dev/null +++ b/content/posts/shadesofblue/241219-lecoq.md @@ -0,0 +1,11 @@ ++++ +title = "Le Coq: Christmessi" +summary = "Die Weihnachtsfeierlichkeiten im Le Coq" +date = 2024-12-19 +bands = ["ShadesOfBlue"] +image = "/img/lecoqchristmessi.jpg" +caption = "Weihnachten im Le Coq" ++++ + +Die sagenhaften Feierlichkeiten im [Le Coq](https://www.instagram.com/lecoqaugsburg/) in Augsburg. + diff --git a/content/posts/shadesofblue/_index.md b/content/posts/shadesofblue/_index.md new file mode 100644 index 0000000..b939eb5 --- /dev/null +++ b/content/posts/shadesofblue/_index.md @@ -0,0 +1,34 @@ ++++ +title = "Shades of Blue" ++++ + +The italien jazz spirit with the heart in the alps. + +content using the provided templates. +Thanks to [zero-copy](https://serde.rs/lifetimes.html#borrowing-data-in-a-derived-impl) deserialisation +and the [Ramhorns](https://github.com/maciejhirsz/ramhorns) templating engine, +it renders the whole site in milliseconds, possibly more than +[20 times](https://github.com/grego/ssg-bench) faster than other generators like Hugo. + +It's made for easy setup and use. A static site generator should be a no brainer. +It uses [mustache](https://mustache.github.io/mustache.5.html) templates with extremely minimal +and obvious syntax (like 7 rules!), providing the necessary building blocks +to let you focus on your content. + +## Features +* Powerful plugin system +* Themes +* Image gallery generation +* [CommonMark](https://commonmark.org) markdown with tables and footnotes for content +* Automatic syntax highlighting using [cmark-syntax](https://github.com/grego/cmark-syntax) + (with a possibility of turning LaTeX formulas into [MathML](https://developer.mozilla.org/docs/Web/MathML)) +* Customizable taxonomies (like categories or tags) +* Pagination +* Breadcrumbs +* Asset colocation +* Table of contents with access to all of the site data +* Automatic sitemap, Atom and RSS feed generation + +## Why not _`blades`_? +Unlike other monolithic generators, Blades is modest in its scope. All it does is generating your site. +It do
\ No newline at end of file diff --git a/content/posts/snoopandthegang/250621-bismarckfest.md b/content/posts/snoopandthegang/250621-bismarckfest.md new file mode 100644 index 0000000..81f294e --- /dev/null +++ b/content/posts/snoopandthegang/250621-bismarckfest.md @@ -0,0 +1,10 @@ ++++ +title = "Bismarckstraßenfest" +summary = "Wir sind auf dem Bismarckstraßenfest" +publishdate = 2025-06-14 +eventdate = 2025-06-21 +bands = ["SnoopAndTheGang"] ++++ + +Wir sind auf dem Bismarckstraßenfest. Es geht um 14.15 Uhr los! + diff --git a/content/posts/snoopandthegang/_index.md b/content/posts/snoopandthegang/_index.md new file mode 100644 index 0000000..4aa4b46 --- /dev/null +++ b/content/posts/snoopandthegang/_index.md @@ -0,0 +1,6 @@ ++++ +title = "SnoopAndTheGang" ++++ + +Nur Lieblingslieder mit Reinhard, Sebi, Paul and [SnoopB](/about). + diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..0333872 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,31 @@ +baseURL = 'http://fredowski.duckdns.org' +defaultContentLanguage = 'de' +title = 'SillaB' +theme = 'fredo' + +[menus] + [[menus.main]] + name = 'Home' + pageRef = '/' + weight = 10 + [[menus.main]] + name = 'ShadesOfBlue' + pageRef = '/posts/shadesofblue' + weight = 20 + [[menus.main]] + name = 'Hawaiians' + pageRef = '/posts/hawaiians' + weight = 30 + [[menus.main]] + name = 'SnoopAndTheGang' + pageRef = '/posts/snoopandthegang' + weight = 30 + [[menus.main]] + name = 'About Me' + pageRef = '/about' + weight = 40 + +[markup] + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true diff --git a/static/audio/ComesLove.m4a b/static/audio/ComesLove.m4a Binary files differnew file mode 100755 index 0000000..4e672d2 --- /dev/null +++ b/static/audio/ComesLove.m4a diff --git a/static/audio/LandUnter.m4a b/static/audio/LandUnter.m4a Binary files differnew file mode 100755 index 0000000..f7b69a1 --- /dev/null +++ b/static/audio/LandUnter.m4a diff --git a/static/video/flug.mov b/static/video/flug.mov Binary files differnew file mode 100644 index 0000000..57f8495 --- /dev/null +++ b/static/video/flug.mov diff --git a/themes/fredo/assets/Iwona-Regular.otf b/themes/fredo/assets/Iwona-Regular.otf Binary files differnew file mode 100644 index 0000000..418a664 --- /dev/null +++ b/themes/fredo/assets/Iwona-Regular.otf diff --git a/themes/fredo/assets/favicon.png b/themes/fredo/assets/favicon.png Binary files differnew file mode 100644 index 0000000..c17b537 --- /dev/null +++ b/themes/fredo/assets/favicon.png diff --git a/themes/fredo/assets/style.css b/themes/fredo/assets/style.css new file mode 100644 index 0000000..2238f88 --- /dev/null +++ b/themes/fredo/assets/style.css @@ -0,0 +1,190 @@ +@font-face { + font-family: 'Iwona'; + font-style: normal; + font-weight: 300; + font-display: swap; + src: local('Iwona-Regular'), url('Iwona-Regular.otf'), format('opentype'); +} + +body { + height: 100%; + max-height: 100%; + font-family: "Iwona"; +/* letter-spacing: 0.01rem; + font-size: 1.8rem; + line-height: 1.75em; + margin: 0;*/ +} + +#logo { + float: left; +} + +#nav { + margin-left: 52px; + margin-top: 0.5rem; +} + +.navlink { + margin: 0.3rem; +} + +.navlink.active { + background-color: aquamarine; +} + + +#topbar { + display: inline-block; +} + + +/* Every post, on every page, gets this style on its <article> tag */ +.post { + /*position: relative;*/ + width: 95%; + max-width: 710px; + margin: 1rem; + margin-left:3rem; + padding-bottom: 1rem; + border-bottom: #000 2px solid; + word-wrap: break-word; + display: inline-block; +} + +.post-title a { + text-decoration: none; + font-size: 1.5rem; +} +.post-excerpt p { + font-size: 0.9em; + line-height: 1.7em; + margin-block-start: 0rem; + margin-block-end: 0rem; +} +.read-more { + text-decoration: none; +} +.post-meta { + display: block; + margin: 2rem 0 0 0; + font-size: 1.5rem; +} +.post-meta a { + text-decoration: none; +} +.post-date { + display: inline-block; + white-space: nowrap; + margin-block-start: 0rem; + margin-block-end: 0rem; +} + +.post-date p{ + margin-block-start: 0rem; + margin-block-end: 0rem; +} +.publish-meta { + position: absolute; + top: 0; + right: 0; + padding: 4.3rem 0 4rem 0; + text-align: right; +} +.publish-heading { + display: block; + font-weight: 700; +} +.publish-date { + display: block; + font-size: 1.4rem; + line-height: 1.5em; +} + +.thumb { + float: left; + width: 240px; +} + +.post-short { + margin-left: 250px; +} + +.post-header h2 { + font-size: 1.2rem; +} +.post-title { + margin-block-start: 0rem; + margin-block-end: 0rem; +} + +.post-excerpt { + margin-top: 0.5rem; + margin-block-start: 0rem; + margin-block-end: 0rem; +} + +.gallery-photo { + max-width: 100%; + object-fit: fill; +} + + +#content { + padding: 3em 4em; + position: relative; +} + +.full { + max-width: 50rem; +} +.full img { + width: 80%; +} + +.full video { + width: 80%; +} + + + +@media screen and (max-width: 600px) { +.thumb { + float: none; + width: 100%; + margin-left: 0rem; +} + +.post { + /*position: relative;*/ + width: 95%; + max-width: 710px; + margin: 1rem; + margin-left:0rem; + padding-bottom: 1rem; + border-bottom: #000 2px solid; + word-wrap: break-word; + display: inline-block; +} + +.post-short { + margin-left: 5px; +} + +#content { + padding: 0em; + position: relative; +} + +.full img { + width: 100%; +} + +.full video { + width: 100%; +} + +.small-figure { + margin: 0rem; +} +}
\ No newline at end of file diff --git a/themes/fredo/layouts/_markup/render-image.html b/themes/fredo/layouts/_markup/render-image.html new file mode 100644 index 0000000..86891e7 --- /dev/null +++ b/themes/fredo/layouts/_markup/render-image.html @@ -0,0 +1,12 @@ +{{ $myimg := resources.Get .Destination }} +{{ if $myimg }} + {{ $myimg := $myimg.Resize "1024x" }} + <figure class="small-figure"> + <picture> + <img alt="{{ .PlainText }}" src="{{ $myimg.RelPermalink }}"> + </picture> + <figcaption class="gallery-caption">{{ .Title }}</figcaption> + </figure> +{{ else }} + {{ errorf "Can not find image: %s" .Destination }} +{{ end }}
\ No newline at end of file diff --git a/themes/fredo/layouts/_partials/nav.html b/themes/fredo/layouts/_partials/nav.html new file mode 100644 index 0000000..583eefe --- /dev/null +++ b/themes/fredo/layouts/_partials/nav.html @@ -0,0 +1,20 @@ +<div id="topbar"> + <div id="logo"> + <a href="/"> + <picture> + <img src="/favicon.png"></img> + </picture> + </a> + </div> + <nav id="nav"> + {{ $currentpage := . }} + {{ range site.Menus.main }} + {{ $url := relLangURL .URL }} + {{ $navlinkclass := "navlink" }} + {{- if or ( $currentpage.IsMenuCurrent "main" .) ( $currentpage.HasMenuCurrent "main" .) }} + {{ $navlinkclass = "navlink active" }} + {{ end }} + <a class={{ $navlinkclass }} href="{{ $url }}">{{ .Name }}</a> + {{ end }} + </nav> +</div> diff --git a/themes/fredo/layouts/_partials/post-short.html b/themes/fredo/layouts/_partials/post-short.html new file mode 100644 index 0000000..808297d --- /dev/null +++ b/themes/fredo/layouts/_partials/post-short.html @@ -0,0 +1,40 @@ +<article class="post"> + <div class="thumb"> + {{ if .Param "image" }} + {{ $imagename := .Param "image" }} + {{ $myimg := resources.Get $imagename }} + {{ if $myimg }} + {{ $myimg := $myimg.Resize "512x" }} + <a class="thumbnail" href="{{ .RelPermalink }}"> + <picture> + <source type="image/jpeg" srcset="{{ $myimg.RelPermalink }}"> + <img class="gallery-photo" alt="{{ .Title }}" src="{{ $myimg.RelPermalink }}"/> + </picture> + </a> + {{ else }} + {{ errorf "Can not find image: %s" $imagename }} + {{ end }} + {{ end }} + </div> + <div class="post-short"> + <section class="post-date"> + {{ $showdate := .Date }} + {{ if .Param "eventdate" }} + {{ $showdate = .Param "eventdate" }} + {{ end }} + <p> {{ $showdate | time.Format ":date_long" }}, + {{ range .Param "bands" }} + <a href="/posts/{{ . }}">{{ . }}</a> + {{ end }} + </p> + </section> + <header class="post-header"> + <h2 class="post-title"> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + </h2> + </header> + <section class="post-excerpt"> + <p>{{ .Param "summary" }}</p> + </section> + </div> +</article> diff --git a/themes/fredo/layouts/_shortcodes/audio.html b/themes/fredo/layouts/_shortcodes/audio.html new file mode 100644 index 0000000..d44de40 --- /dev/null +++ b/themes/fredo/layouts/_shortcodes/audio.html @@ -0,0 +1,10 @@ +<table> +<tr> +<td>{{- .Get "caption" -}}:</td> +<td> +<audio controls> + <source type="audio/mp4" src="{{- .Get "src" -}}"> +</audio> +</td> +</tr> +</table> diff --git a/themes/fredo/layouts/_shortcodes/video.html b/themes/fredo/layouts/_shortcodes/video.html new file mode 100644 index 0000000..debe1d4 --- /dev/null +++ b/themes/fredo/layouts/_shortcodes/video.html @@ -0,0 +1,6 @@ +<figure class="small-figure"> + <video controls> + <source type="video/mp4" src="{{ .Get "src" }}"> + </video> + <figcaption class="gallery-caption">{{ .Get "caption" }}</figcaption> +</figure>
\ No newline at end of file diff --git a/themes/fredo/layouts/baseof.html b/themes/fredo/layouts/baseof.html new file mode 100644 index 0000000..92c0ca3 --- /dev/null +++ b/themes/fredo/layouts/baseof.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<html lang="{{ site.Language.LanguageCode }}"> + +<head> + <meta http-equiv="Content-Type" content="text/html" charset="UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> + <meta charset="utf-8"> + + {{ if .Title }} + <title>{{ site.Title }} | {{ .Title }}</title> + {{ else }} + <title>{{ site.Title }}</title> + {{ end }} + {{ $favicon := resources.Get "favicon.png" }} + <link rel="icon" type="image/png" href="{{ $favicon.Permalink }}" sizes="48x48"> + + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <!-- css, font and favicon are in assets --> + {{ $css := resources.Get "style.css" }} + <link href="{{ $css.Permalink }}" media="screen, projection" rel="stylesheet" type="text/css"> + {{ $font := resources.Get "Iwona-Regular.otf" }} + <link rel="preload" href="{{ $font.Permalink }}" as="font" type="font/otf"> + + + <!-- This tag is necessary since the modern browsers, the pinnacle of human engineering, + trigger CSS transitions on page load without script tags present (Chromium issue 332189, same on FF), + This bug is present since 2012. --> + <script src="/doesnt_exist.js"></script> +</head> +<body> + {{ partial "nav.html" . }} + <main> + <div class="full"> + {{ block "main" . }}{{ end }} + </div> + </main> +</body> + +</html> diff --git a/themes/fredo/layouts/list.html b/themes/fredo/layouts/list.html new file mode 100644 index 0000000..d041c58 --- /dev/null +++ b/themes/fredo/layouts/list.html @@ -0,0 +1,12 @@ +{{ define "main" }} + {{ $pagelist := .RegularPagesRecursive.ByDate.Reverse }} + {{ if .IsHome }} + {{ $pagelist = where .RegularPagesRecursive.ByDate.Reverse "Section" "posts"}} + {{ end }} + {{ range $pagelist }} + {{ partial "post-short.html" . }} + {{ end }} + <article id="content"> + {{ .Content }} + </article> +{{ end }}
\ No newline at end of file diff --git a/themes/fredo/layouts/single.html b/themes/fredo/layouts/single.html new file mode 100644 index 0000000..11efc31 --- /dev/null +++ b/themes/fredo/layouts/single.html @@ -0,0 +1,30 @@ +{{ define "main" }} + <article id="content"> + {{ if eq .Type "posts" }} + <section class="post-date"> + <p> {{ time.Format ":date_long" .PublishDate }} </p> + </section> + {{ end }} + {{ if .Param "Image" }} + {{ $imagename := .Param "image" }} + {{ $myimg := resources.Get $imagename }} + {{ if $myimg }} + {{ $myimg := $myimg.Resize "1024x" }} + <figure class="small-figure"> + <picture> + <source type="image/jpeg" srcset="{{ $myimg.RelPermalink }}"> + <img class="gallery-photo" alt="{{ .Title }}" src="{{ $myimg.RelPermalink }}"/> + </picture> + <figcaption class="gallery-caption">{{ .Param "caption" }}</figcaption> + </figure> + {{ else }} + {{ errorf "Can not find image: %s" $imagename }} + {{ end }} + {{ end }} + + + <h1>{{ .Title }}</h1> + {{ .Content }} + </article> + +{{ end }}
\ No newline at end of file |