Add bootstrap, more shortcodes and initial dark mode

This commit is contained in:
Ivaylo Ivanov 2024-11-29 14:20:38 +01:00
parent 189a933839
commit 17de8b21e6
10 changed files with 48 additions and 17 deletions

View File

@ -1,7 +1,7 @@
<footer class="footer"> <footer class="footer">
{{ partial "social.html" . }} {{ partial "social.html" . }}
<p><a href="https://github.com/kimcc/hugo-theme-noteworthy" target="_blank" rel="noopener">{{ i18n "noteworthy_theme" }}</a></p> <p><a href="https://git.ivayloivanov.eu/ivo/hugo-theme-noteworthy" target="_blank" rel="noopener">{{ i18n "noteworthy_theme" }}</a></p>
<p><a href="https://gohugo.io" target="_blank" rel="noopener">{{ i18n "built_with_hugo" }}</a></p> <p><a href="https://gohugo.io" target="_blank" rel="noopener">{{ i18n "built_with_hugo" }}</a></p>
{{ $script := resources.Get "js/main.js" | minify | fingerprint -}} {{ $script := resources.Get "js/main.js" | minify | fingerprint -}}

View File

@ -6,11 +6,11 @@
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title> <title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
<!-- Icons --> <!-- Icons -->
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}"> <link rel="apple-touch-icon" sizes="180x180" href="{{ "/" | relURL }}favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}"> <link rel="icon" type="image/png" sizes="32x32" href="{{ "/" | relURL }}favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}"> <link rel="icon" type="image/png" sizes="16x16" href="{{ "/" | relURL }}favicon/favicon-16x16.png">
<link rel="manifest" href="{{ "manifest.json" | relURL }}"> <link rel="manifest" href="{{ "/" | relURL }}favicon/manifest.json">
<link rel="mask-icon" href="{{ "safari-pinned-tab.svg" | relURL }}" color="#FF3DB4"> <link rel="mask-icon" href="{{ "/" | relURL }}favicon/safari-pinned-tab.svg" color="#FF3DB4">
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<!-- Styles --> <!-- Styles -->
@ -24,9 +24,14 @@
<link rel="stylesheet" href="{{ $custom_style.Permalink }}"/> --> <link rel="stylesheet" href="{{ $custom_style.Permalink }}"/> -->
<!-- Modify the custom.css file inside static > css to use vanilla css --> <!-- Modify the custom.css file inside static > css to use vanilla css -->
<!-- <link type="text/css" rel="stylesheet" href="{{ "/" | relURL }}css/custom.css"> --> <link type="text/css" rel="stylesheet" href="{{ "/" | relURL }}css/custom.css">
{{ with site.Home.OutputFormats.Get "RSS" }} <!-- Custom js -->
<script src="{{ "/" | relURL }}js/custom.js"></script>
<link rel="stylesheet" href="{{ "/" | relURL }}css/bootstrap.min.css">
{{ with .OutputFormats.Get "RSS" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end }} {{ end }}
{{- if not hugo.IsServer -}} {{- if not hugo.IsServer -}}

View File

@ -3,9 +3,10 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<div class="nav-menu"> <div class="nav-menu">
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<a class="color-link nav-link" href="{{ .URL }}">{{ .Name }}</a> <a class="color-link nav-link" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
{{ end }} {{ end }}
<a class="color-link nav-link" href="{{ .Site.BaseURL }}/archive/">Archive</a>
<a class="color-link nav-link" href="{{ .Permalink }}" target="_blank" rel="noopener" type="application/rss+xml">RSS</a> <a class="color-link nav-link" href="{{ .Permalink }}" target="_blank" rel="noopener" type="application/rss+xml">RSS</a>
</div> </div>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</nav> </nav>

View File

@ -0,0 +1,5 @@
<ul>
{{ range .Site.Taxonomies.tags }}
<li><a class="tag" href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
{{ end }}
</ul>

View File

@ -0,0 +1 @@
<div class="col-{{ index .Params 0 }}">{{ .Inner }}</div>

View File

@ -0,0 +1 @@
<div class="container">{{ .Inner }}</div>

View File

@ -0,0 +1,6 @@
<span class="inline-svg" >
{{- $fname:=print "fontawesome/" ( .Get 0 ) ".svg" -}}
{{- $path:="<path" -}}
{{- $fill:="<path fill=\"currentColor\"" -}}
{{ replace (readFile $fname) $path $fill | safeHTML }}
</span>

View File

@ -0,0 +1 @@
<div class="row">{{ .Inner }}</div>

7
static/css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

4
static/js/custom.js Normal file
View File

@ -0,0 +1,4 @@
function toggleDarkMode() {
document.body.classList.toggle("dark-mode");
}