diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2024-08-11 10:00:56 -0500 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2024-08-11 10:00:56 -0500 |
commit | 726ca45683974e991c3c2d172039716be8cb0d4c (patch) | |
tree | 7d773f60439482b4833055e457392f89e20d3b69 | |
parent | f49d28caa3005c608eec9f8f82b1d9625ae37c01 (diff) | |
download | hugo-theme-tjkbasic-726ca45683974e991c3c2d172039716be8cb0d4c.tar.xz hugo-theme-tjkbasic-726ca45683974e991c3c2d172039716be8cb0d4c.zip |
changes to copyright and style. open links in new tab if theyre to another site
-rw-r--r-- | hugo.yaml | 9 | ||||
-rw-r--r-- | layouts/_default/_markup/render-link.html | 2 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 9 | ||||
-rw-r--r-- | layouts/partials/theme-copyright.html | 1 | ||||
-rw-r--r-- | static/stylesheets/style.css | 2 |
5 files changed, 18 insertions, 5 deletions
@@ -5,8 +5,15 @@ menus: - name: Contact pageRef: /contact -# TODO this doesnt work +params: + copyright: + include: false + name: John Smith + type: All rights reserved + +# TODO this doesnt work unless set in main config markup: highlight: noClasses: false lineNos: true + diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index f04b2e3..69a1c1a 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -1 +1 @@ -<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a> +<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ .Text | safeHTML }}</a> diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index e5b0ed0..d91f60f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,6 +4,8 @@ {{ $title := print .Title " - " .Site.Title }} {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }} <title>{{ $title | title }}</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="/stylesheets/highlight.css"> <link rel="stylesheet" type="text/css" href="/stylesheets/style.css"> {{- block "head" . }}{{- end }} @@ -13,7 +15,7 @@ <a id="homelink" href="/">{{ .Site.Title }}</a> <span id="title">{{ .Title }}</span> <div id="menu"> - {{- range site.Menus.main }} + {{- range sort site.Menus.main "Weight" }} <a href="{{ .URL }}">{{ .Name }}</a> {{- end }} </div> @@ -26,7 +28,10 @@ <div id="sharing"> <a><img src="/icons/rss_feed_24dp_78A75A_FILL0_wght400_GRAD0_opsz24.svg" /></a> </div> - <span id="copyright">© Tim Keller 2024</span> + {{ if .Site.Params.copyright.include }} + <span id="copyright">© {{ time.Now.Year }} {{ .Site.Params.copyright.name }} – {{ .Site.Params.copyright.type }}</span> + {{ end }} + {{ partial "theme-copyright.html" . }} </footer> </body> </html> diff --git a/layouts/partials/theme-copyright.html b/layouts/partials/theme-copyright.html new file mode 100644 index 0000000..b97de5f --- /dev/null +++ b/layouts/partials/theme-copyright.html @@ -0,0 +1 @@ +<a href="https://tjkeller.xyz/projects/this-site/#tjkbasic-hugo-theme" id="theme-copyright">Built Using the TJKBasic Hugo Theme</a> diff --git a/static/stylesheets/style.css b/static/stylesheets/style.css index 0765af0..e0a82cf 100644 --- a/static/stylesheets/style.css +++ b/static/stylesheets/style.css @@ -115,7 +115,7 @@ img, figcaption { color: #ddd; } -#copyright { +#copyright, #theme-copyright { text-align: center; display: block; opacity: .2; |