mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-06 08:43:40 +00:00
Cleanup
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<article class="post">
|
||||
<h1>{{ .Title | markdownify }}</h1>
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
@@ -11,9 +11,4 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $.Site.Params.tagCloud.enable }}
|
||||
<aside>
|
||||
{{ partial "tag-cloud.html" . }}
|
||||
</aside>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@@ -1,20 +0,0 @@
|
||||
{{ $url := .Permalink }}
|
||||
{{ $title := .Title }}
|
||||
{{ with $.Site.Params.socialShare }}
|
||||
<div class="social-share">
|
||||
<strong class="social-share__heading">Share this post: </strong>
|
||||
{{ range . }}
|
||||
{{ $href := .formatString }}
|
||||
{{ $href := replace $href "{url}" (urlquery $url) }}
|
||||
{{ $href := replace $href "{title}" (urlquery $title) }}
|
||||
<a
|
||||
class="social-share__item"
|
||||
href="{{ $href | safeURL }}"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
{{ partial (printf "icons/%s" .iconSuite) .iconName }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
@@ -1,32 +0,0 @@
|
||||
<!--
|
||||
Original work by Artem Sidorenko: https://www.sidorenko.io/post/2017/07/nice-tagcloud-with-hugo/
|
||||
Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0/)
|
||||
-->
|
||||
|
||||
{{ with $.Site.Taxonomies.tags }}
|
||||
{{ $fontUnit := "rem" }}
|
||||
{{ $minFontSize := $.Site.Params.tagCloud.minFontSizeRem | default 0.8 }}
|
||||
{{ $maxFontSize := $.Site.Params.tagCloud.maxFontSizeRem | default 2.0 }}
|
||||
{{ $fontSizeSpread := sub $maxFontSize $minFontSize }}
|
||||
{{ $min := len (index .ByCount.Reverse 0).Pages }}
|
||||
{{ $max := add (len (index .ByCount 0).Pages) 1 }}
|
||||
|
||||
|
||||
<div class="tag-cloud">
|
||||
{{ range $tagName, $weightedPages := . }}
|
||||
{{ $count := len $weightedPages.Pages }}
|
||||
{{ $weight := div (sub (math.Log $count) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }}
|
||||
{{ $fontSize := (add $minFontSize (mul $fontSizeSpread $weight) ) }}
|
||||
<a
|
||||
href="{{ "/tags/" | relLangURL }}{{ $tagName | urlize }}"
|
||||
style="font-size:{{ $fontSize }}{{ $fontUnit }}"
|
||||
{{ if eq $.Page.Params.title $tagName -}}
|
||||
class="tag-cloud__tag tag-cloud__tag--active"
|
||||
{{ else -}}
|
||||
class="tag-cloud__tag"
|
||||
{{ end -}}
|
||||
>{{ $tagName }}</a
|
||||
>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
Reference in New Issue
Block a user