Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pavel-pi/kiss-em.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Pi <pavel.post@mailbox.org>2021-08-13 12:30:07 +0300
committerPavel Pi <pavel.post@mailbox.org>2021-08-13 12:30:07 +0300
commit956a4ee68e4be218a1e219d3be6e5b8507e49393 (patch)
tree964fb50b4aebfab5b4a4d56310d8bde1dbda5b7e
parent7de7f7e6f52529cfab189a0ae19670ded15a2d02 (diff)
added /tags page
-rw-r--r--data/theme.toml3
-rw-r--r--layouts/_default/terms.html29
-rw-r--r--layouts/partials/nav.html3
3 files changed, 32 insertions, 3 deletions
diff --git a/data/theme.toml b/data/theme.toml
index 5b616c1..d8ac754 100644
--- a/data/theme.toml
+++ b/data/theme.toml
@@ -11,4 +11,5 @@ youtube = 'https://youtube.com/user/'
gitlab = 'https://gitlab.com/'
xing = 'https://www.xing.com/profile/'
rss = '/'
-about = '/' \ No newline at end of file
+about = '/'
+tag = '/' \ No newline at end of file
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
new file mode 100644
index 0000000..63fc8ac
--- /dev/null
+++ b/layouts/_default/terms.html
@@ -0,0 +1,29 @@
+<!-- layouts/_default/terms.html -->
+{{ partial "header" . }}
+{{ partial "nav" . }}
+<section class="section">
+<div class="container">
+ <h1 class="title">{{ .Title }}</h1>
+
+ <div class="subtitle tags is-6 ">
+ {{ $biggest := 1 }}
+ {{ $smallest := 1 }}
+ {{ $max := 3 }}
+ {{ $min := 1 }}
+ {{ $size := $min }}
+
+ {{ $data := .Data }}
+ {{ range $key, $value := .Data.Terms.ByCount }}
+ {{ $size := (add (mul (div $value.Count $biggest) (sub $max $min)) $min) }}
+ {{ $size := (cond (eq $biggest $smallest) $min $size) }}
+
+ <a class = "subtitle is-6" href="{{ $.Site.LanguagePrefix | absURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}/">
+ #{{ $value.Name }}
+ </a>
+
+ {{ end }}
+ </div>
+</div>
+</section>
+{{ partial "page-navigation" . }}
+{{ partial "footer" . }}
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index 6d9b1ff..598ec50 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -13,10 +13,9 @@
{{- $social := ( .Site.Params.social ) -}}
{{- range $platform := $social.config.platforms -}}
{{- with $username := ( index $social $platform ) -}}
-
<!-- do not open "about" in new tab -->
<a class="level-item" aria-label="{{ $platform }}" href='{{ print ( index $.Site.Data.theme.social.base $platform ) $username }}'
- {{ if ne $platform "about" }} target='_blank' {{ end }} rel='noopener'>
+ {{ if or (eq $platform "codepen") (eq $platform "facebook") (eq $platform "github") (eq $platform "instagram") (eq $platform "linkedin") (eq $platform "twitter") (eq $platform "youtube") (eq $platform "gitlab") (eq $platform "xing") }} target='_blank' {{ end }} rel='noopener'>
<span class="icon">
<i class>
{{- partial "svg/icons" $platform -}}