Switch to IPng theme
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-08-13 02:25:52 +02:00
parent fc1c0fdbb4
commit ebf34c65a1
78 changed files with 275 additions and 903 deletions

View File

@ -0,0 +1,10 @@
<article class="blog-post-summary">
<h3 class="blog-post-title"><a href="{{ .Permalink }}">{{.Title}}</a></h3>
<p class="blog-post-info">Posted: <time>{{ .Date.Format "2006-01-02"}}</time>
{{ partial "blog-taxonomy-info" . }}</p>
<p>
{{- .Summary -}}
<span> <a href="{{ .Permalink }}">Read more...</a></span>
</p>
</article>

View File

@ -0,0 +1,16 @@
{{- with .Params.Categories }}
<span class="blog-taxonomy-info"> &nbsp; | &nbsp; Categories:
{{- $sort := sort . }}
{{- $links := apply $sort "partial" "post-category-link" "." }}
{{- $clean := apply $links "chomp" "." }}
{{- delimit $clean ", " | safeHTML }}
</span>
{{- end }}
{{- with .Params.Tags }}
<span class="blog-taxonomy-info"> &nbsp; | &nbsp; Tags:
{{- $sort := sort . }}
{{- $links := apply $sort "partial" "post-tag-link" "." }}
{{- $clean := apply $links "chomp" "." }}
{{- delimit $clean ", " | safeHTML }}
</span>
{{- end -}}

View File

@ -0,0 +1,29 @@
<footer class='page-footer'>
{{- $socialMap := .Site.Data.notrack.social }}
{{- with $.Site.Params.social }}
<div class="social">
<ul>
{{- $socialArray := slice -}}
{{- range $website, $user := $.Site.Params.social }}
{{- $social := $website | lower | index $socialMap | default dict -}}
{{- $social := dict "user" $user | merge $social -}}
{{- $data := index $socialMap $website -}}
{{- $socialArray = $socialArray | append $social -}}
{{- end }}
{{- range sort $socialArray "weight" -}}
{{- if .prefix -}}
<li><a href="{{- .prefix -}}{{ .user }}" rel="me"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- else if .template -}}
<li><a href="{{- printf .template .user -}}" rel="me"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- else if .url -}}
<li><a href="{{- .url -}}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- end -}}
{{- end -}}
</ul>
</div>
{{- end }}
{{ printf " <!-- Icons are from Awesome Font, licensed under SIL OFL 1.1 (https://scripts.sil.org/OFL) -->" | safeHTML }}
</footer>

View File

@ -0,0 +1,26 @@
<head>
<title>{{ .Site.Title }} {{ with .Title }}- {{ . }} {{ end }}</title>
<link rel="stylesheet" type="text/css" href="{{ "css/fonts.css" | relURL }}">
<link rel="stylesheet" type="text/css" href="{{ "css/fontawesome.css" | relURL }}">
{{ $options := dict "transpiler" "libsass" "targetPath" "css/styles.css" -}}
{{ $style := resources.Get "styles.scss" | toCSS $options | minify | fingerprint -}}
<link rel="stylesheet" type="text/css" href="{{ $style.RelPermalink }}">
{{ with resources.Get "css/userstyles.css" }}
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}">
{{ end -}}
<link rel="icon" href="/assets/logo/favicon/favicon.ico" type="image/x-icon" sizes="any">
<link rel="apple-touch-icon" href="/assets/logo/favicon/apple-touch-icon.png">
<link rel="manifest" href="/assets/logo/favicon/icon.manifest">
<meta charset="UTF-8">
<meta name="author" content="{{ .Site.Params.Author }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{- range .AlternativeOutputFormats }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{- end }}
<script defer data-domain="ipng.ch" data-api="/api/event" src="/js/script.js"></script>
{{- if eq .Params.asciinema true }}
<link rel="stylesheet" type="text/css" href="{{ "css/asciinema-player.css" | relURL }}">
<script src="{{ "js/asciinema-player.min.js" | relURL }}"></script>
{{- end }}
</head>

View File

