diff options
| Commit | 8dad1d1bd0bc7206f16323d220fdce73c400f470 (patch) | |
|---|---|---|
| Author | 2020-08-18 15:18:25 +0300 | |
| Committer | 2020-08-18 15:18:25 +0300 | |
| Files | 1dd6b123977afd3e391f39e2bef68f7daa0cbecb /layouts | |
| IPL-8dad1d1bd0bc7206f16323d220fdce73c400f470.tar IPL-8dad1d1bd0bc7206f16323d220fdce73c400f470.tar.gz IPL-8dad1d1bd0bc7206f16323d220fdce73c400f470.zip | ||
Squashed 'website/themes/hugo-clarity/' content from commit 4969d5a
git-subtree-dir: website/themes/hugo-clarity
git-subtree-split: 4969d5a1fb2c358c00e2d7f6fc1e39024d7d2355
22 files changed, 529 insertions, 0 deletions
| -rw-r--r-- | layouts/404.html | 8 | ||||
| -rw-r--r-- | layouts/_default/baseof.html | 76 | ||||
| -rw-r--r-- | layouts/_default/list.html | 3 | ||||
| -rw-r--r-- | layouts/_default/single.html | 26 | ||||
| -rw-r--r-- | layouts/index.html | 3 | ||||
| -rw-r--r-- | layouts/partials/analytics.html | 9 | ||||
| -rw-r--r-- | layouts/partials/archive.html | 15 | ||||
| -rw-r--r-- | layouts/partials/excerpt.html | 25 | ||||
| -rw-r--r-- | layouts/partials/favicon.html | 7 | ||||
| -rw-r--r-- | layouts/partials/follow.html | 15 | ||||
| -rw-r--r-- | layouts/partials/footer.html | 7 | ||||
| -rw-r--r-- | layouts/partials/head.html | 14 | ||||
| -rw-r--r-- | layouts/partials/icons.html | 62 | ||||
| -rw-r--r-- | layouts/partials/mode.html | 4 | ||||
| -rw-r--r-- | layouts/partials/nav.html | 43 | ||||
| -rw-r--r-- | layouts/partials/opengraph.html | 71 | ||||
| -rw-r--r-- | layouts/partials/pager.html | 19 | ||||
| -rw-r--r-- | layouts/partials/post-meta.html | 16 | ||||
| -rw-r--r-- | layouts/partials/share.html | 29 | ||||
| -rw-r--r-- | layouts/partials/sidebar.html | 67 | ||||
| -rw-r--r-- | layouts/partials/top.html | 6 | ||||
| -rw-r--r-- | layouts/shortcodes/video.html | 4 |
diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..30115e8 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,8 @@ +{{ define "main" }} +<div class = 'never wrap'> + <h1>Lost</h1> + <p class = 'pale'>We couldn't find the page you're looking for</p><br> + <div class = 'button btn_back'>Go Back</div> +</div> +{{ end }} + diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..18f14e6 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,76 @@ +<!DOCTYPE html> +<html lang="{{ .Lang }}" data-figures="{{ .Params.figurePositionShow }}"{{ if .IsPage }} class="page"{{ end }}> + <head> + {{- partial "head" . }} + <!-- styles definition--> + {{- $options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") -}} + {{ $mainSassFile := "sass/main.sass" }} + {{- $styles := resources.Get $mainSassFile | resources.ExecuteAsTemplate $mainSassFile . | resources.ToCSS $options | resources.Fingerprint "sha512" }} + + <!-- scripts definition --> + {{- $highlightPath := "js/highlight.js" }} + {{- $highlight := resources.Get $highlightPath | resources.ExecuteAsTemplate $highlightPath . }} + + {{- $functionsScriptPath := "js/functions.js" }} + {{- $functions := resources.Get $functionsScriptPath | resources.ExecuteAsTemplate $functionsScriptPath . }} + + {{- $codeScriptPath := "js/code.js" }} + {{- $code := resources.Get $codeScriptPath | resources.ExecuteAsTemplate $codeScriptPath . }} + + {{- $customScriptPath := "js/custom.js" }} + {{- $custom := resources.Get $customScriptPath | resources.ExecuteAsTemplate $customScriptPath . }} + + {{- $mainScriptPath := "js/index.js" }} + {{- $main := resources.Get $mainScriptPath | resources.ExecuteAsTemplate $mainScriptPath . }} + + {{- $bundle := slice $highlight $functions $code $main $custom | resources.Concat "js/bundle.js" | resources.Fingerprint "sha512" -}} + + <!-- preload assets declaration --> + <link rel="preload" href="{{ $styles.Permalink }}" integrity = "{{ $styles.Data.Integrity }}" as="style" crossorigin="anonymous"> + <link rel="preload" href="{{ $bundle.Permalink }}" as="script" integrity= + "{{ $bundle.Data.Integrity }}" crossorigin="anonymous"> + + <!-- styles file --> + <link rel="stylesheet" type="text/css" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous"> + {{- with .Site.Params.customCSS }} + {{- range . -}} + <link rel="stylesheet" href="{{ . | relURL }}"> + {{- end }} + {{- end }} + + </head> + {{- $maxCodeLines := 100 }} + {{- $params := .Site.Params }} + {{- with $params.codeMaxLines }} + {{- $maxCodeLines = . }} + {{- end }} + {{- with .Params.codeMaxLines }} + {{- $maxCodeLines = . }} + {{- end }} + {{- $codeLineNumbers := false }} + {{ with $params.codeLineNumbers }} + {{- $codeLineNumbers = . }} + {{ end }} + {{ with .Params.codeLineNumbers }} + {{- $codeLineNumbers = . }} + {{ else }} + {{ if eq .Params.codeLineNumbers false }} + {{- $codeLineNumbers = false }} + {{ end }} + {{ end }} + <body data-code="{{ $maxCodeLines }}" data-lines="{{ $codeLineNumbers }}" id="documentTop"> + {{- partial "nav" . }} + <main> + {{- block "main" . }}{{ end }} + </main> + {{- partial "icons" }} + {{- partial "footer" . }} + <script type="text/javascript" src = "{{ $bundle.Permalink }}" integrity= + "{{ $bundle.Data.Integrity }}" crossorigin="anonymous"></script> + {{- with .Site.Params.customJS }} + {{- range . -}} + <script type="text/javascript" src="{{ . | relURL }}" ></script> + {{- end }} + {{- end }} + </body> +</html> diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..35a8ba8 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,3 @@ +{{ define "main" }} + {{- partial "archive" . }} +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..1749a4e --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,26 @@ +{{- define "main" }} +{{- $scratch := newScratch }} +{{- if isset .Params "image" }} + {{- $scratch.Set "image" .Params.image }} +{{- else }} + {{ $scratch.Set "image" .Site.Params.fallBackOgImage }} +{{- end }} +{{- $image := $scratch.Get "image" }} +{{- $bg := (path.Join "images" $image | absLangURL) }} +<div class = 'grid-inverse wrap content'> + <article class='post_content'> + <h1 class='post_title'>{{ .Title }}</h1> + {{- partial "post-meta" . }} + {{ partial "share" . }} + {{ with .Params.featureImage }} + <img src = '{{ . }}' class="image_featured"> + {{ end }} + {{ if .Params.toc }} + <h2>Overview</h2> + {{ .TableOfContents }} + {{ end }} + {{- .Content }} + </article> + {{- partial "sidebar" . }} +</div> +{{- end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..35a8ba8 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,3 @@ +{{ define "main" }} + {{- partial "archive" . }} +{{ end }} diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html new file mode 100644 index 0000000..9c2a200 --- /dev/null +++ b/layouts/partials/analytics.html @@ -0,0 +1,9 @@ +{{- with .Site.Params.ga_analytics }} +<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script> +<script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', '{{ . }}'); +</script> +{{- end -}} diff --git a/layouts/partials/archive.html b/layouts/partials/archive.html new file mode 100644 index 0000000..d83d69c --- /dev/null +++ b/layouts/partials/archive.html @@ -0,0 +1,15 @@ +{{ $pages := .Pages }} +{{ if .IsHome }} + {{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} +{{ end }} +<div class='grid-inverse wrap content'> + <ul class='posts' id = 'posts'> + {{- range (.Paginate $pages).Pages }} + {{ partial "excerpt" . }} + {{- end }} + <li> + {{- template "_internal/pagination.html" . }} + </li> + </ul> + {{- partial "sidebar" . }} +</div> diff --git a/layouts/partials/excerpt.html b/layouts/partials/excerpt.html new file mode 100644 index 0000000..1f0fcdd --- /dev/null +++ b/layouts/partials/excerpt.html @@ -0,0 +1,25 @@ + +<li class = 'post_item'> + <div class = 'excerpt'> + <div class = 'excerpt_header'> + <h3 class = 'post_link'> + <a href='{{ .Permalink }}'>{{ .Title }}</a> + </h3> + {{ partial "post-meta.html" . }} + </div> + {{- with .Params.thumbnail }} + <div class = 'excerpt_footer partition'> + <div class = 'excerpt_thumbnail'> + <img src = '{{ if (hasPrefix . "http") }}{{ . }}{{ else }}{{ absURL . }}{{ end }}'> + </div> + {{ else }} + <div class = 'excerpt_footer'> + {{- end }} + <div> + <p class = 'pale'>{{ .Summary | truncate 320 }}</p> + <a href='{{ .Permalink }}' class='excerpt_more button'>Read More</a> + </div> + </div> + </div> + </li> +
\ No newline at end of file diff --git a/layouts/partials/favicon.html b/layouts/partials/favicon.html new file mode 100644 index 0000000..2c78928 --- /dev/null +++ b/layouts/partials/favicon.html @@ -0,0 +1,7 @@ +<link rel='apple-touch-icon' sizes='180x180' href='{{ absURL "icons/apple-touch-icon.png" }}'> +<link rel='icon' type='image/png' sizes='32x32' href='{{ absURL "icons/favicon-32x32.png" }}'> +<link rel='icon' type='image/png' sizes='16x16' href='{{ absURL "icons/favicon-16x16.png" }}'> +<link rel='manifest' href='{{ absURL "icons/site.webmanifest" }}'> +<link rel="mask-icon" href= '{{ absURL "safari-pinned-tab.svg" }}' color="#002538"> +<meta name="msapplication-TileColor" content="#002538"> +<meta name="theme-color" content="#002538"> diff --git a/layouts/partials/follow.html b/layouts/partials/follow.html new file mode 100644 index 0000000..96c7cc2 --- /dev/null +++ b/layouts/partials/follow.html @@ -0,0 +1,15 @@ +{{- $items := .Site.Data.social }} +<div class='follow'> + {{- range $items }} + {{- $url := .url }} + {{- if .internal }} + {{ $url = absURL .url }} + {{- end }} + <a href='{{ $url }}'> + <svg class="icon"> + <use xlink:href="#{{ .item }}"></use> + </svg> + </a> + {{- end }} + {{- partial "mode" . }} +</div> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..1b3eccf --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,7 @@ +<footer class = 'footer'> + <div class = 'footer_inner wrap pale'> + <img src = '{{ absURL "icons/apple-touch-icon.png" }}' class = 'icon icon_2 transparent'> + <p>Copyright © <span class = 'year'></span> {{ .Site.Title | upper }}. All Rights Reserved</p> + {{- partial "top" .}} + </div> +</footer>
\ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..c2544b8 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,14 @@ + <title>{{ if and .Title (ne (trim (lower .Site.Title) "") (trim (lower .Title) "")) }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title> + <meta charset='utf-8'> + {{ hugo.Generator }} + {{- with .Site.Params.ga_verify }} + <meta name="google-site-verification" content="{{ . }}" /> + {{- end }} + <meta name = 'viewport' content = 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'> + <meta http-equiv = 'X-UA-Compatible' content = 'IE=edge'> + {{- if (ne hugo.Environment "development") }} + {{- partial "analytics.html" . }} + {{- end }} + {{- partial "opengraph.html" . }} + {{- partial "favicon.html" . }} + <link rel='canonical' href='{{ .Permalink }}'> diff --git a/layouts/partials/icons.html b/layouts/partials/icons.html new file mode 100644 index 0000000..f8b40fd --- /dev/null +++ b/layouts/partials/icons.html @@ -0,0 +1,62 @@ +<svg width="0" height="0" class="hidden"> + <symbol viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" id="facebook"> + <path d="M437 0H75C33.648 0 0 33.648 0 75v362c0 41.352 33.648 75 75 75h151V331h-60v-90h60v-61c0-49.629 40.371-90 90-90h91v90h-91v61h91l-15 90h-76v181h121c41.352 0 75-33.648 75-75V75c0-41.352-33.648-75-75-75zm0 0"></path> + </symbol> + <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18.001 18.001" id="twitter"> + <path d="M15.891 4.013c.808-.496 1.343-1.173 1.605-2.034a8.68 8.68 0 0 1-2.351.861c-.703-.756-1.593-1.14-2.66-1.14-1.043 0-1.924.366-2.643 1.078a3.56 3.56 0 0 0-1.076 2.605c0 .309.039.585.117.819-3.076-.105-5.622-1.381-7.628-3.837-.34.601-.51 1.213-.51 1.846 0 1.301.549 2.332 1.645 3.089-.625-.053-1.176-.211-1.645-.47 0 .929.273 1.705.82 2.388a3.623 3.623 0 0 0 2.115 1.291c-.312.08-.641.118-.979.118-.312 0-.533-.026-.664-.083.23.757.664 1.371 1.291 1.841a3.652 3.652 0 0 0 2.152.743C4.148 14.173 2.625 14.69.902 14.69c-.422 0-.721-.006-.902-.038 1.697 1.102 3.586 1.649 5.676 1.649 2.139 0 4.029-.542 5.674-1.626 1.645-1.078 2.859-2.408 3.639-3.974a10.77 10.77 0 0 0 1.172-4.892v-.468a7.788 7.788 0 0 0 1.84-1.921 8.142 8.142 0 0 1-2.11.593z" + ></path> + </symbol> + <symbol aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" id="mail"> + <path d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path> + </symbol> + <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" id="calendar"> + <path d="M452 40h-24V0h-40v40H124V0H84v40H60C26.916 40 0 66.916 0 100v352c0 33.084 26.916 60 60 60h392c33.084 0 60-26.916 60-60V100c0-33.084-26.916-60-60-60zm20 412c0 11.028-8.972 20-20 20H60c-11.028 0-20-8.972-20-20V188h432v264zm0-304H40v-48c0-11.028 8.972-20 20-20h24v40h40V80h264v40h40V80h24c11.028 0 20 8.972 20 20v48z"></path> + <path d="M76 230h40v40H76zm80 0h40v40h-40zm80 0h40v40h-40zm80 0h40v40h-40zm80 0h40v40h-40zM76 310h40v40H76zm80 0h40v40h-40zm80 0h40v40h-40zm80 0h40v40h-40zM76 390h40v40H76zm80 0h40v40h-40zm80 0h40v40h-40zm80 0h40v40h-40zm80-80h40v40h-40z"></path> + </symbol> + <symbol viewBox="-21 0 512 512" xmlns="http://www.w3.org/2000/svg" id="yank"> + <path d="M410.668 405.332H165.332c-32.363 0-58.664-26.3-58.664-58.664v-288c0-32.363 26.3-58.668 58.664-58.668h181.504c21.059 0 41.687 8.535 56.555 23.445l42.496 42.496c15.125 15.125 23.445 35.223 23.445 56.575v224.152c0 32.363-26.3 58.664-58.664 58.664zM165.332 32c-14.7 0-26.664 11.969-26.664 26.668v288c0 14.7 11.965 26.664 26.664 26.664h245.336c14.7 0 26.664-11.965 26.664-26.664V122.516c0-12.82-4.992-24.871-14.059-33.942l-42.496-42.496C371.84 37.121 359.488 32 346.836 32zm0 0"></path> + <path d="M314.668 512h-256C26.305 512 0 485.695 0 453.332V112c0-32.363 26.305-58.668 58.668-58.668h10.664c8.832 0 16 7.168 16 16s-7.168 16-16 16H58.668C43.968 85.332 32 97.301 32 112v341.332C32 468.032 43.969 480 58.668 480h256c14.7 0 26.664-11.969 26.664-26.668v-10.664c0-8.832 7.168-16 16-16s16 7.168 16 16v10.664c0 32.363-26.3 58.668-58.664 58.668zM368 181.332H208c-8.832 0-16-7.168-16-16s7.168-16 16-16h160c8.832 0 16 7.168 16 16s-7.168 16-16 16zm0 0"></path> + <path d="M368 245.332H208c-8.832 0-16-7.168-16-16s7.168-16 16-16h160c8.832 0 16 7.168 16 16s-7.168 16-16 16zm0 64H208c-8.832 0-16-7.168-16-16s7.168-16 16-16h160c8.832 0 16 7.168 16 16s-7.168 16-16 16zm0 0"></path> + </symbol> + <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" id="github"> + <path d="M255.968 5.329C114.624 5.329 0 120.401 0 262.353c0 113.536 73.344 209.856 175.104 243.872 12.8 2.368 17.472-5.568 17.472-12.384 0-6.112-.224-22.272-.352-43.712-71.2 15.52-86.24-34.464-86.24-34.464-11.616-29.696-28.416-37.6-28.416-37.6-23.264-15.936 1.728-15.616 1.728-15.616 25.696 1.824 39.2 26.496 39.2 26.496 22.848 39.264 59.936 27.936 74.528 21.344 2.304-16.608 8.928-27.936 16.256-34.368-56.832-6.496-116.608-28.544-116.608-127.008 0-28.064 9.984-51.008 26.368-68.992-2.656-6.496-11.424-32.64 2.496-68 0 0 21.504-6.912 70.4 26.336 20.416-5.696 42.304-8.544 64.096-8.64 21.728.128 43.648 2.944 64.096 8.672 48.864-33.248 70.336-26.336 70.336-26.336 13.952 35.392 5.184 61.504 2.56 68 16.416 17.984 26.304 40.928 26.304 68.992 0 98.72-59.84 120.448-116.864 126.816 9.184 7.936 17.376 23.616 17.376 47.584 0 34.368-.32 62.08-.32 70.496 0 6.88 4.608 14.88 17.6 12.352C438.72 472.145 512 375.857 512 262.353 512 120.401 397.376 5.329 255.968 5.329z"></path> + </symbol> + <symbol viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" id="rss"> + <circle cx="3.429" cy="20.571" r="3.429"></circle> + <path d="M11.429 24h4.57C15.999 15.179 8.821 8.001 0 8v4.572c6.302.001 11.429 5.126 11.429 11.428z"></path> + <path d="M24 24C24 10.766 13.234 0 0 0v4.571c10.714 0 19.43 8.714 19.43 19.429z"></path> + </symbol> + <symbol viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" id="linkedin"> + <path d="M437 0H75C33.648 0 0 33.648 0 75v362c0 41.352 33.648 75 75 75h362c41.352 0 75-33.648 75-75V75c0-41.352-33.648-75-75-75zM181 406h-60V196h60zm0-240h-60v-60h60zm210 240h-60V286c0-16.54-13.46-30-30-30s-30 13.46-30 30v120h-60V196h60v11.309C286.719 202.422 296.93 196 316 196c40.691.043 75 36.547 75 79.688zm0 0"></path> + </symbol> + <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 612 612" id="arrow"> + <path d="M604.501 440.509L325.398 134.956c-5.331-5.357-12.423-7.627-19.386-7.27-6.989-.357-14.056 1.913-19.387 7.27L7.499 440.509c-9.999 10.024-9.999 26.298 0 36.323s26.223 10.024 36.222 0l262.293-287.164L568.28 476.832c9.999 10.024 26.222 10.024 36.221 0 9.999-10.023 9.999-26.298 0-36.323z"></path> + </symbol> + <symbol viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" id="carly"> + <path d="M504.971 239.029L448 182.059V84c0-46.317-37.682-84-84-84h-44c-13.255 0-24 10.745-24 24s10.745 24 24 24h44c19.851 0 36 16.149 36 36v108c0 6.365 2.529 12.47 7.029 16.971L454.059 256l-47.029 47.029A24.002 24.002 0 0 0 400 320v108c0 19.851-16.149 36-36 36h-44c-13.255 0-24 10.745-24 24s10.745 24 24 24h44c46.318 0 84-37.683 84-84v-98.059l56.971-56.971c9.372-9.372 9.372-24.568 0-33.941zM112 192V84c0-19.851 16.149-36 36-36h44c13.255 0 24-10.745 24-24S205.255 0 192 0h-44c-46.318 0-84 37.683-84 84v98.059l-56.971 56.97c-9.373 9.373-9.373 24.568 0 33.941L64 329.941V428c0 46.317 37.682 84 84 84h44c13.255 0 24-10.745 24-24s-10.745-24-24-24h-44c-19.851 0-36-16.149-36-36V320c0-6.365-2.529-12.47-7.029-16.971L57.941 256l47.029-47.029A24.002 24.002 0 0 0 112 192z"></path> + </symbol> + <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" id="copy"> + <path d="M366.345 406.069H66.207c-9.751 0-17.655-7.904-17.655-17.655V17.655C48.552 7.904 56.456 0 66.207 0h300.138C376.096 0 384 7.904 384 17.655v370.759c0 9.751-7.904 17.655-17.655 17.655z" fill="#f1f4fb"></path> + <path d="M384 388.414v-76.992c-.907.322-1.869.494-2.751.882-6.307-6.593-14.733-11.025-24.111-11.964a40.49 40.49 0 0 0-8.448.039v-92.93c0-21.903-17.82-39.723-39.723-39.724a40.5 40.5 0 0 0-4.036.202c-20.012 2.004-35.689 19.916-35.689 40.781v101.773l-21.581 21.581c-15.241 15.241-21.393 36.866-16.456 57.847l3.802 16.16h131.338c9.75 0 17.655-7.905 17.655-17.655z" + fill="#d5dced"></path> + <circle cx="128" cy="105.931" r="26.483" fill="#b4e66e"></circle> + <circle cx="128" cy="203.034" r="26.483" fill="#dae169"></circle> + <circle cx="128" cy="300.138" r="26.483" fill="#ffdc64"></circle> + <path d="M331.034 229.517H189.793c-4.879 0-8.828-3.953-8.828-8.828s3.948-8.828 8.828-8.828h141.241c4.879 0 8.828 3.953 8.828 8.828s-3.948 8.828-8.828 8.828z" fill="#7f8499"></path> + <path d="M295.724 194.207H189.793a8.826 8.826 0 0 1-8.828-8.828 8.826 8.826 0 0 1 8.828-8.828h105.931a8.826 8.826 0 0 1 8.828 8.828 8.826 8.826 0 0 1-8.828 8.828z" fill="#5b5d6e"></path> + <path d="M331.034 326.621H189.793c-4.879 0-8.828-3.953-8.828-8.828s3.948-8.828 8.828-8.828h141.241c4.879 0 8.828 3.953 8.828 8.828s-3.948 8.828-8.828 8.828z" fill="#7f8499"></path> + <path d="M295.724 291.31H189.793c-4.879 0-8.828-3.953-8.828-8.828s3.948-8.828 8.828-8.828h105.931c4.879 0 8.828 3.953 8.828 8.828s-3.948 8.828-8.828 8.828z" fill="#5b5d6e"></path> + <path d="M331.034 132.414H189.793a8.826 8.826 0 0 1-8.828-8.828 8.826 8.826 0 0 1 8.828-8.828h141.241a8.826 8.826 0 0 1 8.828 8.828 8.826 8.826 0 0 1-8.828 8.828z" fill="#7f8499"></path> + <path d="M295.724 97.103H189.793a8.826 8.826 0 0 1-8.828-8.828 8.826 8.826 0 0 1 8.828-8.828h105.931a8.826 8.826 0 0 1 8.828 8.828 8.825 8.825 0 0 1-8.828 8.828z" fill="#5b5d6e"></path> + <path d="M443.656 335.563c-13.21-1.323-24.345 9.015-24.345 21.954v-7.569c0-11.544-8.306-22.063-19.794-23.213-13.209-1.323-24.344 9.015-24.344 21.954v-7.569c0-11.544-8.306-22.063-19.794-23.213-13.209-1.323-24.344 9.015-24.344 21.954V207.448c0-12.939-11.135-23.277-24.345-21.954-11.486 1.15-19.793 11.669-19.793 23.213v109.086l-26.752 26.752a44.14 44.14 0 0 0-11.754 41.32l18.47 78.495c6.567 27.913 31.475 47.64 60.15 47.64h74.645c34.127 0 61.793-27.666 61.793-61.793v-91.431c-.001-11.544-8.306-22.063-19.793-23.213z" + fill="#f0c087"></path> + <path d="M339.862 361.377a8.829 8.829 0 0 0 8.828-8.828v-34.194c-10.052 2.061-17.655 10.844-17.655 21.506v12.687a8.827 8.827 0 0 0 8.827 8.829zM384 370.205a8.829 8.829 0 0 0 8.828-8.828v-34.194c-10.052 2.061-17.655 10.844-17.655 21.506v12.687a8.827 8.827 0 0 0 8.827 8.829zm44.138 8.827a8.829 8.829 0 0 0 8.828-8.828V336.01c-10.052 2.061-17.655 10.844-17.655 21.506v12.687a8.827 8.827 0 0 0 8.827 8.829zM288.885 464.36l-20.467-86.985a28.482 28.482 0 0 1 7.585-26.663l10.893-10.894v22.113a8.829 8.829 0 0 0 17.656 0V185.933c-10.344 2.173-17.655 11.972-17.655 22.773v109.087l-26.752 26.752a44.14 44.14 0 0 0-11.754 41.32l18.47 78.495c6.567 27.913 31.475 47.64 60.15 47.64h22.026c-28.677 0-53.584-19.727-60.152-47.64z" + fill="#e6af78"></path> + </symbol> + <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512.001 512.001" id="closeme"> + <path d="M284.286 256.002L506.143 34.144c7.811-7.811 7.811-20.475 0-28.285-7.811-7.81-20.475-7.811-28.285 0L256 227.717 34.143 5.859c-7.811-7.811-20.475-7.811-28.285 0-7.81 7.811-7.811 20.475 0 28.285l221.857 221.857L5.858 477.859c-7.811 7.811-7.811 20.475 0 28.285a19.938 19.938 0 0 0 14.143 5.857 19.94 19.94 0 0 0 14.143-5.857L256 284.287l221.857 221.857c3.905 3.905 9.024 5.857 14.143 5.857s10.237-1.952 14.143-5.857c7.811-7.811 7.811-20.475 0-28.285L284.286 256.002z"></path> + </symbol> + <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" id="open-menu"> + <path d="M492 236H20c-11.046 0-20 8.954-20 20s8.954 20 20 20h472c11.046 0 20-8.954 20-20s-8.954-20-20-20zm0-160H20C8.954 76 0 84.954 0 96s8.954 20 20 20h472c11.046 0 20-8.954 20-20s-8.954-20-20-20zm0 320H20c-11.046 0-20 8.954-20 20s8.954 20 20 20h472c11.046 0 20-8.954 20-20s-8.954-20-20-20z"></path> + </symbol> +</svg> diff --git a/layouts/partials/mode.html b/layouts/partials/mode.html new file mode 100644 index 0000000..227738b --- /dev/null +++ b/layouts/partials/mode.html @@ -0,0 +1,4 @@ +<!-- toggle dark mode --> +<div class = 'color_mode'> + <input type = 'checkbox' class = 'color_choice' id = 'mode'> +</div> diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html new file mode 100644 index 0000000..e21e054 --- /dev/null +++ b/layouts/partials/nav.html @@ -0,0 +1,43 @@ +{{- $params := .Site.Params }} +{{- $centerLogo := $params.centerLogo }} +{{ $logo := $params.logo }} +<header class = 'nav_header' > + <nav class = 'nav'> + <a href='{{ absURL "" }}' class = 'nav_brand nav_item{{ if eq $centerLogo true }} nav_hide{{ end }}'> + {{- with $logo }} + <img src="{{ absURL . }}" class="logo"> + {{- else }} + {{ .Site.Title }} + {{- end }} + <div class = 'nav_close'> + <svg class="icon"> + <use xlink:href="#open-menu"></use> + </svg> + <svg class="icon"> + <use xlink:href="#closeme"></use> + </svg> + </div> + </a> + <div class = 'nav_body nav_body_{{ .Site.Params.mobileNavigation }}'> + {{- $link := .RelPermalink }} + {{- range .Site.Data.menu }} + <div class = 'nav_parent{{ if eq .link $link }} nav_active{{ end}}'> + <a href = '{{ absURL .link }}' class = 'nav_item'>{{ .name }} {{ with .submenu }}<img src= {{ absURL "icons/caret-icon.svg" }} alt="icon" class="nav_icon">{{ end }}</a> + {{- with .submenu }} + <div class = 'nav_sub'> + {{- range . }} + <a href = '{{ absURL .link }}' class = 'nav_child nav_item'>{{ .name }}</a> + {{- end }} + </div> + {{- end }} + </div> + {{- end }} + {{- if eq $centerLogo true }} + <a href='{{ absURL "" }}' class = 'nav_brand nav_center nav_item'> + <img src="{{ absURL $logo }}" class="logo"> + </a> + {{- end }} + {{- partial "follow" . }} + </div> + </nav> +</header> diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html new file mode 100644 index 0000000..29332fd --- /dev/null +++ b/layouts/partials/opengraph.html @@ -0,0 +1,71 @@ +{{- $summary := .Summary | truncate 160 }} +{{- with .Params.description }} + {{- $summary = (. | truncate 160) }} +{{- end }} +{{- $site := .Site.Title }} +{{- $title := .Title }} +{{- $params := .Site.Params }} +{{- $permalink := .Permalink }} +{{- $logo := absURL $params.logo }} +{{- $author := $params.author }} +{{- with .Params.author }} + {{ $author := . }} +{{- end }} +{{- $image := absURL $params.fallBackOgImage }} +{{- with .Params.featureImage }} + {{- $image = absURL . }} +{{- end }} +{{- with .Params.thumbnail }} + {{- $image = absURL . }} +{{- end }} +{{- with .Params.shareImage }} + {{- $image = absURL . }} +{{- end }} +<meta property = "og:locale" content = "en_US" /> +{{- if .IsHome }} +<meta property="og:type" content="website"> +{{- else }} +<meta property="og:type" content="article"> +{{- end }} +<meta name="description" content="{{ $summary }}"> +<meta name = "twitter:card" content = "{{ if $params.largeTwitterCard }}summary_large_image{{ else }}summary{{ end }}" /> +<meta name = "twitter:creator" content = "{{ $params.twitter }}"> +<meta name = "twitter:title" content = "{{ .Title }}" /> +<meta property = "og:url" content = "{{ $permalink }}" /> +<meta property = "og:title" content = "{{ $title }}" /> +<meta property = "og:description" content = "{{ $summary }}" /> +<meta property = "og:image" content = "{{ $image }}" /> +{{- if eq .Section $params.blogDir -}} + {{- $date := ( .Date.Format "2006-02-01") -}} + {{- $date := (time .Date) }} + {{- $lastMod := (time .Lastmod) }} + <script type = "application/ld+json"> + { + "@context": "http://schema.org", + "@type": "BlogPosting", + "mainEntityOfPage":"{{ $permalink }}", + "name": "{{ $site }}", + "headline": {{ $title }}, + "description": {{ $summary }}, + "url": "{{ $permalink }}", + "datePublished": {{ $date }}, + "dateModified": {{ $lastMod }}, + "author": { + "@type": "Person", + "name": "{{ $author }}" + }, + "image":{ + "@type":"ImageObject", + "url": "{{ $image }}" + }, + "publisher": { + "@type": "Organization", + "logo": { + "@type":"ImageObject", + "url": "{{ $logo }}" + }, + "name": "{{ $site }}" + } + } + </script> +{{- end }} diff --git a/layouts/partials/pager.html b/layouts/partials/pager.html new file mode 100644 index 0000000..9848fb4 --- /dev/null +++ b/layouts/partials/pager.html @@ -0,0 +1,19 @@ +{{- $imageBase := absURL "images/icons/" }} +{{- $paginator := .Paginator }} +{{- if gt $paginator.TotalPages 1 }} + <div class = 'pager' id = 'pager'> + {{- if $paginator.HasPrev }} + <a href='{{ $paginator.Prev.URL }}#pager' class = ' pager_item pager_prev'></a> + {{- else }} + <span class = ' pager_item pager_active pager_prev'></span> + {{- end }} + {{- range first 4 $paginator.Pagers }} + <a href="{{ .URL }}#pager" class = 'pager_item{{ if eq . $paginator }} pager_active{{ end }}'>{{ .PageNumber }}</a> + {{- end }} + {{- if $paginator.HasNext -}} + <a href='{{ $paginator.Next.URL }}#pager' class = ' pager_item pager_next'></a> + {{- else -}} + <span class = ' pager_item pager_active pager_next'></span> + {{- end }} + </div> +{{- end }} diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html new file mode 100644 index 0000000..f39b050 --- /dev/null +++ b/layouts/partials/post-meta.html @@ -0,0 +1,16 @@ +<div class = 'post_meta'> + <svg class="icon"> + <use xlink:href="#calendar"></use> + </svg> + <span class="post_date"> + {{ .Date.Format "Jan 2, 2006" -}} + </span> + {{- with .Params.tags -}} + {{- range . }} + {{- $tag := . | urlize }} + <a href = '{{ absURL (printf "tags/%s" $tag) }}' class = 'post_tag button button_translucent'> + {{- . }} + </a> + {{- end }} + {{- end }} +</div> diff --git a/layouts/partials/share.html b/layouts/partials/share.html new file mode 100644 index 0000000..c2c5d83 --- /dev/null +++ b/layouts/partials/share.html @@ -0,0 +1,29 @@ +<div class='post_share'> + Share on: + <a href="https://twitter.com/intent/tweet?text={{ .Title }}&url={{ .Permalink }}&tw_p=tweetbutton" class="twitter" title="Share on Twitter" target="_blank" rel="nofollow"> + <svg class="icon"> + <use xlink:href="#twitter"></use> + </svg> + </a> + + <a href="https://www.facebook.com/sharer.php?u={{ .Permalink }}&t={{ .Title }}" class="facebook" title="Share on Facebook" target="_blank" rel="nofollow"> + <svg class="icon"> + <use xlink:href="#facebook"></use> + </svg> + </a> + <script> + function shareViaLinkedin() { + window.open('http://www.linkedin.com/shareArticle?mini=true&url='+encodeURIComponent({{ .Permalink }}), '', 'left=0,top=0,width=650,height=420,personalbar=0,toolbar=0,scrollbars=0,resizable=0'); + } + </script> + <a href="#linkedinshare" id = "linkedinshare" class="linkedin" title="Share on LinkedIn" rel="nofollow" onclick="shareViaLinkedin()"> + <svg class="icon"> + <use xlink:href="#linkedin"></use> + </svg> + </a> + <a href="{{ .Permalink }}" title="Copy Link" class="link link_yank"> + <svg class="icon"> + <use xlink:href="#yank"></use> + </svg> + </a> +</div> diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html new file mode 100644 index 0000000..c54285b --- /dev/null +++ b/layouts/partials/sidebar.html @@ -0,0 +1,67 @@ +{{ $title := .Title }} +<aside class="sidebar"> + <section class="sidebar_inner"> + <h2>{{ .Site.Params.Author }}</h2> + <div> + {{ .Site.Params.IntroDescription }} + </div> + <a href = '{{ absURL "about/" }}' class="button mt-1" role="button">Read More</a> + <h2 class="mt-4">Featured Posts</h2> + <ul> + {{ range where .Site.RegularPages "Params.featured" true }} + {{- if ne $title .Title }} + <li> + <a href="{{ .Permalink }}" class="nav-link">{{ .Title }}</a> + </li> + {{- end }} + {{ end }} + </ul> + <h2 class="mt-4">Recent Posts</h2> + <ul class="flex-column"> + {{ range first 8 (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.hidden" "!=" true) }} + {{- if ne $title .Title }} + <li> + <a href="{{ .Permalink }}" class="nav-link">{{ .Title }}</a> + </li> + {{- end }} + {{- end }} + </ul> + {{- $numberOfTagsLimit := $.Site.Params.numberOfTagsShown }} <!-- See config --> + {{ range $key, $value := .Site.Taxonomies }} + <div> + <h2 class="mt-4 taxonomy" id="{{ $key }}-section">{{ $key }}</h2> + <nav class="tags_nav"> + {{- $onPageTags := $.Page.Params.tags }} + {{- $slicedTags := ($value.ByCount | first $numberOfTagsLimit) }} + {{- range $slicedTags }} + <a href='{{ absURL $key }}/{{ (replace .Name "#" "%23") | urlize }}/' class=" post_tag button button_translucent"> + {{ upper .Name }} + <span class='button_tally'>{{ .Count }}</span> + </a> + {{ end }} + {{ if gt (len $value.ByCount) $numberOfTagsLimit }} + <br> + <div class="post_tags_toggle button">All {{ $key }}</div> + {{- $tagsInfo := newScratch }} + <div class="post_tags"> + <div class="tags_list"> + {{- range $value.Alphabetical }} + {{ $tagsInfo.Add "tagsInfo" (slice .Name .Count)}} + <a href='{{ absURL $key }}/{{ (replace .Name "#" "%23") | urlize }}/' class=" post_tag button button_translucent" data-position={{ .Count }}> + {{- upper .Name -}} + <span class='button_tally'>{{ .Count }}</span> + </a> + {{ end }} + <div class="tags_sort"><span title="sort alphabetically">[A~Z]</span><span title="sort by count">[0~9]</span> + </div> + <span class="tags_hide"><svg class="icon"> + <use xlink:href="#closeme"></use> + </svg></span> + </div> + </div> + {{ end }} + </nav> + </div> + {{ end }} + </section> +</aside> diff --git a/layouts/partials/top.html b/layouts/partials/top.html new file mode 100644 index 0000000..54ac4c1 --- /dev/null +++ b/layouts/partials/top.html @@ -0,0 +1,6 @@ +<!-- to top --> +<a class='to_top' href="#documentTop"> + <svg class="icon"> + <use xlink:href="#arrow"></use> + </svg> +</a> diff --git a/layouts/shortcodes/video.html b/layouts/shortcodes/video.html new file mode 100644 index 0000000..5f29d66 --- /dev/null +++ b/layouts/shortcodes/video.html @@ -0,0 +1,4 @@ +{{ $url := .Get 0 }} +<div class = 'video'> + <iframe src='https://www.youtube.com/embed/{{ $url }}?controls=1&rel=0'></iframe> +</div> |
