🎉 Initial commit
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<article class="{{ if .Params.image }}has-image{{ end }} main-article">
|
||||
<header class="article-header">
|
||||
{{ if .Params.image }}
|
||||
{{- $image := partial "helper/image" . -}}
|
||||
|
||||
{{- $tablet := $image.Resize "1024x" -}}
|
||||
{{- $desktop := $image.Resize "2000x" -}}
|
||||
|
||||
{{- $20x := $image.Fill "20x20 smart" -}}
|
||||
{{- .Scratch.Set "20x" $20x -}}
|
||||
|
||||
<div class="article-image">
|
||||
<img srcset="{{ $tablet.RelPermalink }} 1024w, {{ $desktop.RelPermalink }} 2000w"
|
||||
src="{{ $desktop.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}"
|
||||
loading="lazy"
|
||||
alt="Featured image of post {{ .Title }}" />
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="article-details">
|
||||
{{ with $category := .Params.categories }}
|
||||
<header class="article-category">
|
||||
{{ range first 1 $category }}
|
||||
{{ if $.Params.image }}
|
||||
<a href="/categories/{{ . | urlize }}" class="color-tag"
|
||||
data-image="{{ ($.Scratch.Get "20x").RelPermalink }}">{{ . | humanize }}</a>
|
||||
{{ else }}
|
||||
<a href="/categories/{{ . | urlize }}">{{ . | humanize }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</header>
|
||||
{{ end }}
|
||||
|
||||
<h2 class="article-title">
|
||||
<a href="{{ .Permalink }}">
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
{{ with .Params.description }}
|
||||
<h3 class="article-subtitle">
|
||||
{{ . }}
|
||||
</h3>
|
||||
{{ end }}
|
||||
|
||||
<footer class="article-time">
|
||||
{{ (resources.Get "icons/clock.svg").Content | safeHTML }}
|
||||
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||
{{- .Date.Format ( or .Site.Params.dateFormat "Jan 02, 2006" ) -}}
|
||||
</time>
|
||||
</footer>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="article-content">
|
||||
{{ .Content }}
|
||||
</section>
|
||||
|
||||
<footer class="article-footer">
|
||||
{{ with $tags := .Params.Tags }}
|
||||
<section class="article-tags">
|
||||
{{ range $tags }}
|
||||
<a href="/tags/{{ . | urlize }}">{{ . | humanize }}</a>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.postLicense }}
|
||||
<section class="article-copyright">
|
||||
{{ (resources.Get "icons/copyright.svg").Content | safeHTML }}
|
||||
<span>{{ .Site.Params.postLicense }}</span>
|
||||
</section>
|
||||
{{ end }}
|
||||
</footer>
|
||||
</article>
|
||||
@@ -0,0 +1 @@
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
@@ -0,0 +1,66 @@
|
||||
<!-- Root element of PhotoSwipe. Must have class pswp. -->
|
||||
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true" style="display:none">
|
||||
|
||||
<!-- Background of PhotoSwipe.
|
||||
It's a separate element as animating opacity is faster than rgba(). -->
|
||||
<div class="pswp__bg"></div>
|
||||
|
||||
<!-- Slides wrapper with overflow:hidden. -->
|
||||
<div class="pswp__scroll-wrap">
|
||||
|
||||
<!-- Container that holds slides.
|
||||
PhotoSwipe keeps only 3 of them in the DOM to save memory.
|
||||
Don't modify these 3 pswp__item elements, data is added later on. -->
|
||||
<div class="pswp__container">
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
</div>
|
||||
|
||||
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
|
||||
<div class="pswp__ui pswp__ui--hidden">
|
||||
|
||||
<div class="pswp__top-bar">
|
||||
|
||||
<!-- Controls are self-explanatory. Order can be changed. -->
|
||||
|
||||
<div class="pswp__counter"></div>
|
||||
|
||||
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
|
||||
|
||||
<button class="pswp__button pswp__button--share" title="Share"></button>
|
||||
|
||||
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
|
||||
|
||||
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
|
||||
|
||||
<!-- Preloader demo https://codepen.io/dimsemenov/pen/yyBWoR -->
|
||||
<!-- element will get class pswp__preloader--active when preloader is running -->
|
||||
<div class="pswp__preloader">
|
||||
<div class="pswp__preloader__icn">
|
||||
<div class="pswp__preloader__cut">
|
||||
<div class="pswp__preloader__donut"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
|
||||
<div class="pswp__share-tooltip"></div>
|
||||
</div>
|
||||
|
||||
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
|
||||
</button>
|
||||
|
||||
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
|
||||
</button>
|
||||
|
||||
<div class="pswp__caption">
|
||||
<div class="pswp__caption__center"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
<aside class="widget related-contents--wrapper">
|
||||
{{ $related := .Site.RegularPages.Related . | first 5 }}
|
||||
{{ with $related }}
|
||||
<h1 class="widget-title">Related contents</h1>
|
||||
<div class="related-contents">
|
||||
<div class="flex article-list--tile">
|
||||
{{ range . }}
|
||||
{{ partial "article-list/tile" (dict "context" . "size" "250x350") }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</aside>
|
||||
Reference in New Issue
Block a user