Skip to content

Commit

Permalink
Merge pull request #5 from teresalves/teresalves/add-blog
Browse files Browse the repository at this point in the history
feat: add blog and remove changelog
  • Loading branch information
teresalves authored Sep 17, 2024
2 parents 767f129 + 9afa45e commit 94251ca
Show file tree
Hide file tree
Showing 106 changed files with 900 additions and 722 deletions.
4 changes: 2 additions & 2 deletions config/_default/menus/menus.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@


[[main]]
name = "Changelog"
url = "/changelog/"
name = "Blog"
url = "/blog/"
weight = 30

[[main]]
Expand Down
2 changes: 1 addition & 1 deletion content/changelog/_index.md → content/blog/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Change log"
title: "Blog"
description: ""
summary: ""
date: 2023-09-07T16:21:44+02:00
Expand Down
Binary file added content/blog/greetings/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions content/blog/greetings/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "Greetings"
description: "hello"
summary: "Welcome to my website"
date: 2024-09-16T16:27:22+02:00
lastmod: 2023-09-16T16:27:22+02:00
draft: false
images: []
weight: 9999
categories: ["Personal"]
tags: []
contributors: []
pinned: false
homepage: false
seo:
title: "" # custom title (optional)
description: "" # custom description (recommended)
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
---

Hey there!
I'll be posting some things that interest me. Mostly investigation of technical topics that I want to save to check again. And probably dogs. And other friend shaped animals.
22 changes: 0 additions & 22 deletions content/changelog/adding-docker/index.md

This file was deleted.

28 changes: 0 additions & 28 deletions content/changelog/initial-setup/index.md

This file was deleted.

14 changes: 12 additions & 2 deletions hugo_stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@
"noscript",
"p",
"path",
"picture",
"pre",
"script",
"section",
"small",
"source",
"span",
"strong",
"style",
Expand All @@ -58,7 +60,9 @@
"active",
"anchor",
"bg-dots",
"blog",
"blog-header",
"blur-up",
"btn",
"btn-close",
"btn-cta",
Expand All @@ -68,15 +72,16 @@
"card",
"card-body",
"card-list",
"card-terms",
"categories",
"changelog",
"col-lg-10",
"col-lg-11",
"col-lg-12",
"col-lg-5",
"col-lg-8",
"col-lg-9",
"col-md-12",
"col-md-13",
"col-xl-3",
"col-xl-4",
"col-xl-8",
Expand Down Expand Up @@ -133,11 +138,14 @@
"icon-tabler-search",
"icon-tabler-sun",
"icon-tabler-x",
"img-post-single",
"justify-content-between",
"justify-content-center",
"justify-content-end",
"justify-content-start",
"lazyload",
"lead",
"link-muted",
"list",
"list-inline",
"list-inline-item",
Expand Down Expand Up @@ -168,7 +176,6 @@
"mt-n3",
"mx-2",
"mx-auto",
"mx-xl-auto",
"my-3",
"nav",
"nav-item",
Expand Down Expand Up @@ -197,7 +204,9 @@
"px-0",
"query-no-results",
"reading-time",
"rounded-0",
"rounded-pill",
"rounded-top-1",
"row",
"search-form",
"search-input",
Expand All @@ -219,6 +228,7 @@
"submitted",
"tags",
"taxonomy",
"term",
"text-body",
"text-body-secondary",
"text-center",
Expand Down
59 changes: 59 additions & 0 deletions layouts/_default/term.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{{ define "main" }}
<div class="row justify-content-center">
<div class="col-md-12 col-lg-9">

{{ if .Params.avatar -}}
{{ $image := .Resources.GetMatch (printf "**%s" .Params.avatar) -}}
{{ $imageLq := $image.Resize "15x15 webp q95" -}}
{{ $image = $image.Resize "300x300 webp q95" -}}
<div class="contributor-image">
<img class="img-fluid lazyload blur-up rounded-circle" src="{{ $imageLq.RelPermalink }}" data-src="{{ $image.RelPermalink }}" alt="{{ .Title }}" width="150" height="150">
</div>
{{ end -}}


{{ with .Params.headline -}}
<h1 class="text-center">{{ . }}</h1>
{{ else -}}

