Commit basic working example
This commit is contained in:
parent
823c0190bb
commit
f670020674
3
assets/css/style.min.css
vendored
3
assets/css/style.min.css
vendored
File diff suppressed because one or more lines are too long
@ -17,24 +17,10 @@
|
|||||||
|
|
||||||
<meta name="theme-color" content="#7952b3">
|
<meta name="theme-color" content="#7952b3">
|
||||||
|
|
||||||
<style>
|
{{ "<!-- RSS 2.0 feed -->" | safeHTML }}
|
||||||
.bd-placeholder-img {
|
{{ with .OutputFormats.Get "rss" -}}
|
||||||
font-size: 1.125rem;
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||||
text-anchor: middle;
|
{{ end -}}
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
.bd-placeholder-img-lg {
|
|
||||||
font-size: 3.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<!-- Custom styles for this template -->
|
|
||||||
<link href="https://fonts.googleapis.com/css?family=Playfair+Display:700,900&display=swap" rel="stylesheet">
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
@ -74,169 +60,24 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main class="container">
|
<main class="container">
|
||||||
<div class="p-4 p-md-5 mb-4 text-white rounded bg-dark">
|
|
||||||
<div class="col-md-6 px-0">
|
{{ block "body" . }}
|
||||||
<h1 class="display-4 font-italic">Title of a longer featured blog post</h1>
|
|
||||||
<p class="lead my-3">Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s contents.</p>
|
|
||||||
<p class="lead mb-0"><a href="#" class="text-white fw-bold">Continue reading...</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ block "main" . }}
|
{{ block "main" . }}
|
||||||
<!-- The part of the page that begins to differ between templates -->
|
<!-- The part of the page that begins to differ between templates -->
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="row mb-2">
|
{{ partialCached "sidebar.html" . }}
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative">
|
|
||||||
<div class="col p-4 d-flex flex-column position-static">
|
|
||||||
<strong class="d-inline-block mb-2 text-primary">World</strong>
|
|
||||||
<h3 class="mb-0">Featured post</h3>
|
|
||||||
<div class="mb-1 text-muted">Nov 12</div>
|
|
||||||
<p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p>
|
|
||||||
<a href="#" class="stretched-link">Continue reading</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-auto d-none d-lg-block">
|
|
||||||
<svg class="bd-placeholder-img" width="200" height="250" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder: Thumbnail" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#55595c"/><text x="50%" y="50%" fill="#eceeef" dy=".3em">Thumbnail</text></svg>
|
|
||||||
|
|
||||||
</div>
|
</div>{{ "<!-- /.row -->" | safeHTML }}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative">
|
|
||||||
<div class="col p-4 d-flex flex-column position-static">
|
|
||||||
<strong class="d-inline-block mb-2 text-success">Design</strong>
|
|
||||||
<h3 class="mb-0">Post title</h3>
|
|
||||||
<div class="mb-1 text-muted">Nov 11</div>
|
|
||||||
<p class="mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p>
|
|
||||||
<a href="#" class="stretched-link">Continue reading</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-auto d-none d-lg-block">
|
|
||||||
<svg class="bd-placeholder-img" width="200" height="250" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder: Thumbnail" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#55595c"/><text x="50%" y="50%" fill="#eceeef" dy=".3em">Thumbnail</text></svg>
|
|
||||||
|
|
||||||
</div>
|
{{ end }}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<h3 class="pb-4 mb-4 font-italic border-bottom">
|
|
||||||
From the Firehose
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<article class="blog-post">
|
|
||||||
<h2 class="blog-post-title">Sample blog post</h2>
|
|
||||||
<p class="blog-post-meta">January 1, 2014 by <a href="#">Mark</a></p>
|
|
||||||
|
|
||||||
<p>This blog post shows a few different types of content that’s supported and styled with Bootstrap. Basic typography, images, and code are all supported.</p>
|
|
||||||
<hr>
|
|
||||||
<p>Cum sociis natoque penatibus et magnis <a href="#">dis parturient montes</a>, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Sed posuere consectetur est at lobortis. Cras mattis consectetur purus sit amet fermentum.</p>
|
|
||||||
<blockquote>
|
|
||||||
<p>Curabitur blandit tempus porttitor. <strong>Nullam quis risus eget urna mollis</strong> ornare vel eu leo. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
|
||||||
</blockquote>
|
|
||||||
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
|
|
||||||
<h2>Heading</h2>
|
|
||||||
<p>Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
|
|
||||||
<h3>Sub-heading</h3>
|
|
||||||
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
|
|
||||||
<pre><code>Example code block</code></pre>
|
|
||||||
<p>Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa.</p>
|
|
||||||
<h3>Sub-heading</h3>
|
|
||||||
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
|
|
||||||
<ul>
|
|
||||||
<li>Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</li>
|
|
||||||
<li>Donec id elit non mi porta gravida at eget metus.</li>
|
|
||||||
<li>Nulla vitae elit libero, a pharetra augue.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Donec ullamcorper nulla non metus auctor fringilla. Nulla vitae elit libero, a pharetra augue.</p>
|
|
||||||
<ol>
|
|
||||||
<li>Vestibulum id ligula porta felis euismod semper.</li>
|
|
||||||
<li>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</li>
|
|
||||||
<li>Maecenas sed diam eget risus varius blandit sit amet non magna.</li>
|
|
||||||
</ol>
|
|
||||||
<p>Cras mattis consectetur purus sit amet fermentum. Sed posuere consectetur est at lobortis.</p>
|
|
||||||
</article><!-- /.blog-post -->
|
|
||||||
|
|
||||||
<article class="blog-post">
|
|
||||||
<h2 class="blog-post-title">Another blog post</h2>
|
|
||||||
<p class="blog-post-meta">December 23, 2013 by <a href="#">Jacob</a></p>
|
|
||||||
|
|
||||||
<p>Cum sociis natoque penatibus et magnis <a href="#">dis parturient montes</a>, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Sed posuere consectetur est at lobortis. Cras mattis consectetur purus sit amet fermentum.</p>
|
|
||||||
<blockquote>
|
|
||||||
<p>Curabitur blandit tempus porttitor. <strong>Nullam quis risus eget urna mollis</strong> ornare vel eu leo. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
|
||||||
</blockquote>
|
|
||||||
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
|
|
||||||
<p>Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
|
|
||||||
</article><!-- /.blog-post -->
|
|
||||||
|
|
||||||
<article class="blog-post">
|
|
||||||
<h2 class="blog-post-title">New feature</h2>
|
|
||||||
<p class="blog-post-meta">December 14, 2013 by <a href="#">Chris</a></p>
|
|
||||||
|
|
||||||
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
|
|
||||||
<ul>
|
|
||||||
<li>Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</li>
|
|
||||||
<li>Donec id elit non mi porta gravida at eget metus.</li>
|
|
||||||
<li>Nulla vitae elit libero, a pharetra augue.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
|
|
||||||
<p>Donec ullamcorper nulla non metus auctor fringilla. Nulla vitae elit libero, a pharetra augue.</p>
|
|
||||||
</article><!-- /.blog-post -->
|
|
||||||
|
|
||||||
<nav class="blog-pagination" aria-label="Pagination">
|
|
||||||
<a class="btn btn-outline-primary" href="#">Older</a>
|
|
||||||
<a class="btn btn-outline-secondary disabled" href="#" tabindex="-1" aria-disabled="true">Newer</a>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="p-4 mb-3 bg-light rounded">
|
|
||||||
<h4 class="font-italic">About</h4>
|
|
||||||
<p class="mb-0">Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-4">
|
|
||||||
<h4 class="font-italic">Archives</h4>
|
|
||||||
<ol class="list-unstyled mb-0">
|
|
||||||
<li><a href="#">March 2014</a></li>
|
|
||||||
<li><a href="#">February 2014</a></li>
|
|
||||||
<li><a href="#">January 2014</a></li>
|
|
||||||
<li><a href="#">December 2013</a></li>
|
|
||||||
<li><a href="#">November 2013</a></li>
|
|
||||||
<li><a href="#">October 2013</a></li>
|
|
||||||
<li><a href="#">September 2013</a></li>
|
|
||||||
<li><a href="#">August 2013</a></li>
|
|
||||||
<li><a href="#">July 2013</a></li>
|
|
||||||
<li><a href="#">June 2013</a></li>
|
|
||||||
<li><a href="#">May 2013</a></li>
|
|
||||||
<li><a href="#">April 2013</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-4">
|
|
||||||
<h4 class="font-italic">Elsewhere</h4>
|
|
||||||
<ol class="list-unstyled">
|
|
||||||
<li><a href="#">GitHub</a></li>
|
|
||||||
<li><a href="#">Twitter</a></li>
|
|
||||||
<li><a href="#">Facebook</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div><!-- /.row -->
|
|
||||||
|
|
||||||
</main><!-- /.container -->
|
|
||||||
|
|
||||||
<footer class="blog-footer">
|
|
||||||
<p>Blog template built for <a href="https://getbootstrap.com/">Bootstrap</a> by <a href="https://twitter.com/mdo">@mdo</a>.</p>
|
|
||||||
<p>
|
|
||||||
<a href="#">Back to top</a>
|
|
||||||
</p>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
|
</main>{{ "<!-- /.container -->" | safeHTML }}
|
||||||
|
|
||||||
|
{{ partialCached "footer.html" . }}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
{{- /* vim: set ts=2 sw=2 et: */}}
|
||||||
|
109
layouts/_default/home.html
Normal file
109
layouts/_default/home.html
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
{{ define "title" }}{{ .Site.Title }}{{ end }}
|
||||||
|
|
||||||
|
{{ define "schema-dot-org" }}
|
||||||
|
<script type="application/ld+json">
|
||||||
|
{
|
||||||
|
"@context": "http://schema.org",
|
||||||
|
"@type": "Blog",
|
||||||
|
{{- /* Google recommends the headline be no more than 110 characters */}}
|
||||||
|
"headline": {{ substr .Site.Title 0 110 }},
|
||||||
|
"url" : {{ printf "%s" .Permalink }},
|
||||||
|
"author": {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": {{ .Site.Params.author }}
|
||||||
|
},
|
||||||
|
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
||||||
|
{{- if not .Date.IsZero }}
|
||||||
|
"dateModified": {{ .Date.Format $ISO8601 }},
|
||||||
|
{{- end }}
|
||||||
|
{{- /* all of the site's categories/tags, from Hugo's tpl/template_embedded.go */}}
|
||||||
|
{{- $keywords := slice }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ $keywords = $keywords | append $term }}{{ end }}{{ end }}
|
||||||
|
"keywords": {{ delimit $keywords ", " }}
|
||||||
|
{{- with .Site.Params.description -}}
|
||||||
|
,
|
||||||
|
"description": {{- . -}}
|
||||||
|
{{- end }}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "main" }}
|
||||||
|
{{ $dateFormat := default "Mon Jan 2, 2006" (index .Site.Params "date_format") }}
|
||||||
|
|
||||||
|
{{ partial "featured.html" . }}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<h3 class="pb-4 mb-4 font-italic border-bottom">
|
||||||
|
From the Firehose
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<article class="blog-post">
|
||||||
|
<h2 class="blog-post-title">Sample blog post</h2>
|
||||||
|
<p class="blog-post-meta">January 1, 2014 by <a href="#">Mark</a></p>
|
||||||
|
|
||||||
|
<p>This blog post shows a few different types of content that’s supported and styled with Bootstrap. Basic typography, images, and code are all supported.</p>
|
||||||
|
<hr>
|
||||||
|
<p>Cum sociis natoque penatibus et magnis <a href="#">dis parturient montes</a>, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Sed posuere consectetur est at lobortis. Cras mattis consectetur purus sit amet fermentum.</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>Curabitur blandit tempus porttitor. <strong>Nullam quis risus eget urna mollis</strong> ornare vel eu leo. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
|
||||||
|
<h2>Heading</h2>
|
||||||
|
<p>Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
|
||||||
|
<h3>Sub-heading</h3>
|
||||||
|
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
|
||||||
|
<pre><code>Example code block</code></pre>
|
||||||
|
<p>Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa.</p>
|
||||||
|
<h3>Sub-heading</h3>
|
||||||
|
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
|
||||||
|
<ul>
|
||||||
|
<li>Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</li>
|
||||||
|
<li>Donec id elit non mi porta gravida at eget metus.</li>
|
||||||
|
<li>Nulla vitae elit libero, a pharetra augue.</li>
|
||||||
|
</ul>
|
||||||
|
<p>Donec ullamcorper nulla non metus auctor fringilla. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
<ol>
|
||||||
|
<li>Vestibulum id ligula porta felis euismod semper.</li>
|
||||||
|
<li>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</li>
|
||||||
|
<li>Maecenas sed diam eget risus varius blandit sit amet non magna.</li>
|
||||||
|
</ol>
|
||||||
|
<p>Cras mattis consectetur purus sit amet fermentum. Sed posuere consectetur est at lobortis.</p>
|
||||||
|
</article>{{ "<!-- /.blog-post -->" | safeHTML }}
|
||||||
|
|
||||||
|
<article class="blog-post">
|
||||||
|
<h2 class="blog-post-title">Another blog post</h2>
|
||||||
|
<p class="blog-post-meta">December 23, 2013 by <a href="#">Jacob</a></p>
|
||||||
|
|
||||||
|
<p>Cum sociis natoque penatibus et magnis <a href="#">dis parturient montes</a>, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Sed posuere consectetur est at lobortis. Cras mattis consectetur purus sit amet fermentum.</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>Curabitur blandit tempus porttitor. <strong>Nullam quis risus eget urna mollis</strong> ornare vel eu leo. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
|
||||||
|
<p>Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
|
||||||
|
</article>{{ "<!-- /.blog-post -->" | safeHTML }}
|
||||||
|
|
||||||
|
<article class="blog-post">
|
||||||
|
<h2 class="blog-post-title">New feature</h2>
|
||||||
|
<p class="blog-post-meta">December 14, 2013 by <a href="#">Chris</a></p>
|
||||||
|
|
||||||
|
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
|
||||||
|
<ul>
|
||||||
|
<li>Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</li>
|
||||||
|
<li>Donec id elit non mi porta gravida at eget metus.</li>
|
||||||
|
<li>Nulla vitae elit libero, a pharetra augue.</li>
|
||||||
|
</ul>
|
||||||
|
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
|
||||||
|
<p>Donec ullamcorper nulla non metus auctor fringilla. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
</article>{{ "<!-- /.blog-post -->" | safeHTML }}
|
||||||
|
|
||||||
|
<nav class="blog-pagination" aria-label="Pagination">
|
||||||
|
<a class="btn btn-outline-primary" href="#">Older</a>
|
||||||
|
<a class="btn btn-outline-secondary disabled" href="#" tabindex="-1" aria-disabled="true">Newer</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- /* vim: set ts=2 sw=2 et: */}}
|
46
layouts/_default/list.html
Normal file
46
layouts/_default/list.html
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{{ define "schema-dot-org" }}
|
||||||
|
<script type="application/ld+json">
|
||||||
|
{
|
||||||
|
"@context": "http://schema.org",
|
||||||
|
"@type": "Blog",
|
||||||
|
{{- /* Google recommends the headline be no more than 110 characters */}}
|
||||||
|
"headline": {{ substr .Site.Title 0 110 }},
|
||||||
|
"url" : {{ printf "%s" .Permalink }},
|
||||||
|
"author": {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": {{ .Site.Params.author }}
|
||||||
|
},
|
||||||
|
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
||||||
|
{{- if not .Date.IsZero }}
|
||||||
|
"dateModified": {{ .Date.Format $ISO8601 }},
|
||||||
|
{{- end }}
|
||||||
|
{{- /* all of the site's categories/tags, from Hugo's tpl/template_embedded.go */}}
|
||||||
|
{{- $keywords := slice }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ $keywords = $keywords | append $term }}{{ end }}{{ end }}
|
||||||
|
"keywords": {{ delimit $keywords ", " }}
|
||||||
|
{{- with .Site.Params.description -}}
|
||||||
|
,
|
||||||
|
"description": {{- . -}}
|
||||||
|
{{- end }}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "main" }}
|
||||||
|
|
||||||
|
{{ $truncate := default true .Site.Params.truncate }}
|
||||||
|
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
|
||||||
|
{{ range $paginator.Pages }}
|
||||||
|
{{ if $truncate }}
|
||||||
|
{{ .Render "summary" }}
|
||||||
|
{{ else }}
|
||||||
|
{{ .Render "content" }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||||
|
{{ partial "pagination.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- /* vim: set ts=2 sw=2 et: */}}
|
77
layouts/_default/single.html
Normal file
77
layouts/_default/single.html
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
{{ define "title" }}{{ .Title | markdownify }} | {{ .Site.Title }}{{ end }}
|
||||||
|
|
||||||
|
{{ define "schema-dot-org" }}
|
||||||
|
<script type="application/ld+json">
|
||||||
|
{
|
||||||
|
"@context": "http://schema.org",
|
||||||
|
"@type": "BlogPosting",
|
||||||
|
{{- /* Google recommends the headline be no more than 110 characters */}}
|
||||||
|
"headline": {{ substr .Title 0 110 }},
|
||||||
|
{{- with .Params.images -}}{{- range first 1 . -}}
|
||||||
|
{{/* try to get the image from the page bundle */}}
|
||||||
|
{{- with $.Page.Resources.GetMatch (printf "*%s*" .) }}
|
||||||
|
"image": {
|
||||||
|
"@type": "ImageObject",
|
||||||
|
"url": {{ .Permalink }},
|
||||||
|
"height": "{{ .Height }}",
|
||||||
|
"width": "{{ .Width }}"
|
||||||
|
{{/* otherwise, get the image from static */}}
|
||||||
|
{{- else }}
|
||||||
|
"image": {
|
||||||
|
"@type": "ImageObject",
|
||||||
|
{{- $image := . -}}
|
||||||
|
{{- /* Don't try to get imageConfig if image param is not local */ -}}
|
||||||
|
{{- if not (or (hasPrefix . "http://") (hasPrefix . "https://")) -}}
|
||||||
|
{{- with (imageConfig (printf "/static/%s" .)) }}
|
||||||
|
"url": {{ $image | absURL }},
|
||||||
|
"height": "{{ .Height }}",
|
||||||
|
"width": "{{ .Width }}"
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{ end }}
|
||||||
|
},
|
||||||
|
{{- end -}}{{ end }}
|
||||||
|
"url": {{ printf "%s" .Permalink }},
|
||||||
|
"wordCount": "{{ .WordCount }}",
|
||||||
|
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
||||||
|
{{- if not .PublishDate.IsZero }}
|
||||||
|
"datePublished": {{ .PublishDate.Format $ISO8601 }},
|
||||||
|
{{- else }}
|
||||||
|
"datePublished": {{ .Date.Format $ISO8601 }},
|
||||||
|
{{- end }}
|
||||||
|
{{- if not .Lastmod.IsZero }}
|
||||||
|
"dateModified": {{ .Lastmod.Format $ISO8601 }},
|
||||||
|
{{- end }}
|
||||||
|
"author": {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": {{ .Params.author | default .Site.Params.author }}
|
||||||
|
}
|
||||||
|
{{- if or (.Params.keywords) (or (.Params.categories) (.Params.tags)) -}}
|
||||||
|
,
|
||||||
|
"keywords": {{ delimit (union .Params.keywords (union .Params.categories .Params.tags)) ", " }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- with .Params.description -}}
|
||||||
|
,
|
||||||
|
"description": {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "main" }}
|
||||||
|
{{ $dateFormat := default "Mon Jan 2, 2006" (index .Site.Params "date_format") }}
|
||||||
|
|
||||||
|
<article class="blog-post">
|
||||||
|
<h2 class="blog-post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
||||||
|
<p class="blog-post-meta">{{ if not .PublishDate.IsZero }}<time {{ .Date.Format "2006-01-02T15:04:05Z07:00" | printf "datetime=%q" | safeHTMLAttr }}>{{ .Date.Format $dateFormat }}</time>{{ end }}
|
||||||
|
{{ if or (.Params.categories) (.Params.tags) }} in {{ partial "meta-terms.html" . }}{{ end }}</p>
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
</article>{{ "<!-- /.blog-post -->" | safeHTML }}
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- /* vim: set ts=2 sw=2 et: */}}
|
12
layouts/_default/summary.html
Normal file
12
layouts/_default/summary.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{{ $dateFormat := default "Mon Jan 2, 2006" (index .Site.Params "date_format") }}
|
||||||
|
|
||||||
|
<article class="blog-post">
|
||||||
|
<header>
|
||||||
|
<h2 class="blog-post-title" dir="auto"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
||||||
|
<p class="blog-post-meta"><time {{ .Date.Format "2006-01-02T15:04:05Z07:00" | printf "datetime=%q" | safeHTMLAttr }}>{{ .Date.Format $dateFormat }}</time> by {{ .Params.author | default .Site.Params.author }}{{ if or (.Params.categories) (.Params.tags) }} in {{ partial "meta-terms.html" . }}{{ end }}</p>
|
||||||
|
</header>
|
||||||
|
{{ .Summary }}
|
||||||
|
<a href='{{ .Permalink }}'>Continue reading...</a>
|
||||||
|
</article> <!-- /.blog-post -->
|
||||||
|
|
||||||
|
{{- /* vim: set ts=2 sw=2 et: */}}
|
18
layouts/_default/taxonomy.html
Normal file
18
layouts/_default/taxonomy.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
|
||||||
|
{{ $truncate := default true .Site.Params.truncate }}
|
||||||
|
{{ range .Paginator.Pages }}
|
||||||
|
{{ if $truncate }}
|
||||||
|
{{ .Render "summary" }}
|
||||||
|
{{ else }}
|
||||||
|
{{ .Render "content" }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||||
|
{{ partial "pagination.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- /* vim: set ts=2 sw=2 et: */}}
|
45
layouts/partials/featured.html
Normal file
45
layouts/partials/featured.html
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{{ $dateFormat := default "Mon Jan 2, 2006" (index .Site.Params "date_format") }}
|
||||||
|
|
||||||
|
<div class="p-4 p-md-5 mb-4 text-white rounded bg-dark">
|
||||||
|
<div class="col-md-6 px-0">
|
||||||
|
<h1 class="display-4 font-italic">Title of a longer featured blog post</h1>
|
||||||
|
<p class="lead my-3">Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s contents.</p>
|
||||||
|
<p class="lead mb-0"><a href="#" class="text-white fw-bold">Continue reading...</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-2">
|
||||||
|
{{ range first 2 (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) | shuffle }}
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-300 position-relative">
|
||||||
|
<div class="col p-4 d-flex flex-column position-static">
|
||||||
|
<strong class="d-inline-block mb-2 text-primary">World</strong>
|
||||||
|
<h3 class="mb-0">{{ .Title }}</h3>
|
||||||
|
<div class="mb-1 text-muted">{{ if not .PublishDate.IsZero }}<time {{ .Date.Format "2006-01-02T15:04:05Z07:00" | printf "datetime=%q" | safeHTMLAttr }}>{{ .Date.Format $dateFormat }}</time>{{ end }}</div>
|
||||||
|
<p class="card-text mb-auto">{{ substr .Description 0 110 }}</p>
|
||||||
|
<a href="{{ .Permalink }}" class="stretched-link">Continue reading</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto d-none d-lg-block">
|
||||||
|
{{ range first 1 (.Resources.ByType "image") }}
|
||||||
|
{{/* get a local variable for the image because we will change context below */}}
|
||||||
|
{{ $image := . }}
|
||||||
|
{{/* set orientation to 1 just in case it doesnt exist in Exif */}}
|
||||||
|
{{ $orientation := 1 }}
|
||||||
|
{{ with .Exif }}
|
||||||
|
{{ $orientation = .Tags.Orientation }}
|
||||||
|
{{ if eq $orientation 8 }}
|
||||||
|
{{/* Rotate image before cropping because Hugo's "Smart" cropping crops differently if we do it at the same time as .Fill with a rotation) and use 2x dimensions to keep the thumbnail crisp */}}
|
||||||
|
{{ $RotatedImage := $image.Resize "480x600 r90" }}
|
||||||
|
<img src={{ ($RotatedImage.Fill "480x600").RelPermalink }} width="240" height="300" />
|
||||||
|
{{ else }}
|
||||||
|
<img src={{ ($image.Fill "480x600").RelPermalink }} width="240" height="300" />
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{- /* vim: set ts=2 sw=2 et: */}}
|
10
layouts/partials/footer.html
Normal file
10
layouts/partials/footer.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<footer class="blog-footer">
|
||||||
|
{{ if .Site.Copyright }}
|
||||||
|
{{ .Site.Copyright | markdownify }}
|
||||||
|
{{ else }}
|
||||||
|
<p>Blog template built for <a href="https://getbootstrap.com/">Bootstrap</a> by <a href="https://twitter.com/mdo">@mdo</a>, ported to Hugo by <a href='https://twitter.com/mralanorth'>@mralanorth</a>.</p>
|
||||||
|
{{ end }}
|
||||||
|
<p>
|
||||||
|
<a href="#">Back to top</a>
|
||||||
|
</p>
|
||||||
|
</footer>
|
21
layouts/partials/head-meta.html
Normal file
21
layouts/partials/head-meta.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
{{ template "_internal/opengraph.html" . }}
|
||||||
|
{{ template "_internal/twitter_cards.html" . }}
|
||||||
|
|
||||||
|
{{- with .Site.Params.google_verify_meta -}}
|
||||||
|
<meta name="google-site-verification" content="{{ . }}" />
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- with .Site.Params.bing_verify_meta -}}
|
||||||
|
<meta name="msvalidate.01" content="{{ . }}" />
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- with .Site.Params.yandex_verify_meta -}}
|
||||||
|
<meta name="yandex-verification" content="{{ . }}" />
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- .Site.Hugo.Generator -}}
|
||||||
|
|
||||||
|
{{- /* vim: set ts=2 sw=2 et: */}}
|
8
layouts/partials/meta-terms.html
Normal file
8
layouts/partials/meta-terms.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{{ if .Params.categories }}
|
||||||
|
{{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}/" rel="category tag">{{ . }}</a>{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Params.tags }}
|
||||||
|
{{ range $index, $tag := .Params.tags }}{{ if gt $index 0 }}, {{ end }}<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}/" rel="tag">{{ . }}</a>{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- /* vim: set ts=2 sw=2 et: */}}
|
16
layouts/partials/pagination.html
Normal file
16
layouts/partials/pagination.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<nav class="blog-pagination">
|
||||||
|
{{ if and (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||||
|
<a class="btn btn-outline-primary" href="{{ .Paginator.Prev.URL }}" rel="prev" role="button">Older</a>
|
||||||
|
<a class="btn btn-outline-primary" href="{{ .Paginator.Next.URL }}" rel="next" role="button">Newer</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ if and (.Paginator.HasPrev) (not .Paginator.HasNext) }}
|
||||||
|
<a class="btn btn-outline-primary" href="{{ .Paginator.Prev.URL }}" rel="prev" role="button">Older</a>
|
||||||
|
<a class="btn btn-outline-primary disabled" href="#" role="button" aria-disabled="true">Newer</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ if and (not .Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||||
|
<a class="btn btn-outline-primary disabled" href="#" role="button" aria-disabled="true">Older</a>
|
||||||
|
<a class="btn btn-outline-primary" href="{{ .Paginator.Next.URL }}" rel="next" role="button">Newer</a>
|
||||||
|
{{ end }}
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{{- /* vim: set ts=2 sw=2 et: */}}
|
9
layouts/partials/recent.html
Normal file
9
layouts/partials/recent.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<div class="p-4">
|
||||||
|
<h4 class="font-italic">Archives</h4>
|
||||||
|
<ol class="list-unstyled mb-0">
|
||||||
|
{{ $num_recent_posts := (index .Site.Params.sidebar "num_recent_posts" | default 5) }}
|
||||||
|
{{ range first $num_recent_posts (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
|
||||||
|
<li><a href="{{.RelPermalink}}">{{.Title | markdownify }}</a></li>
|
||||||
|
{{ end }}
|
||||||
|
</ol>
|
||||||
|
</div>
|
25
layouts/partials/sidebar.html
Normal file
25
layouts/partials/sidebar.html
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<div class="col-md-4">
|
||||||
|
{{ if and (.Site.Params.sidebar) (isset .Site.Params.sidebar "about") }}
|
||||||
|
<div class="p-4 mb-3 bg-light rounded">
|
||||||
|
<h4 class="font-italic">About</h4>
|
||||||
|
<p class="mb-0">{{ .Site.Params.sidebar.about | markdownify }}</p>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.sidebar }}
|
||||||
|
{{ partialCached "recent.html" .}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with .Site.Menus.sidebar }}
|
||||||
|
<div class="p-4">
|
||||||
|
<h4 class="font-italic">Elsewhere</h4>
|
||||||
|
<ol class="list-unstyled">
|
||||||
|
{{ range . }}
|
||||||
|
<li><a href="{{ .URL | absURL }}">{{ .Name }}</a></li>
|
||||||
|
{{ end }}
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{- /* vim: set ts=2 sw=2 et: */}}
|
3
layouts/robots.txt
Normal file
3
layouts/robots.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Sitemap: {{ "sitemap.xml" | absURL }}
|
||||||
|
|
||||||
|
User-agent: *
|
92
layouts/shortcodes/figure.html
Normal file
92
layouts/shortcodes/figure.html
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
{{/*
|
||||||
|
|
||||||
|
figure with auto-resizing and srcset v2020-11-30
|
||||||
|
|
||||||
|
Drop-in replacement for Hugo's figure shortcode as of 2020-05-02 that uses img srcset
|
||||||
|
to enable browsers to download only the resolution that they need.
|
||||||
|
|
||||||
|
The resizing and srcset magic only works for images that are part of the page
|
||||||
|
bundle. It will fall back to stock Hugo figure behaviour otherwise.
|
||||||
|
|
||||||
|
Improvements that were initially out of reach of my Hugo template programming "skills"
|
||||||
|
but have now been taken care of:
|
||||||
|
- [x] gracefully handle images that are not in page bundle, i.e. no image processing available
|
||||||
|
- [x] use a single configurable sizes array, and derive everything from there
|
||||||
|
|
||||||
|
See https://cpbotha.net/2020/05/02/drop-in-replacement-for-hugo-figure-shortcode-with-img-srcset-support/
|
||||||
|
|
||||||
|
- original srcset img shortcode from: https://laurakalbag.com/processing-responsive-images-with-hugo/
|
||||||
|
- original hugo figure shortcode from: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/shortcodes/figure.html
|
||||||
|
- no unnecessary resizes and more nudges by Stéfan van der Walt https://mentat.za.net/
|
||||||
|
- mashing together and srcset logic fixes by Charl P. Botha https://cpbotha.net/
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
- 2020-11-30 handle images that are rotated 90 degrees (should handle more eventually)
|
||||||
|
- 2020-05-10 fall back to stock Hugo behaviour when no page bundle found
|
||||||
|
- 2020-05-04 no unnecessary resizes, sizes in array
|
||||||
|
- 2020-05-02 initial release
|
||||||
|
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{/* hugo will resize to all of these sizes that are smaller than your original. configure if you like! */}}
|
||||||
|
{{ $sizes := (slice "480" "800" "1200" "1500") }}
|
||||||
|
|
||||||
|
{{/* get file that matches the filename as specified as src="" in shortcode */}}
|
||||||
|
{{ $src := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
|
||||||
|
|
||||||
|
<figure{{ with .Get "class" }} class="{{ . }}"{{ end }}>
|
||||||
|
{{- if .Get "link" -}}
|
||||||
|
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
|
||||||
|
{{- end }}
|
||||||
|
<img
|
||||||
|
{{ if $src }}
|
||||||
|
sizes="(min-width: 35em) 1200px, 100vw"
|
||||||
|
{{/* only srcset images smaller than or equal to the src (original) image size, as Hugo will upscale small images */}}
|
||||||
|
srcset='
|
||||||
|
{{ range $sizes }}
|
||||||
|
{{ $size := . }}
|
||||||
|
{{/* https://discourse.gohugo.io/t/image-exif-orientation/22902/7 */}}
|
||||||
|
{{/* set orientation to 1 just in case it doesnt exist in Exif */}}
|
||||||
|
{{ $orientation := 1 }}
|
||||||
|
{{ with $src.Exif }}
|
||||||
|
{{ $orientation := .Tags.Orientation }}
|
||||||
|
{{ if and (ge $src.Width $size) (eq $orientation 8) }}
|
||||||
|
{{ ($src.Resize (printf "%sx r90" $size)).Permalink }} {{ (printf "%sw" $size) }},
|
||||||
|
{{ else if ge $src.Width $size }}{{ ($src.Resize (printf "%sx" $size)).Permalink }} {{ (printf "%sw" $size) }},{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}'
|
||||||
|
|
||||||
|
{{/* when no support for srcset (old browsers, RSS), we load small (800px) */}}
|
||||||
|
{{/* if image smaller than 800, then load the image itself */}}
|
||||||
|
{{ if ge $src.Width "800" }}src="{{ ($src.Resize "800x").Permalink }}"
|
||||||
|
{{ else }}src="{{ $src.Permalink }}"
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ else }}
|
||||||
|
{{/* fall back to stock hugo behaviour when image is not available in bundle */}}
|
||||||
|
src="{{ .Get "src" }}"
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- if or (.Get "alt") (.Get "caption") }}
|
||||||
|
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
|
||||||
|
{{- end -}}
|
||||||
|
{{- with .Get "width" }} width="{{ . }}"{{ end -}}
|
||||||
|
{{- with .Get "height" }} height="{{ . }}"{{ end -}}
|
||||||
|
/> <!-- Closing img tag -->
|
||||||
|
{{- if .Get "link" }}</a>{{ end -}}
|
||||||
|
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
||||||
|
<figcaption>
|
||||||
|
{{ with (.Get "title") -}}
|
||||||
|
<h4>{{ . }}</h4>
|
||||||
|
{{- end -}}
|
||||||
|
{{- if or (.Get "caption") (.Get "attr") -}}<p>
|
||||||
|
{{- .Get "caption" | markdownify -}}
|
||||||
|
{{- with .Get "attrlink" }}
|
||||||
|
<a href="{{ . }}">
|
||||||
|
{{- end -}}
|
||||||
|
{{- .Get "attr" | markdownify -}}
|
||||||
|
{{- if .Get "attrlink" }}</a>{{ end }}</p>
|
||||||
|
{{- end }}
|
||||||
|
</figcaption>
|
||||||
|
{{- end }}
|
||||||
|
</figure>
|
21
source/scss/fonts.scss
Normal file
21
source/scss/fonts.scss
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/* playfair-display-700 - latin */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Playfair Display';
|
||||||
|
font-display: swap;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
src: local(''),
|
||||||
|
url('../fonts/playfair-display-v21-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
||||||
|
url('../fonts/playfair-display-v21-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* playfair-display-900 - latin */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Playfair Display';
|
||||||
|
font-display: swap;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
src: local(''),
|
||||||
|
url('../fonts/playfair-display-v21-latin-900.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
||||||
|
url('../fonts/playfair-display-v21-latin-900.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
|
}
|
@ -2,5 +2,9 @@
|
|||||||
// see: node_modules/bootstrap/scss/bootstrap.scss
|
// see: node_modules/bootstrap/scss/bootstrap.scss
|
||||||
@import 'bootstrap';
|
@import 'bootstrap';
|
||||||
|
|
||||||
|
// self-hosted Playfair font
|
||||||
|
// see: https://medium.com/clio-calliope/making-google-fonts-faster-aadf3c02a36d
|
||||||
|
@import 'fonts';
|
||||||
|
|
||||||
// local style overrides
|
// local style overrides
|
||||||
@import 'main';
|
@import 'main';
|
||||||
|
BIN
static/fonts/playfair-display-v21-latin-700.woff
Normal file
BIN
static/fonts/playfair-display-v21-latin-700.woff
Normal file
Binary file not shown.
BIN
static/fonts/playfair-display-v21-latin-700.woff2
Normal file
BIN
static/fonts/playfair-display-v21-latin-700.woff2
Normal file
Binary file not shown.
BIN
static/fonts/playfair-display-v21-latin-900.woff
Normal file
BIN
static/fonts/playfair-display-v21-latin-900.woff
Normal file
Binary file not shown.
BIN
static/fonts/playfair-display-v21-latin-900.woff2
Normal file
BIN
static/fonts/playfair-display-v21-latin-900.woff2
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user