we are back with 4.0
This commit is contained in:
parent
7e13d24d10
commit
0b11e05735
57 changed files with 1840 additions and 1724 deletions
|
@ -6,10 +6,10 @@
|
|||
{{ end }}
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body class="{{- ( or .Params.color $.Site.Params.ThemeColor ) -}}">
|
||||
<body>
|
||||
{{ $container := cond ($.Site.Params.FullWidthTheme | default false) "container full" (cond ($.Site.Params.CenterTheme | default false) "container center" "container") }}
|
||||
|
||||
<div class="{{- $container -}}{{- cond ($.Site.Params.oneHeadingSize | default true) " headings--one-size" "" }}">
|
||||
<div class="{{- $container -}}{{- cond ($.Site.Params.oneHeadingSize | default false) " headings--one-size" "" }}">
|
||||
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
{{ if .Params.showFullContent }}
|
||||
{{ .Content }}
|
||||
{{ else if .Description }}
|
||||
{{ .Description | markdownify }}
|
||||
<p>{{ .Description | markdownify }}</p>
|
||||
{{ else }}
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
|
@ -55,7 +55,7 @@
|
|||
|
||||
{{ if not .Params.showFullContent }}
|
||||
<div>
|
||||
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
||||
<a class="read-more button inline" href="{{ .RelPermalink }}">{{ $.Site.Params.ReadMore }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<div class="post-content">
|
||||
{{- with .Content -}}
|
||||
<div>
|
||||
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">⌗</a> ${3}` | safeHTML }}
|
||||
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">#</a> ${3}` | safeHTML }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta name="keywords" content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" />
|
||||
{{ if .Params.noindex }}
|
||||
{{ if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") }}
|
||||
<meta name="robots" content="noindex" />
|
||||
<meta name="robots" content="noindex" />
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<meta name="robots" content="noodp" />
|
||||
|
@ -13,34 +13,23 @@
|
|||
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
|
||||
{{ $defaultStyles := resources.Get "css/style.scss" }}
|
||||
<!-- Local Theme Variables -->
|
||||
{{ if and (isset .Params "color") (not (eq .Params.color "")) }}
|
||||
{{ $localColorCss := resources.Get (printf "css/color/%s.scss" .Params.color) }}
|
||||
{{ $localCss := slice $localColorCss $defaultStyles | resources.Concat (printf "css/%s-local.scss" .Params.color) }}
|
||||
{{ $localColorStyles := $localCss | resources.ToCSS }}
|
||||
<link rel="stylesheet" href="{{ $localColorStyles.Permalink }}">
|
||||
{{ else }}
|
||||
<!-- Theme Variables -->
|
||||
{{ $colorCss := resources.Get (printf "css/color/%s.scss" ($.Site.Params.ThemeColor | default "orange")) }}
|
||||
{{ $css := slice $colorCss $defaultStyles | resources.Concat "css/base.scss" }}
|
||||
{{ $options := (dict "targetPath" "styles.css" "outputStyle" "compressed" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }}
|
||||
{{ $styles := $css | resources.ToCSS $options }}
|
||||
{{ $css := resources.Match "css/*.css" }}
|
||||
{{ range $css }}
|
||||
{{ $styles := . | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.Permalink }}">
|
||||
{{ end }}
|
||||
|
||||
<!-- Custom Terminal.css styles -->
|
||||
{{ if (fileExists "static/terminal.css") -}}
|
||||
<link rel="stylesheet" href="{{ "terminal.css" | absURL }}">
|
||||
{{- end }}
|
||||
<!-- Custom CSS to override theme properties (/static/style.css) -->
|
||||
{{ if (fileExists "static/style.css") -}}
|
||||
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
|
||||
{{- end }}
|
||||
|
||||
<!-- Icons -->
|
||||
{{ if isset $.Site.Params "favicon" }}
|
||||
<link rel="shortcut icon" href="{{ $.Site.Params.favicon | absURL }}">
|
||||
{{ else }}
|
||||
<link rel="shortcut icon" href="{{ printf "img/theme-colors/%s.png" (or .Params.color $.Site.Params.ThemeColor | default "orange") | absURL }}">
|
||||
<link rel="apple-touch-icon" href="{{ printf "img/theme-colors/%s.png" (or .Params.color $.Site.Params.ThemeColor | default "orange") | absURL }}">
|
||||
{{ end }}
|
||||
<link rel="shortcut icon" href="{{ "favicon.png" | absURL }}">
|
||||
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
@ -65,11 +54,7 @@
|
|||
{{ end }}
|
||||
<meta property="og:image" content="{{ $pageCover | absURL }}">
|
||||
{{ else }}
|
||||
{{ if isset $.Site.Params "favicon" }}
|
||||
<meta property="og:image" content="{{ $.Site.Params.favicon | absURL }}">
|
||||
{{ else }}
|
||||
<meta property="og:image" content="{{ printf "img/favicon/%s.png" $.Site.Params.ThemeColor | absURL }}">
|
||||
{{ end }}
|
||||
<meta property="og:image" content="{{ "og-image.png" | absURL }}">
|
||||
{{ end }}
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="627">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="pagination">
|
||||
<div class="pagination__buttons">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a href="{{ .Paginator.Prev.URL }}" class="button previous">
|
||||
<a href="{{ .Paginator.Prev.URL }}" class="button prev">
|
||||
<span class="button__icon">←</span>
|
||||
<span class="button__text">{{ $.Site.Params.newerPosts | default "Newer posts" }}</span>
|
||||
</a>
|
||||
|
|
|
@ -1,26 +1,23 @@
|
|||
{{ if or .NextInSection .PrevInSection }}
|
||||
<div class="pagination">
|
||||
<div class="pagination__title">
|
||||
<span class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="pagination__buttons">
|
||||
{{ if .NextInSection }}
|
||||
<span class="button previous">
|
||||
<a href="{{ .NextInSection.Permalink }}">
|
||||
<span class="button__icon">←</span>
|
||||
<span class="button__text">{{ .NextInSection.Title }}</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ if .PrevInSection }}
|
||||
<span class="button next">
|
||||
<a href="{{ .PrevInSection.Permalink }}">
|
||||
<span class="button__text">{{ .PrevInSection.Title }}</span>
|
||||
<span class="button__icon">→</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="pagination__title">
|
||||
<span class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="pagination__buttons">
|
||||
{{ if .NextInSection }}
|
||||
<a href="{{ .NextInSection.Permalink }}" class="button inline prev">
|
||||
{{ .NextInSection.Title }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if and .NextInSection .PrevInSection }}
|
||||
::
|
||||
{{ end }}
|
||||
{{ if .PrevInSection }}
|
||||
<a href="{{ .PrevInSection.Permalink }}" class="button inline next">
|
||||
{{ .PrevInSection.Title }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue