|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="{{ .Site.LanguageCode }}"> |
| 3 | +{{ partial "head.html" . }} |
| 4 | +<body class="max-width mx-auto px3 ltr"> |
| 5 | + <div class="content index py4"> |
| 6 | + |
| 7 | + {{ partial "page_nav.html" . }} |
| 8 | + |
| 9 | + <article class="post" itemscope itemtype="http://schema.org/BlogPosting"> |
| 10 | + <header> |
| 11 | + <h1 class="posttitle" itemprop="name headline"> |
| 12 | + {{ .Title }} |
| 13 | + </h1> |
| 14 | + <div class="meta"> |
| 15 | + <div class="postdate"> |
| 16 | + {{ $dataFormat := .Site.Params.dateFormat | default "2006-01-02" }} |
| 17 | + <time datetime="{{ .Date }}" itemprop="datePublished">{{ .Date.Format $dataFormat }}</time> |
| 18 | + {{ if (and .Site.Params.show_updated (ne .Lastmod .Date)) }} |
| 19 | + (Updated: <time datetime="{{ .Lastmod }}" itemprop="dateModified">{{ .Lastmod.Format $dataFormat }}</time>) |
| 20 | + {{ end }} |
| 21 | + </div> |
| 22 | + {{ $showReadTime := .Site.Params.showReadTime | default false }} |
| 23 | + {{if $showReadTime}} |
| 24 | + <div class="article-read-time"> |
| 25 | + <i class="far fa-clock"></i> |
| 26 | + {{ $readTime := math.Round (div (countwords .Content) 220.0) }} |
| 27 | + {{ $readTime }} minute read |
| 28 | + </div> |
| 29 | + {{ end }} |
| 30 | + {{ if gt .Params.categories 0 }} |
| 31 | + <div class="article-category"> |
| 32 | + <i class="fas fa-archive"></i> |
| 33 | + {{ range $index, $value := .Params.categories }} |
| 34 | + {{ if gt $index 0 }} {{ print ", " }} {{ end }} |
| 35 | + <a class="category-link" href="{{ "/categories/" | relLangURL }}{{ $value | urlize }}">{{ $value }}</a> |
| 36 | + {{ end }} |
| 37 | + </div> |
| 38 | + {{ end }} |
| 39 | + {{ if gt .Params.tags 0 }} |
| 40 | + <div class="article-tag"> |
| 41 | + <i class="fas fa-tag"></i> |
| 42 | + {{ range $index, $value := .Params.tags }} |
| 43 | + {{ if gt $index 0 }} {{ print ", " }} {{ end }} |
| 44 | + <a class="tag-link" href="{{ "/tags/" | relLangURL }}{{ $value | urlize }}" rel="tag">{{ $value }}</a> |
| 45 | + {{ end }} |
| 46 | + </div> |
| 47 | + {{ end }} |
| 48 | + {{ if (or (isset .Site "author") (isset .Params "author"))}} |
| 49 | + <br><span class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"> |
| 50 | + <span itemprop="name"> |
| 51 | + {{ if isset .Params "author" }} |
| 52 | + {{ .Params.Author }} |
| 53 | + {{ else if isset .Site "author" }} |
| 54 | + {{ .Site.Author }} |
| 55 | + {{ end }} |
| 56 | + </span> |
| 57 | + </span> |
| 58 | + {{ end }} |
| 59 | + </div> |
| 60 | + </header> |
| 61 | + |
| 62 | + {{ with .Resources.ByType "image" }} |
| 63 | + <div class="article-gallery"> |
| 64 | + {{ range $index, $value := . }} |
| 65 | + <a class="gallery-item" href="{{ .RelPermalink }}" rel="gallery_{{ $index }}"> |
| 66 | + <img src="{{ .RelPermalink }}" itemprop="image" /> |
| 67 | + </a> |
| 68 | + {{ end }} |
| 69 | + </div> |
| 70 | + {{ end }} |
| 71 | + {{ if .Site.Params.tocInline }} |
| 72 | + <div id="toc"> |
| 73 | + {{ .TableOfContents }} |
| 74 | + </div> |
| 75 | + {{ end }} |
| 76 | + <div class="content" itemprop="articleBody"> |
| 77 | + {{ .Content}} |
| 78 | + </div> |
| 79 | + </article> |
| 80 | + |
| 81 | + {{ partial "comments.html" . }} |
| 82 | + |
| 83 | + {{ partial "page_nav_mobile.html" . }} |
| 84 | + |
| 85 | + {{ partial "footer.html" . }} |
| 86 | + |
| 87 | + </div> |
| 88 | +</body> |
| 89 | + |
| 90 | +<link rel="stylesheet" href={{ "/lib/font-awesome/css/all.min.css" | relURL }}> |
| 91 | +<script src={{ "/lib/jquery/jquery.min.js" | relURL }}></script> |
| 92 | +<script src={{ "/js/main.js" | relURL }}></script> |
| 93 | +{{ if not (isset site.Params "disablecopy") }} |
| 94 | +<script src={{ "js/code-copy.js" | relURL }}></script> |
| 95 | +{{ end }} |
| 96 | +{{ $mathjax := false }} |
| 97 | +{{ if isset .Params "mathjax" }} |
| 98 | + {{ $mathjax = .Params.mathjax }} |
| 99 | +{{ else if isset .Site.Params "mathjax" }} |
| 100 | + {{ $mathjax = .Site.Params.mathjax }} |
| 101 | +{{ end }} |
| 102 | +{{ if $mathjax }} |
| 103 | +<script> |
| 104 | + MathJax = { |
| 105 | + tex: { |
| 106 | + inlineMath: [['$', '$'], ['\\(', '\\)']] |
| 107 | + }, |
| 108 | + svg: { |
| 109 | + fontCache: 'global' |
| 110 | + } |
| 111 | + }; |
| 112 | +</script> |
| 113 | +<script type="text/javascript" id="MathJax-script" async |
| 114 | + src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"> |
| 115 | +</script> |
| 116 | +{{ end }} |
| 117 | +</html> |
0 commit comments