Update theme & switch to go modules

This commit is contained in:
Salar Rahmanian 2022-10-11 19:11:55 -07:00
parent 6c3cc974ed
commit a93227875e
10 changed files with 53 additions and 7 deletions

View file

@ -1,3 +1,10 @@
{{- $s := .Site.Params }}
{{ $t := .Site.Title }}
{{- if or .Params.enableMathNotation $s.enableMathNotation }}
{{ partialCached "math" . }}
{{- end }}
{{- $iconsDir := default "icons/" .Site.Params.iconsDir }}
{{- $defaultFooterLogo := printf "%s%s" $iconsDir "apple-touch-icon.png"}}
<footer class = 'footer'>
<div class = 'footer_inner wrap pale'>
<img src = '{{ absURL "softinio.jpg" }}' class = 'icon icon_2 transparent'>

View file

@ -1,3 +1,13 @@
{{- $params := site.Params }}
{{- $separator := default "|" $params.titleSeparator }}
{{- $title := "" }}
{{- if and .Title (ne (trim (lower .Site.Title) "") (trim (lower .Title) "")) }}
{{- if eq .Kind "taxonomy" }}
{{- $title = default .Title ( T (lower .Title) ) }}
{{- else }}
{{- $title = .Title }}
{{- end }}
{{- end }}
<title>{{ if and .Title (ne (trim (lower .Site.Title) "") (trim (lower .Title) "")) }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
<meta charset='utf-8'>
{{ hugo.Generator }}
@ -12,6 +22,27 @@
{{- partial "opengraph.html" . }}
{{- partial "favicon.html" . }}
<link rel='canonical' href='{{ .Permalink }}'>
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
<!-- preload assets declaration -->
<!-- preload main css file -->
{{ $styles := partialCached "func/getStylesBundle" . }}
<link rel="preload" href="{{ $styles.Permalink }}" integrity = "{{ $styles.Data.Integrity }}" as="style" crossorigin="anonymous">
<!-- preload main javascript file -->
{{ $bundle := partialCached "func/getJavascriptBundle" . }}
<link rel="preload" href="{{ $bundle.Permalink }}" as="script" integrity=
"{{ $bundle.Data.Integrity }}" crossorigin="anonymous">
<!-- link main css file -->
<link rel="stylesheet" type="text/css" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous">
<!-- load all custom css files -->
{{- with $params.customCSS }}
{{- range . -}}
<link rel="stylesheet" href="{{ relURL . }}">
{{- end }}
{{- end }}
<!-- author & description & keywords -->
<meta name="author" content="{{ .Site.Params.author | safeHTML }}" />