Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
✨ Add blog (#3)
* Add blog * Make blog pages nice * Add i18n for blog * Add first blog post * Make images inside a container responsive
- Loading branch information
Showing
16 changed files
with
188 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
+++ | ||
title = "{{ replace .Name "-" " " | title }}" | ||
date = {{ .Date }} | ||
draft: true | ||
draft = true | ||
+++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
+++ | ||
title = "Blog" | ||
menu = "main" | ||
draft = false | ||
weight = 3 | ||
+++ | ||
|
||
<h1 class="mt-4 display-3">Blog</h1> | ||
<p>bzw. Notizensammlung</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
+++ | ||
title = "Hallo Welt!" | ||
description = "Ich habe jetzt einen Blog-Bereich auf meiner Website." | ||
tags = [ | ||
"meta", | ||
"rust", | ||
] | ||
date = 2022-06-04 | ||
+++ | ||
|
||
Hallo 👋, | ||
wie du wahrscheinlich gerade herausgefunden hast, habe ich hier jetzt einen Blog-Bereich. | ||
Ich werde versuchen, ihn eher wie eine Notizensammlung zu behandeln, weil ich sonst zu hohe Ansprüche an mich selbst hätte und nie etwas veröffentlichen würde. | ||
|
||
|
||
|
||
Übrigens habe ich vor kurzem mein erstes Programm in Rust geschrieben (<https://git.nalsai.de/imgname>), daher hier ein einfaches Hallo Welt: | ||
|
||
```rust | ||
fn main() { | ||
println!("Hallo welt!"); | ||
} | ||
``` | ||
|
||
und hier ist ein Bild einer Rose, das ich gestern aufgenommen habe: | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
+++ | ||
title = "Blog" | ||
menu = "main" | ||
draft = false | ||
weight = 3 | ||
+++ | ||
|
||
<h1 class="mt-4 display-3">Blog</h1> | ||
<p>or note collection</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
+++ | ||
title = "Hello World!" | ||
description = "I have a blog section on my website now." | ||
tags = [ | ||
"meta", | ||
"rust", | ||
] | ||
date = 2022-06-04 | ||
+++ | ||
|
||
Hey 👋, | ||
as you probably just found out, I have a blog section here now. | ||
I will try to treat it more like a note collection than a blog, because otherwise I would have too high demands on myself and never publish anything. | ||
|
||
|
||
|
||
Anyway, I recently wrote my first program in rust (<https://git.nalsai.de/imgname>), so here is a simple hello world: | ||
|
||
```rust | ||
fn main() { | ||
println!("Hello world!"); | ||
} | ||
``` | ||
|
||
and here is a picture of a rose I took yesterday: | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{ define "main" }} | ||
<main class="container"> | ||
<h1 class="my-4">{{ .Title }}</h1> | ||
<p class="lead text-justify">{{ .Description }}</p> | ||
{{ .Content }} | ||
</main> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{ define "main" }} | ||
<main class="container"> | ||
<header class="mb-5"> | ||
<h1 class="mt-4">{{ .Title }}</h1> | ||
<p>{{ .Description }}</p> | ||
{{ if .Date }} | ||
<p class="small"> | ||
{{ i18n "Published" }} {{ i18n "on" }} <time datetime="{{ .Date.Format "2006-01-02" }}" itemprop="datePublished">{{ dateFormat (default "Monday 2006-01-02" .Site.Params.dateFormat) .Date }}</time> | ||
{{ if .Params.author }} {{ i18n "by" }} {{ .Params.author }}{{ end }} | ||
</p> | ||
{{ end }} | ||
{{ with .Params.tags }}{{ range $tag := . }} | ||
<a class="badge rounded-pill bg-primary text-decoration-none" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}/">{{ . }}</a> | ||
{{ end }}{{ end }} | ||
</header> | ||
{{ .Content }} | ||
</main> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{ define "main" }} | ||
<main class="container"> | ||
{{ .Content }} | ||
<div class="border-bottom pt-4"></div> | ||
{{ range .Paginator.Pages }} | ||
<a href="{{ .RelPermalink }}" class="text-decoration-none"> | ||
<div class="d-flex pt-3 mt-2 border-bottom"> | ||
<p class="pb-2"> | ||
<strong class="d-block text-white">{{ .Title }}</strong> | ||
{{ if .Date }}<time class="link-light" datetime="{{ .Date.Format " 2006-01-02" }}">{{ i18n "Published" }}: {{ dateFormat (default "2006-01-02" .Site.Params.dateFormat) .Date }}</time>{{ end }} | ||
</p> | ||
</div> | ||
</a> | ||
{{ end }} | ||
|
||
<div class="pt-5"> | ||
{{ template "_internal/pagination.html" . }} | ||
</div> | ||
</main> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{ define "main" }} | ||
<main class="container"> | ||
<h1 class="my-3">{{ .Title }}</h1> | ||
<div class="border-bottom pt-4"></div> | ||
{{ range .Paginator.Pages }} | ||
<a href="{{ .RelPermalink }}" class="text-decoration-none"> | ||
<div class="d-flex pt-3 mt-2 border-bottom"> | ||
<p class="pb-2"> | ||
<strong class="d-block">{{ .Title }}</strong> | ||
</p> | ||
</div> | ||
</a> | ||
{{ end }} | ||
<div class="pt-5"> | ||
{{ template "_internal/pagination.html" . }} | ||
</div> | ||
</main> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{ define "main" }} | ||
<main class="container"> | ||
<h1 class="my-3">{{ i18n "Pages" }} {{ i18n "with" }} {{ .Data.Singular }} {{ .Title }}</h1> | ||
<div class="border-bottom pt-4"></div> | ||
{{ range .Paginator.Pages }} | ||
<a href="{{ .RelPermalink }}" class="text-decoration-none"> | ||
<div class="d-flex pt-3 mt-2 border-bottom"> | ||
<p class="pb-2"> | ||
<strong class="d-block text-white">{{ .Title }}</strong> | ||
{{ if .Date}}<time class="link-light" datetime="{{ .Date.Format " 2006-01-02" }}">{{ i18n "Published" }} {{ dateFormat (default "2006-01-02" .Site.Params.dateFormat) .Date }}</time>{{ end }} | ||
</p> | ||
</div> | ||
</a> | ||
{{ end }} | ||
|
||
<div class="pt-5"> | ||
{{ template "_internal/pagination.html" . }} | ||
</div> | ||
</main> | ||
{{ end }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters