Update theme

This commit is contained in:
Daniil Krymov 2021-05-04 19:11:45 +02:00
commit 3b8b42903e
No known key found for this signature in database
GPG Key ID: 49FF57C32BD36752
11 changed files with 31 additions and 29 deletions

View File

@ -17,6 +17,10 @@
margin-inline-end: 1px
}
.footer span:last-child {
white-space: nowrap;
}
.footer a {
color: inherit;
border-bottom: 1px solid var(--secondary)

View File

@ -11,7 +11,7 @@
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
@ -41,7 +41,7 @@
<guid>{{ .Permalink }}</guid>
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
{{- if .Site.Params.ShowFullTextinRSS }}
<content>{{ .Content | html }}</content>
<content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
{{- end }}
</item>
{{- end }}

View File

@ -5,10 +5,11 @@
<span>&copy; {{ now.Year }} <a href="{{ "" | absLangURL }}">{{- .Site.Params.label.text | default .Site.Title }}</a></span>
{{- end }}
{{- if not $.Site.Params.hideCredits }}
<span>&middot;</span>
<span>Powered by <a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a></span>
<span>&middot;</span>
<span>Theme <a href="https://git.io/hugopapermod" rel="noopener" target="_blank">PaperMod</a></span>
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
<a href="https://git.io/hugopapermod" rel="noopener" target="_blank">PaperMod</a>
</span>
{{- end }}
</footer>

View File

@ -58,6 +58,16 @@
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
{{- end }}
{{- with .Site.Params.profileMode }}
{{- if and .enabled .imageUrl }}
<link rel="preload" href="{{ .imageUrl }}" as="image">
{{- end }}
{{- end }}
{{- with .Site.Params.label.icon }}
<link rel="preload" href="{{ . }}" as="image">
{{- end }}
{{- /* Search */}}
{{- if (eq .Layout `search`) -}}
<link crossorigin="anonymous" rel="preload" as="fetch" href="../index.json">
@ -99,7 +109,7 @@
{{- /* RSS */}}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
<link rel="{{ .Rel }}" type="{{ .MediaType.Type | html }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
{{- range .AllTranslations -}}
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}" />

View File

@ -123,12 +123,12 @@
{{- range . -}}
{{- if ne $lang .Lang }}
<li>
<a href="{{- .Permalink -}}" title="{{ .Language.Params.languageAltTitle | default (.Language.LanguageName | emojify) | default (.Lang | humanize) }}"
aria-label="{{ .Language.LanguageName | default (.Lang | humanize) }}">
<a href="{{- .Permalink -}}" title="{{ .Language.Params.languageAltTitle | default (.Language.LanguageName | emojify) | default (.Lang | title) }}"
aria-label="{{ .Language.LanguageName | default (.Lang | title) }}">
{{- if (and $.Site.Params.displayFullLangName (.Language.LanguageName)) }}
{{- .Language.LanguageName | emojify -}}
{{- else }}
{{- .Lang | humanize -}}
{{- .Lang | title -}}
{{- end -}}
</a>
</li>

View File

@ -12,8 +12,8 @@
{{- with .buttons }}
<div class="buttons">
{{- range . }}
<a class="button" href="{{ trim .url " " }}" rel="noopener" title="{{ .name | humanize }}">
<span class="button-inner">{{ .name }}</span>
<a class="button" href="{{ trim .url " " }}" rel="noopener" title="{{ .name | title }}">
<span class="button-inner">{{ .name | title }}</span>
</a>
{{- end }}
</div>

View File

@ -1,6 +1,6 @@
<div class="social-icons">
{{- range . }}
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me" title="{{ .name | humanize }}">
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me" title="{{ .name | title }}">
{{ partial "svg.html" . }}
</a>
{{- end }}

View File

@ -29,14 +29,6 @@
<meta property="article:section" content="{{ .Section }}" />
{{ with .PublishDate }}<meta property="article:published_time" content="{{ .Format $iso8601 }}" />{{ end }}
{{ with .Lastmod }}<meta property="article:modified_time" content="{{ .Format $iso8601 }}" />{{ end }}
{{- range .Site.Authors }}
{{ with .Social.facebook }}<meta property="article:author" content="https://www.facebook.com/{{ . }}" />{{ end }}
{{ with .Site.Social.facebook }}<meta property="article:publisher" content="https://www.facebook.com/{{ . }}" />{{ end }}
{{- with .Params.tags }}{{ range first 6 . }}
<meta property="article:tag" content="{{ . }}" />
{{- end }}{{ end -}}
{{- end -}}
{{- end -}}
{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }}

View File

@ -2,7 +2,7 @@
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | humanize -}}",
"@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | title -}}",
"name": {{ .Site.Title }},
"url": {{ .Site.BaseURL }},
"description": {{ .Site.Params.description | plainify | truncate 180 | safeHTML }},
@ -105,7 +105,7 @@
"@id": {{ .Permalink | safeHTML }}
},
"publisher": {
"@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | humanize -}}",
"@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | title -}}",
"name": {{ .Site.Title }},
"logo": {
"@type": "ImageObject",

View File

@ -31,8 +31,3 @@
{{ with .Site.Social.twitter -}}
<meta name="twitter:site" content="@{{ . }}"/>
{{ end -}}
{{ range .Site.Authors }}
{{ with .twitter -}}
<meta name="twitter:creator" content="@{{ . }}"/>
{{ end -}}
{{ end -}}

View File

@ -10,7 +10,7 @@
{{- if (and $.Site.Params.displayFullLangName (.Language.LanguageName)) }}
{{- .Language.LanguageName | emojify -}}
{{- else }}
{{- .Lang | humanize -}}
{{- .Lang | title -}}
{{- end -}}
</a>
</li>