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

github.com/2-REC/hugo-myportfolio-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Severin <severinderek@gmail.com>2018-10-15 14:26:29 +0300
committerDerek Severin <severinderek@gmail.com>2018-10-15 14:26:29 +0300
commitf3a38ab9d05f246fc02f88e0d48696b229096740 (patch)
treebb03dbd42f7b229d27d54b9cc47af217642ba284
parent3f7788e56685fb08e1a4cf490c5337559e01d06b (diff)
parenta92adcc07769694a12f8834c60f9529e3160cd6f (diff)
Merge branch 'master' of https://github.com/2-REC/hugo-myportfolio-theme
-rw-r--r--layouts/_default/limage.html5
-rw-r--r--layouts/partials/sections/skills.html16
-rw-r--r--layouts/partials/utils/list-keywords-range.html24
3 files changed, 31 insertions, 14 deletions
diff --git a/layouts/_default/limage.html b/layouts/_default/limage.html
index c2ad958..52c82b0 100644
--- a/layouts/_default/limage.html
+++ b/layouts/_default/limage.html
@@ -1,8 +1,9 @@
<div class="col-lg-4 col-sm-6">
{{ $path := replace .Dir "\\" "/" }}
<a href="/{{ $path }}" class="project-box project-link">
- {{ if .Params.small_image }}
- {{ $image := .Resources.GetMatch .Params.small_image }}
+ {{ $image_file := or .Params.cover_image .Params.small_image }}
+ {{ if $image_file }}
+ {{ $image := .Resources.GetMatch $image_file }}
{{ with $image }}
<img src="{{ .RelPermalink | relURL }}" class="img-responsive" alt="{{ .Name }}">
{{ end }}
diff --git a/layouts/partials/sections/skills.html b/layouts/partials/sections/skills.html
index 0770d11..a177cbf 100644
--- a/layouts/partials/sections/skills.html
+++ b/layouts/partials/sections/skills.html
@@ -40,12 +40,8 @@
{{ $label := or $data.tags_label "TAGS" }}
<h4>{{ $label }}</h4>
<div class="tags">
- {{ range $project_sections }}
- {{ with $.Site.GetPage "section" . }}
- {{ $params := (dict "type" "tags" "context" . "scratch" .Scratch "removeDuplicates" true) }}
- {{ partial "utils/list-keywords.html" $params }}
- {{ end }}
- {{ end }}
+ {{ $params := (dict "type" "tags" "context" $project_sections "site" $.Site "scratch" .Scratch "removeDuplicates" true) }}
+ {{ partial "utils/list-keywords-range.html" $params }}
</div>
</div>
</div>
@@ -55,12 +51,8 @@
{{ $label := or $data.categories_label "CATEGORIES" }}
<h4>{{ $label }}</h4>
<div class="tags">
- {{ range $project_sections }}
- {{ with $.Site.GetPage "section" . }}
- {{ $params := (dict "type" "categories" "context" . "scratch" .Scratch "removeDuplicates" true) }}
- {{ partial "utils/list-keywords.html" $params }}
- {{ end }}
- {{ end }}
+ {{ $params := (dict "type" "categories" "context" $project_sections "site" $.Site "scratch" .Scratch "removeDuplicates" true) }}
+ {{ partial "utils/list-keywords-range.html" $params }}
</div>
</div>
</div>
diff --git a/layouts/partials/utils/list-keywords-range.html b/layouts/partials/utils/list-keywords-range.html
new file mode 100644
index 0000000..2ecd4d8
--- /dev/null
+++ b/layouts/partials/utils/list-keywords-range.html
@@ -0,0 +1,24 @@
+{{/*
+ Parameters:
+ - type: "tags" or "categories"
+ - context: (project_sections)
+ - site: (Site)
+ - scratch: (Scratch)
+ - removeDuplicates: BOOL
+*/}}
+
+{{ .scratch.Delete .type }}
+{{ range .context }}
+ {{ with $.site.GetPage "section" . }}
+ {{ $params := (dict "type" $.type "context" . "scratch" $.scratch "removeDuplicates" $.removeDuplicates) }}
+ {{ partial "utils/get-keywords.html" $params }}
+ {{ end }}
+{{ end }}
+{{ .scratch.Set .type (uniq (.scratch.Get .type)) }}
+
+{{ range (.scratch.Get .type) }}
+ <a href="{{ (print "/" $.type "/") | relLangURL }}{{ . | urlize }}" title="{{ . }}">
+ {{ . }}
+ </a>
+{{ end }}
+{{ .scratch.Delete .type }}