@ -0,0 +1,70 @@
<header class="page-header">
<div class="myname">
<h2><a href="{{ default .Site.Home .Site.BaseURL }}">{{ default .Site.Params.Author .Site.Params.siteHeading }}</a></h2>
</div>
<nav>
<ul class="navbar">
{{- /* info about current page */ -}}
{{- $currentPage := . -}}
{{- $currentPagesParent := $currentPage.Parent -}}
{{- $currentPageInTags := eq $currentPage.Section "tags" -}}
{{- $currentPageInCategories := eq $currentPage.Section "categories" -}}
{{- $currentPageNotHome := ne $currentPage.IsHome true -}}
{{- range .Site.Menus.main -}}
{{- if .HasChildren -}}
{{- /* info about current menu */ -}}
{{- $currentMenusPage := .Page -}}
{{- $currentMenuHasTags := false -}}
{{- $currentMenuHasCategories := false -}}
{{- range .Children -}}
{{- $childMenuSection := .Page.Section -}}
{{- if eq $childMenuSection "categories" -}}{{- $currentMenuHasCategories = true -}}{{- end -}}
{{- if eq $childMenuSection "tags" -}}{{- $currentMenuHasTags = true -}}{{- end -}}
{{- end -}}
{{- /* comparison of current menu and current page */ -}}
{{- $active := eq $currentMenusPage $currentPagesParent -}}
{{- $active = and $active $currentPageNotHome -}}
{{- $active = or $active (and $currentMenuHasTags $currentPageInTags) -}}
{{- $active = or $active (and $currentMenuHasCategories $currentPageInCategories) }}
<li class="dropdown {{ if or $active ($currentPage.IsMenuCurrent "main" . ) ($currentPage.HasMenuCurrent "main" .)}}activetab{{ end }}">
<a href ="{{ .URL }}">
{{- .Pre }}
<span>{{ .Name }}</span>
</a>
<div class=sub-menu>
{{- range .Children }}
{{- $currentMenuSection := .Page.Section }}
{{- $active := and $currentPageInTags (eq $currentMenuSection "tags") }}
{{- $active = or $active (and $currentPageInCategories (eq $currentMenuSection "categories") ) }}
{{- $active = or $active ($currentPage.IsMenuCurrent "main" . ) }}
<a class="{{- if $active -}}activetab{{- end -}}" href="{{- .URL -}}">{{ .Name }}</a>
{{- end }}
</div>
</li>
{{- else -}}
{{- $currentMenusPage := .Page }}
{{- $currentMenuInMainSections := false }}
{{- with $currentMenusPage }}
{{- $currentMenuInMainSections = in site.Params.mainSections .Type }}
{{- end }}
{{- $active := eq $currentMenusPage $currentPagesParent }}
{{- $active = and $active (eq $currentPage.RelPermalink .URL ) }}
{{- $active = or $active (eq $currentPage.Title .Name ) }}
{{- $active = or $active ($currentPage.IsMenuCurrent "main" . ) }}
<li class="{{- if $active -}} activetab {{- end -}}">
<a href="{{ .URL }}">
{{- .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
{{- end }}
{{- end }}
</ul>
</nav>
</header>

View File

@ -0,0 +1,43 @@
{{ $pag := $.Paginator }}
{{ if gt $pag.TotalPages 1 }}
<ul class="pagination">
{{ with $pag.First }}
<li class="page-item">
<a href="{{ .URL }}" class="page-link" aria-label="First"><span
aria-hidden="true">&laquo;</span></a>
</li>
{{ end }}
<li class="page-item{{ if not $pag.HasPrev }} disabled{{ end }}">
<a {{ if $pag.HasPrev }}href="{{ $pag.Prev.URL }}"{{ end }}
class="page-link" aria-label="Previous"><span aria-hidden="true">&lsaquo;</span></a>
</li>
{{ $ellipsed := false }}
{{ $shouldEllipse := false }}
{{ range $pag.Pagers }}
{{ $right := sub .TotalPages .PageNumber }}
{{ $showNumber := or (le .PageNumber 3) (eq $right 0) }}
{{ $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) }}
{{ if $showNumber }}
{{ $ellipsed = false }}
{{ $shouldEllipse = false }}
{{ else }}
{{ $shouldEllipse = not $ellipsed }}
{{ $ellipsed = true }}
{{ end }}
{{ if $showNumber }}
<li class="page-item{{ if eq . $pag }} active{{ end }}"><a class="page-link" href="{{ .URL }}">{{ .PageNumber }}</a></li>
{{ else if $shouldEllipse }}
<li class="page-item disabled"><span aria-hidden="true">&nbsp;&hellip;&nbsp;</span></li>
{{ end }}
{{ end }}
<li class="page-item{{ if not $pag.HasNext }} disabled{{ end }}">
<a {{ if $pag.HasNext }}href="{{ $pag.Next.URL }}"{{ end }}
class="page-link" aria-label="Next"><span aria-hidden="true">&rsaquo;</span></a>
</li>
{{ with $pag.Last }}
<li class="page-item">
<a href="{{ .URL }}" class="page-link" aria-label="Last"><span aria-hidden="true">&raquo;</span></a>
</li>
{{ end }}
</ul>
{{ end }}

View File

@ -0,0 +1 @@
<a class="blog-taxonomy-info" href="/categories/{{ . | urlize }}">{{ . }}</a>

View File

@ -0,0 +1 @@
<a class="blog-taxonomy-info" href="/tags/{{ . | urlize }}">{{ . }}</a>