mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2025-10-09 10:11:14 +00:00
Added h-card, h-entry, rel-me links
This commit is contained in:
parent
d683165125
commit
e699ce661e
6 changed files with 86 additions and 48 deletions
|
@ -1,39 +1,48 @@
|
|||
|
||||
<head>
|
||||
<title>
|
||||
{{ if eq .Title .Site.Title }}
|
||||
{{ .Site.Title }}
|
||||
{{ else }}
|
||||
{{ .Title }} - {{ .Site.Title }}
|
||||
{{ end }}
|
||||
</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
||||
<title>
|
||||
{{- if eq .Title .Site.Title -}}
|
||||
{{ .Site.Title }}
|
||||
{{- else -}}
|
||||
{{ .Title }} - {{ .Site.Title }}
|
||||
{{- end -}}
|
||||
</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="supported-color-schemes" content="light dark" />
|
||||
<meta name="author" content="{{ .Site.Params.Author }}" />
|
||||
<meta name="robots" content="index,follow" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.BaseURL }}img/{{ .Site.Params.favicon }}">
|
||||
|
||||
<!-- Identities -->
|
||||
{{ range .Site.Params.identities}}
|
||||
<link href="{{.}}" rel="me"/>
|
||||
{{ end }}
|
||||
{{- range .Site.Params.identities -}}
|
||||
<link href="{{.}}" rel="me"/>
|
||||
{{ end -}}
|
||||
|
||||
<!-- css -->
|
||||
{{ $style := resources.Get "css/style.css" }}
|
||||
{{ $markdown := resources.Get "css/markdown.css" }}
|
||||
{{ $fontawesome := resources.Get "css/fontawesome.css" }}
|
||||
{{ $syntaxHighlight := resources.Get "css/syntax-highlight.css" }}
|
||||
<!-- RSS Links -->
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
|
||||
|
||||
<!-- CSS -->
|
||||
{{- $style := resources.Get "css/style.css" -}}
|
||||
{{- $markdown := resources.Get "css/markdown.css" -}}
|
||||
{{- $fontawesome := resources.Get "css/fontawesome.css" -}}
|
||||
{{- $syntaxHighlight := resources.Get "css/syntax-highlight.css" -}}
|
||||
{{ $css := slice $style $markdown $fontawesome $syntaxHighlight | resources.Concat "css/style.css" | resources.Minify | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $css.Permalink }}" integrity="{{ $css.Data.Integrity }}">
|
||||
{{ $styleDark := resources.Get "css/style-dark.css" }}
|
||||
{{ $markdownDark := resources.Get "css/markdown-dark.css" }}
|
||||
{{- $styleDark := resources.Get "css/style-dark.css" -}}
|
||||
{{- $markdownDark := resources.Get "css/markdown-dark.css" -}}
|
||||
{{ $cssDark := slice $styleDark $markdownDark | resources.Concat "css/style-dark.css" | resources.Minify | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $cssDark.Permalink }}" media="(prefers-color-scheme: dark)" integrity="{{ $cssDark.Data.Integrity }}">
|
||||
<!-- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous"> -->
|
||||
|
||||
<!-- custom css -->
|
||||
{{ range .Site.Params.custom_css }}
|
||||
<link rel="stylesheet" href="{{ . }}">
|
||||
{{ end }}
|
||||
{{- range .Site.Params.custom_css -}}
|
||||
<link rel="stylesheet" href="{{ . }}">
|
||||
{{ end -}}
|
||||
|
||||
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
|
@ -51,14 +60,8 @@
|
|||
<script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
|
||||
<![endif]-->` | safeHTML }}
|
||||
|
||||
<!-- Analytics -->
|
||||
{{- if and (not .Site.IsServer) .Site.GoogleAnalytics -}}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{- end -}}
|
||||
|
||||
<!-- MathJax -->
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
{{ partial "mathjax_support.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{- if or .Params.math .Site.Params.math -}}
|
||||
{{ partial "mathjax_support.html" . }}
|
||||
{{- end -}}
|
||||
</head>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<header>
|
||||
<header class="h-card p-author">
|
||||
<!-- avator -->
|
||||
<div class="avatar">
|
||||
<img class="avatarMask" src="{{ .Site.BaseURL }}/img/{{ .Site.Params.avatar }}" alt="{{ .Site.Params.avatarDescription }}">
|
||||
<img class="avatarMask u-photo" src="{{ .Site.BaseURL }}/img/{{ .Site.Params.avatar }}" alt="{{ .Site.Params.avatarDescription }}">
|
||||
<a href="{{ .Site.BaseURL }}"><img class="avatar-border" src="{{ .Site.BaseURL }}/img/avatar-border.svg" alt=""></a>
|
||||
</div>
|
||||
<!-- author -->
|
||||
<h2><a class="author" href="{{ .Site.BaseURL }}">{{ .Site.Params.Author }}</a></h2>
|
||||
<!-- Alternative Formats -->
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
<h2 class="p-name"><a class="author u-url" rel="me" href="{{ .Site.BaseURL }}">{{ .Site.Params.Author }}</a></h2>
|
||||
<!-- description (for h-card) -->
|
||||
<p style="display: none" class="p-note">
|
||||
{{ .Site.Params.description | safeHTML }}
|
||||
</p>
|
||||
</header>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue