Squashed 'themes/paperesque/' content from commit 228903d

git-subtree-dir: themes/paperesque
git-subtree-split: 228903d2bad09f92d4de8a2922806fafd24d3966
This commit is contained in:
2020-10-09 23:41:57 +05:30
commit e186c5d6f7
108 changed files with 4071 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{{/* The featured image, using the same rules as what the twitter cards use. */}}
{{- with $.Params.images -}}
{{- index . 0 | absURL -}}
{{- else -}}
{{- $images := $.Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- $featured := cond (ne $featured nil) $featured ($images.GetMatch "{*cover*,*thumbnail*}") -}}
{{- with $featured -}}
{{- $featured.Permalink -}}
{{- else -}}
{{- with $.Site.Params.images -}}
{{- index . 0 | absURL -}}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,9 @@
<link rel="stylesheet" href="{{ relURL "/css/reboot.css" }}" />
<link rel="stylesheet" href="{{ relURL "/css/style.css" }}" />
<link rel="stylesheet" href="{{ relURL "/css/syntax.css" }}" />
{{ $opts := dict "targetPath" "js/main.js" "minify" true "target" "es2015" }}
{{ $mainJs := resources.Get "js/main.js" | js.Build $opts }}
<script type="text/javascript" src="{{ $mainJs.RelPermalink }}" defer></script>
<link href="https://fonts.googleapis.com/css?family=Lora&display=swap" rel="stylesheet">

View File

@@ -0,0 +1,28 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="HandheldFriendly" content="True" />
<meta name="MobileOptimized" content="320" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="apple-touch-icon" sizes="180x180" href="{{.Site.BaseURL}}/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{.Site.BaseURL}}/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{.Site.BaseURL}}/favicon-16x16.png">
<link rel="manifest" href="{{.Site.BaseURL}}/site.webmanifest">
<link rel="mask-icon" href="{{.Site.BaseURL}}/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
{{ with.Description }}<meta name="description" content="{{ . }}" />
{{ end }}
<meta name="keywords" content="{{ if .Keywords }}{{ range.Keywords }}{{ . }},
{{ end }}{{else if isset .Params "tags" }}{{ range.Params.tags }}{{ . }},
{{ end }}{{ end }}">
{{ template "_internal/opengraph.html" . }}
<meta property="og:site_name" content="{{ .Site.Title }}" />
{{ partial "twitter_cards_default_small.html" . }}
{{ template "_internal/schema.html" . }}

View File

@@ -0,0 +1,9 @@
<ul class="list-unstyled right-links">
{{ range .Site.Params.TopMenu }}
<li>
<a href="{{ .url | relURL }}">
<span class="post-title">{{ .name }}</span>
</a>
</li>
{{ end }}
</ul>

View File

View File

@@ -0,0 +1,33 @@
<article
id="main"
class="content-container look-sheet article-pad-v {{ if (or .Params.disableMarginNotes .Site.Params.disableMarginNotes) }}no-floating-footnotes{{ end }}"
itemscope
itemtype="https://schema.org/Article" >
<meta itemprop="author" content="{{ .Site.Params.Author }}" />
<meta itemprop="publisher" content="{{ .Site.Params.Author }}" />
<meta itemprop="image" content="{{ partial "feature_image" . }}" />
<h1 itemprop="name" id="title">{{ .Title }}</h1>
<meta itemprop="headline" content="{{ .Title }}" />
{{ with .Params.tags }}
<div class="post-tags">
{{ range . }}
<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">#{{ . }}</a>&nbsp;
{{ end }}
</div>
{{ end }}
{{ if .Date }}
{{ if eq .Lastmod .Date }}
<div class="post-date"><span itemprop="datePublished">{{ .Date.Format "January 2, 2006" }}</span></div>
<meta itemprop="dateModified" content="{{ .Lastmod.Format "January 2, 2006" }}"/>
{{ else }}
<div class="post-date">Created: <span itemprop="datePublished">{{ .Date.Format "January 2, 2006" }}</span></div>
<div class="post-date">Last Edited: <span itemprop="dateModified">{{ .Lastmod.Format "January 2, 2006" }}</span></div>
{{ end }}
{{ end }}
{{ if .Draft }}
<div class="post-date">{{ .WordCount }} words</div>
{{ end }}
<div itemprop="articleBody" id="content" class="article-body margin-top-2em">
{{ .Content }}
</div>
</article>

View File

@@ -0,0 +1,30 @@
{{/* This is a modified copy/paste of https://github.com/gohugoio/hugo/blob/2b73e89d6d2822e86360a6c92c87f539677c119b/tpl/tplimpl/embedded/templates/twitter_cards.html */}}
{{- with $.Params.images -}}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
{{ else -}}
{{- $images := $.Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- $featured := cond (ne $featured nil) $featured ($images.GetMatch "{*cover*,*thumbnail*}") -}}
{{- with $featured -}}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ $featured.Permalink }}"/>
{{- else -}}
{{- with $.Site.Params.images -}}
<meta name="twitter:card" content="summary"/>
<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
{{ else -}}
<meta name="twitter:card" content="summary"/>
{{- end -}}
{{- end -}}
{{- end }}
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
{{ with .Site.Social.twitter -}}
<meta name="twitter:site" content="@{{ . }}"/>
{{ end -}}
{{ range .Site.Authors }}
{{ with .twitter -}}
<meta name="twitter:creator" content="@{{ . }}"/>
{{ end -}}
{{ end -}}