diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/_markup/render-heading.html | 2 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 3 | ||||
-rw-r--r-- | layouts/_default/list.html | 4 | ||||
-rw-r--r-- | layouts/_default/taxonomy.html | 6 | ||||
-rw-r--r-- | layouts/blog/list.html | 35 | ||||
-rw-r--r-- | layouts/blog/single.html | 95 | ||||
-rw-r--r-- | layouts/index.html | 24 | ||||
-rw-r--r-- | layouts/partials/blog/archive.html | 24 | ||||
-rw-r--r-- | layouts/partials/blog/li.html | 2 | ||||
-rw-r--r-- | layouts/partials/comments.html | 20 | ||||
-rw-r--r-- | layouts/partials/footer/scripts.html | 8 | ||||
-rw-r--r-- | layouts/partials/head/metadata.html | 2 | ||||
-rw-r--r-- | layouts/partials/head/openGraph.html | 4 | ||||
-rw-r--r-- | layouts/partials/head/plausible.html | 2 | ||||
-rw-r--r-- | layouts/partials/home/blog.html | 30 | ||||
-rw-r--r-- | layouts/partials/home/projects.html | 62 | ||||
-rw-r--r-- | layouts/partials/home/social.html | 2 | ||||
-rw-r--r-- | layouts/partials/nav.html | 14 | ||||
-rw-r--r-- | layouts/projects/list.html | 8 |
19 files changed, 209 insertions, 138 deletions
diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..1be5073 --- /dev/null +++ b/layouts/_default/_markup/render-heading.html @@ -0,0 +1,2 @@ + +<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="anchor-link"><a href="#{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}</a></h{{ .Level }}> diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a366802..f15dfd2 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,6 +3,7 @@ <head> {{ block "head" . }} {{ partial "head/metadata.html" . }} + {{ if .Site.Params.plausible }}{{ partial "head/plausible.html" . }}{{ end }} {{ partial "head/openGraph.html" . }} {{ partial "head/favicons.html" . }} {{ partial "head/css.html" . }} @@ -16,7 +17,7 @@ <!-- Begin Title --> <div class="container hero {{ if .Site.Params.fadeIn | default true }} fade-in one {{ end }}"> {{ block "title" . }} - <h1 class="bold-title is-1">{{ .Title }}</h1> + <h1 class="bold-title is-1">{{ .Title | markdownify }}</h1> {{ end }} </div> <!-- End Title --> diff --git a/layouts/_default/list.html b/layouts/_default/list.html index fe79f8b..5941551 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -7,11 +7,11 @@ {{ range .Pages.ByPublishDate.Reverse }} {{ if .Date }} <li> - <a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | {{ .Title }}</a> + <a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | {{ .Title | markdownify }}</a> </li> {{ else }} <li> - <a href="{{ .Permalink }}">{{ .Title }}</a> + <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> </li> {{ end }} {{ end }} diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index 71d0ca3..21511de 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -1,5 +1,5 @@ {{ define "title" }} - <h1 class="bold-title is-1">{{ .Data.Singular | humanize }}: {{ lower .Title }}</h1> + <h1 class="bold-title is-1">{{ .Data.Singular | humanize }}: {{ lower .Title | markdownify }}</h1> {{ end }} {{ define "main" }} @@ -8,11 +8,11 @@ {{ range .Pages.ByPublishDate.Reverse }} {{ if .Date }} <li> - <a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | {{ .Title }}</a> + <a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | {{ .Title | markdownify }}</a> </li> {{ else }} <li> - <a href="{{ .Permalink }}">{{ .Title }}</a> + <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> </li> {{ end }} {{ end }} diff --git a/layouts/blog/list.html b/layouts/blog/list.html index 775277b..d3aea07 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -5,24 +5,27 @@ <div class="container"> {{ if .Site.Params.home.showLatest | default true }} <h2 class="title is-2 top-pad">{{ i18n "index_blog_latestPosts" . }}</h2> - {{ range first 1 .Pages.ByPublishDate.Reverse }} - <div class="summary">{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }} - <h3 class="title is-3 strong-post-title"> - <a href="{{ .Permalink }}"> - {{ .Title }} - </a> - </h3> - <div class="markdown"> - {{ .Summary }} - {{ if .Truncated }} - <a href="{{ .Permalink }}">{{ i18n "index_blog_readMore" . }}</a> - {{ end }} + {{ range first 1 .Pages.ByPublishDate.Reverse }} + <div class="summary">{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }} + <h3 class="title is-3 strong-post-title"> + <a href="{{ .Permalink }}"> + {{ .Title | markdownify }} + </a> + </h3> + <div class="markdown"> + {{ .Summary }} + {{ if .Truncated }} + <a href="{{ .Permalink }}">{{ i18n "index_blog_readMore" . }}</a> + {{ end }} + </div> </div> - </div> - {{ end }} - + {{ end }} {{ end }} <h2 class="title is-2 top-pad">{{ i18n "index_blog_allPosts" . }}</h2> - {{ partialCached "blog/li.html" . }} + {{if .Site.Params.home.allPostsArchiveFormat}} + {{ partialCached "blog/archive.html" .}} + {{else}} + {{ partialCached "blog/li.html" . }} + {{end}} </div> {{ end }} diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 24c986b..fa1f646 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -1,64 +1,61 @@ {{ define "title" }} {{ with .Site.GetPage "/blog" }} - <h1 class="bold-title is-1">{{ .Title }}</h1> +<h1 class="bold-title is-1">{{ .Title | markdownify }}</h1> {{ end }} {{ end }} {{ define "main" }} - <div class="container"> - <h2 class="title is-1 top-pad strong-post-title"> - <a href="{{ .Permalink }}">{{ .Title }}</a> - </h2> - <div class="post-data"> +<div class="container"> + <h2 class="title is-1 top-pad strong-post-title"> + <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> + </h2> + <div class="post-data"> {{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }} {{ if .Site.Params.showReadingTime | default true }} {{ if .Params.date }} | {{ end }} {{ i18n "blog_readingTime" .ReadingTime }} {{ end }} - </div> - {{ if or .Site.Params.share.twitter .Site.Params.share.facebook .Site.Params.share.pinterest .Site.Params.share.googlePlus }} - <div class="blog-share"> - {{ i18n "blog_shareThis" . }}: - {{ if .Site.Params.share.twitter }} - <a class="twitter-share-button" href="https://twitter.com/intent/tweet?text={{ .Title }}%20{{ .Permalink }}" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;"> - <i class="fab fa-twitter"></i> - <span class="hidden">Twitter</span> - </a> - {{ end }} - {{ if .Site.Params.share.facebook }} - <a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;"> - <i class="fab fa-facebook-f"></i> - <span class="hidden">Facebook</span> - </a> - {{ end }} - {{ if .Site.Params.share.pinterest }} - <a class="icon-pinterest" href="http://pinterest.com/pin/create/button/?url={{ .Permalink }}{{ if .Params.pinterestMedia }}&media={{ .Site.BaseURL }}{{ .Params.pinterestMedia }}{{ end }}&description={{ .Title | safeHTML}}" onclick="window.open(this.href, 'pinterest-share','width=580,height=296');return false;"> - <i class="fab fa-pinterest-p"></i> - <span class="hidden">Pinterest</span> - </a> - {{ end }} - {{ if .Site.Params.share.googlePlus }} - <a class="icon-google-plus" href="https://plus.google.com/share?url={{ .Permalink }}" onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;"> - <i class="fab fa-google-plus-g"></i> - <span class="hidden">Google+</span> - </a> - {{ end }} - </div> + </div> + {{ if or .Site.Params.share.twitter .Site.Params.share.facebook .Site.Params.share.pinterest }} + <div class="blog-share"> + {{ i18n "blog_shareThis" . }}: + {{ if .Site.Params.share.twitter }} + <a class="twitter-share-button" href="https://twitter.com/intent/tweet?text={{ .Title | markdownify }}%20{{ .Permalink }}" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;"> + <i class="fab fa-twitter"></i> + <span class="hidden">Twitter</span> + </a> {{ end }} - {{ if .Params.tags }} - {{ $len := (len .Params.tags) }} - <p> - Tag{{ if gt $len 1 }}s{{ end }}: - {{ range $index, $tag := .Params.tags }} - <a href="{{ "tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>{{ if ne (add $index 1) $len }},{{ end }} - {{ end }} - </p> + {{ if .Site.Params.share.facebook }} + <a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;"> + <i class="fab fa-facebook-f"></i> + <span class="hidden">Facebook</span> + </a> + {{ end }} + {{ if .Site.Params.share.pinterest }} + <a class="icon-pinterest" href="http://pinterest.com/pin/create/button/?url={{ .Permalink }}{{ if .Params.pinterestMedia }}&media={{ .Site.BaseURL }}{{ .Params.pinterestMedia }}{{ end }}&description={{ .Title | safeHTML}}" onclick="window.open(this.href, 'pinterest-share','width=580,height=296');return false;"> + <i class="fab fa-pinterest-p"></i> + <span class="hidden">Pinterest</span> + </a> {{ end }} </div> - <!-- Begin blog post content --> - <div class="container markdown top-pad"> - {{ .Content }} - </div> - <!-- End blog post content --> - {{ partial "comments.html" . }} + {{ end }} + {{ range $taxonomy_term, $taxonomy := .Params }} + {{ with $.Site.GetPage $taxonomy_term }} + {{ $len := (len $taxonomy) }} + <p> + {{ $taxonomy_term | title }}: + {{ range $key, $value := $taxonomy }} + <a href="{{ (printf "/%s/" $taxonomy_term) | relLangURL }}{{ . | urlize }}"> + {{ $value }}</a>{{ if ne (add $key 1) $len }},{{ end }} + {{ end }} + </p> + {{ end }} + {{ end }} +</div> +<!-- Begin blog post content --> +<div class="container markdown top-pad"> + {{ .Content }} +</div> +<!-- End blog post content --> +{{ partial "comments.html" . }} {{ end }} diff --git a/layouts/index.html b/layouts/index.html index 209ba78..c3ae575 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -3,6 +3,7 @@ <head> {{ partial "head/metadata.html" . }} + {{ if .Site.Params.plausible }}{{ partial "head/plausible.html" . }}{{ end }} {{ partial "head/openGraph.html" . }} {{ partial "head/favicons.html" . }} {{ partial "head/css.html" . }} @@ -20,7 +21,7 @@ <div class="container has-text-centered"> <!-- Title and tagline --> <h1 class="bold-title {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in one{{ end }}"> - {{ .Title }} + {{ .Title | markdownify }} </h1> <div class="subtitle is-3 {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in two{{ end }}"> {{ .Content }} @@ -67,7 +68,7 @@ <!-- Range through all sections in /home execept contact.md --> <div class="section" id="{{ .File.TranslationBaseName }}"> <div class="container"> - <h2 class="title is-2 has-text-centered">{{ .Title }}</h2> + <h2 class="title is-2 has-text-centered">{{ .Title | markdownify }}</h2> {{ if .Params.Image }} <div class="columns"> <div class="column is-one-third has-text-centered"> @@ -101,12 +102,12 @@ {{ with .Resources.GetMatch "contact.md" }} <div class="section" id="{{ .File.TranslationBaseName }}"> <div class="container has-text-centered"> - <h2 class="title is-2">{{ .Title }}</h2> + <h2 class="title is-2">{{ .Title | markdownify }}</h2> <div class="markdown"> {{ .Content }} </div> {{ if .Site.Params.home.localTime }} - <p>{{ i18n "index_currentTime" . }} <span id="time" data-time-zone="{{ .Site.Params.home.timeZone }}" data-time-format="{{ .Site.Params.home.timeFormat }}"></span>.</p> + <p>{{ i18n "index_currentTime" . }} <span id="time"></span>.</p> {{ end }} {{ with .Site.Params.email }} <h3 class="subtitle is-3 has-text-centered top-pad"> @@ -132,12 +133,15 @@ {{ partial "js/owlCarousel.html" . }} {{ if .Site.Params.home.localTime }} - {{ $momentjs := resources.Get "vendor/momentjs/moment.min.js" }} - {{ $momentTimezone := resources.Get "vendor/momentjs/moment-timezone.min.js" }} - {{ $momentTimezoneWithData := resources.Get "vendor/momentjs/moment-timezone-with-data-2012-2022.min.js" }} - {{ $initMomentjs := resources.Get "js/initMoment.js" }} - {{ $bundleMoment := slice $momentjs $momentTimezone $momentTimezoneWithData $initMomentjs | resources.Concat "js/bundleMoment.js" | fingerprint }} - <script src="{{ $bundleMoment.Permalink }}" integrity="{{ $bundleMoment.Data.Integrity }}"></script> + <script> + function update_localtime() { + const time = new Date().toLocaleTimeString('{{ .Site.Params.home.timeFormat }}', { timeZone: '{{ .Site.Params.home.timeZone }}', timeStyle: 'short' }); + document.getElementById('time').innerHTML = time; + } + update_localtime(); + // Updating every second to prevent seconds looking like stood still when timeStyle is ignored. + setInterval(update_localtime, 1000); + </script> {{ end }} </body> diff --git a/layouts/partials/blog/archive.html b/layouts/partials/blog/archive.html new file mode 100644 index 0000000..21e1a4a --- /dev/null +++ b/layouts/partials/blog/archive.html @@ -0,0 +1,24 @@ +<section> + {{ $prev := now.Format "2006"}} <!--start from the current year--> + {{ range first 1 .Pages.ByPublishDate.Reverse }} + {{if .Date}} <!--also add the header if there are posts during the current year--> + {{if eq $prev (.Date.Format "2006")}} <h2 class="title is-2 top-pad"> {{ $prev }}</h2> {{end}} + {{end}} + {{end}} + + {{range .Pages.ByPublishDate.Reverse}} + {{if .Date}} + {{$curr := .Date.Format "2006"}} + {{if lt $curr $prev }} + <h2 class="title is-2 top-pad">{{ $curr }}</h2> + {{end}} + <li class="post-item"> + {{ if .Params.date }} + <span>{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}</span> - + {{ end }} + <span><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></span> + </li> + {{ $prev = $curr}} + {{end}} + {{end}} +</section>
\ No newline at end of file diff --git a/layouts/partials/blog/li.html b/layouts/partials/blog/li.html index db6359b..e72f1cd 100644 --- a/layouts/partials/blog/li.html +++ b/layouts/partials/blog/li.html @@ -1,5 +1,5 @@ {{ range .Pages.ByPublishDate.Reverse }} <li class="post-item"> - <span><a href="{{ .Permalink }}">{{ .Title }}</a></span>{{ if .Params.date }} - <span>{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}</span>{{ end }} + <span><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></span>{{ if .Params.date }} - <span>{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}</span>{{ end }} </li> {{ end }} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 3cc1645..c5e2a50 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,5 +1,23 @@ {{- if .Site.DisqusShortname }} - <div class="disqus"> + <div class="container disqus"> {{ template "_internal/disqus.html" . }} </div> {{- end }} + +{{- if .Site.Params.giscus.repo }} +<div class="container giscus my-4"> + <script src="https://giscus.app/client.js" + data-repo={{ .Site.Params.giscus.repo }} + data-repo-id={{ .Site.Params.giscus.repo_id }} + data-category={{ .Site.Params.giscus.category }} + data-category-id={{ .Site.Params.giscus.category_id }} + data-mapping={{ .Site.Params.giscus.mapping }} + data-reactions-enabled={{ .Site.Params.giscus.reactions_enabled | default 0}} + data-emit-metadata={{ .Site.Params.giscus.emit_metadata | default 0 }} + data-theme={{ .Site.Params.giscus.theme }} + data-lang={{ .Site.Params.giscus.lang }} + crossorigin="anonymous" + async> + </script> +</div> +{{- end }} diff --git a/layouts/partials/footer/scripts.html b/layouts/partials/footer/scripts.html index 6142f3d..f4dc641 100644 --- a/layouts/partials/footer/scripts.html +++ b/layouts/partials/footer/scripts.html @@ -1,6 +1,12 @@ -{{ $jQuery := resources.Get "vendor/jquery/jquery-3.3.1.min.js" }} +{{ $jQuery := resources.Get "vendor/jquery/jquery-3.5.1.min.js" }} {{ $index := resources.Get "js/index.js" | minify }} {{ $scripts := slice $jQuery $index | resources.Concat "js/bundle.js" | fingerprint }} <script src="{{ $scripts.Permalink }}" integrity="{{ $scripts.Data.Integrity }}"></script> {{ template "_internal/google_analytics_async.html" . }} + +<!-- Custom JavaScript --> +{{ range .Site.Params.customJS -}} + {{ $script := resources.Get . | minify }} + <script src="{{ $script.Permalink }}" integrity="{{ $script.Data.Integrity }}"></script> +{{- end }} diff --git a/layouts/partials/head/metadata.html b/layouts/partials/head/metadata.html index ab1aded..fc624d2 100644 --- a/layouts/partials/head/metadata.html +++ b/layouts/partials/head/metadata.html @@ -6,7 +6,7 @@ <meta name="referrer" content="no-referrer"> {{ if .Site.Params.description }}<meta name="description" content="{{ .Site.Params.description }}">{{ end }} <title> -{{ .Title }}{{ if ne .Title .Site.Title }} - {{ .Site.Title }}{{ end }} +{{ .Title | humanize | title }}{{ if ne .Title .Site.Title }} - {{ .Site.Title | markdownify }}{{ end }} </title> <!-- RSS --> {{ with .OutputFormats.Get "RSS" }}<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />{{ end }} diff --git a/layouts/partials/head/openGraph.html b/layouts/partials/head/openGraph.html index d613451..ca043b3 100644 --- a/layouts/partials/head/openGraph.html +++ b/layouts/partials/head/openGraph.html @@ -1,8 +1,8 @@ -<meta property="og:title" content="{{ .Title }}{{ if ne .Title .Site.Title }} - {{ .Site.Title }}{{ end }}" /> +<meta property="og:title" content="{{ .Title | markdownify }}{{ if ne .Title .Site.Title }} - {{ .Site.Title | markdownify }}{{ end }}" /> <meta property="og:type" content="website" /> <meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}"/> <meta property="og:url" content="{{ .Permalink }}"/> -<meta property="og:site_name" content="{{ .Site.Title }}"/> +<meta property="og:site_name" content="{{ .Site.Title | markdownify }}"/> {{ with .Resources.ByType "image" }} {{ range first 5 (sort . "Params.weight") }} diff --git a/layouts/partials/head/plausible.html b/layouts/partials/head/plausible.html new file mode 100644 index 0000000..c368a54 --- /dev/null +++ b/layouts/partials/head/plausible.html @@ -0,0 +1,2 @@ +{{ $url := urls.Parse .Site.BaseURL }} +<script async defer data-domain="{{ $url.Host }}" src="https://plausible.io/js/plausible.js"></script>
\ No newline at end of file diff --git a/layouts/partials/home/blog.html b/layouts/partials/home/blog.html index 2c2b55b..9f6cd59 100644 --- a/layouts/partials/home/blog.html +++ b/layouts/partials/home/blog.html @@ -6,7 +6,7 @@ <h2 class="title is-2 has-text-centered">{{ i18n "index_blog_latestPosts" . }}</h2> {{ range first 1 .Pages.ByPublishDate.Reverse }} <div class="summary">{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }} - <h3 class="title is-3 latest-post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h3> + <h3 class="title is-3 latest-post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h3> <div class="markdown"> {{ .Summary }} {{ if .Truncated }} @@ -16,22 +16,28 @@ </div> {{ end }} {{ end }} - {{ if .Site.Params.home.showAllPosts }} </div> </div> -<div class="section" id="all-posts"> - <div class="container"> - <h2 class="title is-2 has-text-centered top-pad">{{ i18n "index_blog_allPosts" . }}</h2> - {{ partialCached "blog/li.html" . }} - {{ else }} + {{ if .Site.Params.home.showAllPosts }} + <div class="section" id="all-posts"> + <div class="container"> + <h2 class="title is-2 top-pad">{{ i18n "index_blog_allPosts" . }}</h2> + {{if .Site.Params.home.allPostsArchiveFormat}} + {{ partialCached "blog/archive.html" .}} + {{else}} + {{ partialCached "blog/li.html" . }} + {{end}} + </div> + </div> + {{ else }} <div class="container has-text-centered top-pad"> <a href="{{ .Permalink }}">{{ i18n "index_blog_allPosts" . }}</a> </div> - {{ end }} - </div> - <!-- End Blog container --> - {{ partial "top-icon.html" . }} -</div> + {{ end }} + +<!-- End Blog container --> +{{ partial "top-icon.html" . }} + <!-- End Blog section --> <div class="container"><hr></div> {{ end }} diff --git a/layouts/partials/home/projects.html b/layouts/partials/home/projects.html index e5a28a8..45a3a88 100644 --- a/layouts/partials/home/projects.html +++ b/layouts/partials/home/projects.html @@ -3,7 +3,7 @@ <!-- Begin Projects container --> <div class="container"> <h2 class="title is-2 has-text-centered"> - {{ .Title }} + {{ .Title | markdownify }} </h2> <div class="section"> <div class="columns is-multiline"> @@ -18,22 +18,27 @@ {{ end}} <div class="column {{ $columWidth }}"> <div class="card" data-target="#project-{{ $index }}"> + {{ if .Resources.ByType "image" }} <div class="card-image"> <figure class="image is-3by2"> <a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}> {{ with .Resources.ByType "image" }} {{ range first 1 (sort . "Params.weight") }} {{ $image := .Resize $width }} - <img src="{{ $image.Permalink }}" alt ="{{ $image.Name }}"> + <img class="card-thumbnail" src="{{ $image.Permalink }}" alt ="{{ $image.Name }}"> {{ end }} {{ end }} </a> </figure> </div> + {{ end }} <div class="card-content has-text-centered top-pad"> - <a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}> - {{ .Title }} - </a> + <h1><a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}> + {{ .Title | markdownify }} + </a></h1> + {{ if .Params.project_timeframe }} + <p class="fa-xs">{{ .Params.project_timeframe }}</p> + {{ end }} </div> </div> </div> @@ -55,35 +60,34 @@ <div class="modal-card"> {{ with .Title }} <header class="modal-card-header bottom-pad"> - <p class="modal-card-title has-text-centered">{{ . }}</p> + <h1 class="modal-card-title has-text-centered">{{ . }}</h1> </header> {{ end }} - - {{ with .Resources.ByType "image" }} - {{ $moreThenOneImage := gt (len .) 1 }} - {{ if $moreThenOneImage }} - <div class="owl-carousel owl-theme"> - {{ end }} - {{ range sort . "Params.weight" }} - {{ $image := .Resize "640x" }} - {{ if $moreThenOneImage }} - <div class="item owl-height"> - {{ end }} - <img src="{{ $image.Permalink }}" class="img-responsive" alt="{{ $image.Name }}"> - {{ if $moreThenOneImage }} - </div> + {{ if .Params.project_timeframe }} + <p class="fa-xs">{{ .Params.project_timeframe }}</p> + {{ end }} + <section class="modal-card-body markdown"> + {{ with .Resources.ByType "image" }} + {{ $moreThenOneImage := gt (len .) 1 }} + {{ if $moreThenOneImage }} + <div class="owl-carousel owl-theme"> + {{ end }} + {{ range sort . "Params.weight" }} + {{ $image := .Resize "640x" }} + {{ if $moreThenOneImage }} + <div class="item owl-height"> + {{ end }} + <img src="{{ $image.Permalink }}" class="img-responsive" alt="{{ $image.Name }}"> + {{ if $moreThenOneImage }} + </div> + {{ end }} {{ end }} + {{ if $moreThenOneImage }} + </div> {{ end }} - {{ if $moreThenOneImage }} - </div> - {{ end }} - {{ end }} - - {{ with .Content }} - <section class="modal-card-body markdown"> - {{ . }} + {{ end }} + {{ .Content }} </section> - {{ end }} </div> <button class="modal-close is-large" aria-label="close" data-target="#project-{{ $index }}"></button> </div> diff --git a/layouts/partials/home/social.html b/layouts/partials/home/social.html index 34a97f1..ff90886 100644 --- a/layouts/partials/home/social.html +++ b/layouts/partials/home/social.html @@ -1,7 +1,7 @@ <div class="social-icons"> {{ range .Site.Params.social }} <a href="{{ .url }}" {{ .html_attributes | safeHTMLAttr }}> - <i class="{{ .icon_pack}} fa-{{ .icon}}"></i> + <i class="{{ .icon_pack}} fab fa-{{ .icon}}"></i> </a> {{ end }} </div> diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 9f8c722..bdfd931 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -56,15 +56,17 @@ {{ if eq (os.Stat .File.Dir).Name "projects" }} <!-- Now for some cool projects --> {{ if $isHome }} - <a class="navbar-item" href="{{ printf "#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a> + <a class="navbar-item" href="{{ printf "#%s" ( .Title | urlize) | relLangURL }}">{{ .Title | markdownify }}</a> {{ else }} - {{ $pageIsInProjects := eq $.Page.Section "project"}} + {{ $pageIsInProjects := eq $.Page.Section "projects"}} {{ if not (and $pageIsInProjects (eq $.Page.Kind "section")) }} <a class="navbar-item" href="{{ .Permalink }}"> {{ if $pageIsInProjects }} {{ i18n "nav_backToSection" . }} {{ else }} - {{ .Title | singularize}} + <!-- fix-224 --> + {{ .Title }} + <!-- end fix-224 --> {{ end }} </a> {{ end }} @@ -72,7 +74,7 @@ {{ else if eq (os.Stat .File.Dir).Name "blog" }} <!-- Let`s show some blog posts --> {{ if $isHome }} - <a class="navbar-item" href="{{ printf "#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a> + <a class="navbar-item" href="{{ printf "#%s" ( .Title | urlize) | relLangURL }}">{{ .Title | markdownify }}</a> {{ else }} {{ $pageIsInBlog := eq $.Page.Section "blog"}} {{ if not (and $pageIsInBlog (eq $.Page.Kind "section")) }} @@ -86,7 +88,7 @@ {{ end }} {{ end }} {{ else }} - <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title }}</a> + <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title | markdownify }}</a> {{ end }} {{ end }} {{ end }} @@ -94,7 +96,7 @@ {{ with .Site.GetPage "/home" }} {{ with .Resources.GetMatch "contact.md" }} - <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title }}</a> + <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title | markdownify }}</a> {{ end }} {{ end }} diff --git a/layouts/projects/list.html b/layouts/projects/list.html index 37480ea..0bbe8b6 100644 --- a/layouts/projects/list.html +++ b/layouts/projects/list.html @@ -15,6 +15,7 @@ {{ end}} <div class="column {{ $columWidth }}"> <div class="card"> + {{ if .Resources.ByType "image" }} <div class="card-image"> <figure class="image is-3by2"> <a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}"> @@ -27,10 +28,11 @@ </a> </figure> </div> + {{ end }} <div class="card-content has-text-centered top-pad"> - <a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}"> - {{ .Title }} - </a> + <h1><a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}"> + {{ .Title | markdownify }} + </a></h1> </div> </div> </div> |