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

github.com/darshanbaral/aafu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshan Baral <darshanbaral@gmail.com>2019-07-28 01:40:03 +0300
committerDarshan Baral <darshanbaral@gmail.com>2019-07-28 01:40:03 +0300
commitf9b370f03537f591b2e50bc7589943e12c49ae6c (patch)
treecf2f651b1f5ff0802eb790b9d76c5306025dd0ef
parent4e353c33dacfa7f0acc4406c857ca9daae750daf (diff)
Publications now has sections
-rw-r--r--layouts/partials/addTitle.html13
-rw-r--r--layouts/partials/publication.html35
2 files changed, 37 insertions, 11 deletions
diff --git a/layouts/partials/addTitle.html b/layouts/partials/addTitle.html
index 2d8ad0d..1c05bb4 100644
--- a/layouts/partials/addTitle.html
+++ b/layouts/partials/addTitle.html
@@ -1,9 +1,18 @@
{{ if (eq .ind "title") }}
+{{ if (index .all `link`) }}
<a href="{{ index .all `link` }}">
<em>
- {{ index .all .ind }}{{ cond (eq (substr (index .all .ind) -1 1) ".") "" "." }}
+ {{- index .all .ind -}}
+ {{- cond (eq (substr (index .all .ind) -1 1) ".") "" "." -}}
</em>
</a>
{{ else }}
-{{ index .all .ind }}{{ cond (eq (substr (index .all .ind) -1 1) ".") "" "." }}
+<em>
+ {{- index .all .ind -}}
+ {{- cond (eq (substr (index .all .ind) -1 1) ".") "" "." -}}
+</em>
+{{ end }}
+{{ else }}
+{{- index .all .ind -}}
+{{- cond (eq (substr (index .all .ind) -1 1) ".") "" "." -}}
{{ end }}
diff --git a/layouts/partials/publication.html b/layouts/partials/publication.html
index 210835c..b0f4de5 100644
--- a/layouts/partials/publication.html
+++ b/layouts/partials/publication.html
@@ -1,12 +1,29 @@
-{{- $first := index .Site.Params.publication.format 0 -}}
-{{- $second := index .Site.Params.publication.format 1 -}}
-{{- $third := index .Site.Params.publication.format 2 -}}
-{{- $fourth := index .Site.Params.publication.format 3 -}}
-{{ range .Site.Params.publication.list }}
+{{ if .Site.Params.publication.types }}
+{{ if .Site.Params.publication.types }}
+{{ range.Site.Params.publication.types }}
+{{ $type := . }}
+<h4 style="text-decoration: underline;">{{ $type }}</h4>
+{{- range $.Site.Params.publication.list -}}
+{{ if eq $type .type }}
+{{- $this_publication := . -}}
<p>
- {{ partial "addTitle" (dict "all" . "ind" $first) }}
- {{ partial "addTitle" (dict "all" . "ind" $second) }}
- {{ partial "addTitle" (dict "all" . "ind" $third) }}
- {{ partial "addTitle" (dict "all" . "ind" $fourth) }}
+ {{- range $.Site.Params.publication.format -}}
+ {{- partial "addTitle" (dict "all" $this_publication "ind" .) -}}
+ {{- end -}}
</p>
{{ end }}
+{{- end -}}
+{{ end }}
+{{ end }}
+
+{{ else }}
+
+{{- range $.Site.Params.publication.list -}}
+{{- $this_publication := . -}}
+<p>
+ {{- range $.Site.Params.publication.format -}}
+ {{- partial "addTitle" (dict "all" $this_publication "ind" .) -}}
+ {{- end -}}
+</p>
+{{ end }}
+{{ end }}