<h1 class="text-center">{{ .Title }}</h1>
{{ end -}}
{{ with .Params.summary -}}<p class="lead text-center">{{ . }}</p>{{ end -}}
{{ with .Content -}}<div class="text-center">{{ . }}</div>{{ end -}}
</div>
</div>
<div class="row justify-content-center">
<div class="col-lg-9">
{{ $paginator := .Paginate (.Data.Pages) -}}
{{ range $paginator.Pages -}}
<div class="card">
{{ if site.Params.doks.imageList -}}
{{- $images := .Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- if $featured -}}
{{ partial "img" (dict
"page" .
"src" $featured
"alt" .Title
"class" "rounded-top-1"
)}}
{{ end -}}
{{ end -}}
<div class="card-body">
<article>
<h2 class="h3"><a class="stretched-link text-body" href="{{ .RelPermalink }}">{{ .Params.title }}</a></h2>
<p>{{ .Params.summary | safeHTML }}</p>
{{ partial "main/blog-meta.html" . -}}
</article>
</div>
</div>
{{ end -}}
</div>
</div>
<div class="row justify-content-center">
<div class="col-md-12 col-lg-9">
{{ template "_internal/pagination.html" . }}
</div>
</div>
{{ end }}
65 changes: 65 additions & 0 deletions layouts/blog/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{{ define "main" }}
<div class="row justify-content-center">
<div class="col-md-12 col-lg-9">
{{ if .Params.avatar -}}
{{ $image := .Resources.GetMatch (printf "**%s" .Params.avatar) -}}
{{ $imageLq := $image.Resize "15x15 webp q95" -}}
{{ $image = $image.Resize "300x300 webp q95" -}}
<div class="contributor-image">
<img class="img-fluid lazyload blur-up rounded-circle" src="{{ $imageLq.RelPermalink }}" data-src="{{ $image.RelPermalink }}" alt="{{ .Title }}" width="150" height="150">
</div>
{{ end -}}
{{ with .Params.headline -}}
<h1 class="text-center">{{ . }}</h1>
{{ else -}}
<h1 class="text-center">{{ .Title }}</h1>
{{ end -}}
{{ with .Params.summary -}}<p class="lead text-center">{{ . }}</p>{{ end -}}
{{ with .Content -}}<div class="text-center">{{ . }}</div>{{ end -}}
</div>
<ul class="nav justify-content-center">
{{- $current := . -}}
{{- $title := $current.Title | urlize -}}
{{ range site.Taxonomies.categories.Alphabetical }}
{{- $active := eq .Name $title -}}
<li class="nav-item">
<a class="nav-link{{ if $active }} active{{ end }}"{{ if $active }} aria-current="page"{{ end }} href="{{ .Page.Permalink }}">{{ .Page.LinkTitle }} ({{ .Count }})</a>
</li>
{{ end }}
</ul>
</div>
<div class="row justify-content-start">
{{ $paginator := .Paginate (.Data.Pages) -}}
{{ range $paginator.Pages -}}
<div class="col-lg-8">
<div class="card">
{{ if site.Params.doks.imageList -}}
{{- $images := .Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- if $featured -}}
{{ partial "img" (dict
"page" .
"src" $featured
"alt" .Title
"class" "rounded-top-1"
)}}
{{ end -}}
{{ end -}}
<div class="card-body">
<article>
<h2 class="h3"><a class="stretched-link text-body" href="{{ .RelPermalink }}">{{ .Params.title }}</a></h2>
<p>{{ .Params.summary | safeHTML }}</p>
{{ partial "main/blog-meta.html" . -}}
</article>
</div>
</div>
</div>
{{ end -}}
</div>
<div class="row justify-content-center">
<div class="col-md-12 col-lg-9">
{{ template "_internal/pagination.html" . }}
</div>
</div>
{{ end }}
70 changes: 70 additions & 0 deletions layouts/blog/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{{ define "main" }}
<article>
<div class="row justify-content-center">
<div class="col-md-12 col-lg-10">
<div class="blog-header">
<h1>{{ .Title }}</h1>
{{ partial "main/blog-meta.html" . }}
</div>
</div>
{{ if site.Params.doks.imageSingle -}}
{{- $images := .Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- if $featured -}}
<div class="col-md-13", align="center">
{{ partial "picture" (dict
"page" .
"src" $featured
"alt" .Title
"class" "img-post-single rounded-0"
)}}
</div>
{{ end -}}
{{ end -}}
<div class="col-md-12 col-lg-9">
{{ with .Params.summary -}}<p class="lead">{{ . }}</p>{{ end -}}
{{ .Content }}
{{ if .Params.tags -}}
<div class="tag-list-single">
{{ range $index, $tag := .Params.tags -}}
<a class="btn btn-light" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}/" role="button">{{ . }}</a>
{{ end -}}
</div>
{{ end -}}
</div>
</div>
</article>
{{ end }}

{{ define "sidebar-footer" }}
{{ if site.Params.doks.relatedPosts -}}
{{ $related := .Site.RegularPages.Related . | first 3 -}}
{{ with $related -}}
<div class="bg-light">
<section class="section section-related container">
<div class="row justify-content-center">
<div class="col-md-12 col-lg-9">
<h2 class="section-title text-center">Related posts</h2>
</div>
</div>
<div class="row justify-content-center">
<div class="col-lg-9">
{{ range . -}}
<div class="card">
<div class="card-body">
<article>
<h2 class="h3"><a class="stretched-link text-body" href="{{ .RelPermalink }}">{{ .Params.title }}</a></h2>
<p>{{ .Params.summary | safeHTML }}</p>
{{ partial "main/blog-meta.html" . -}}
</article>
</div>
</div>
{{ end -}}
</div>
</div>
</section>
</div>
{{ end -}}
{{ end -}}
{{ end }}
2 changes: 1 addition & 1 deletion node_modules/@hyas/doks-core/layouts/blog/single.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 94251ca

Please sign in to comment.