diff options
author | Darshan Baral <darshanbaral@gmail.com> | 2019-07-26 07:05:24 +0300 |
---|---|---|
committer | Darshan Baral <darshanbaral@gmail.com> | 2019-07-26 07:05:24 +0300 |
commit | 81207224c7f0d8f8a29ce75eef857c6054e9c5bc (patch) | |
tree | 82c51d92eb869a6221fe64553542f436e8b9a751 | |
parent | 09e92ed0789e98c81fc27759f8841769b22c0b9d (diff) |
allows reordering portions of publication
-rw-r--r-- | exampleSite/config.toml | 23 | ||||
-rw-r--r-- | layouts/partials/addTitle.html | 9 | ||||
-rw-r--r-- | layouts/partials/publication.html | 13 |
3 files changed, 30 insertions, 15 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 0ceaa33..830c3f5 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -7,13 +7,13 @@ theme = "aafu" author = "Darshan Baral"
description = "Website title"
copyright = "aaa"
-
+
[params.theme]
allowToggle = true
mainTheme = "light"
altTheme = "dark"
- [params.favicons]
+ [params.favicons]
use = true
metas = '''
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
@@ -27,8 +27,8 @@ theme = "aafu" # Profile section
[params.profile]
name = "First Last, Abbr."
- tagline = "Title"
- location = "City Name, ST"
+ tagline = "Title"
+ location = "City Name, ST"
photo = "profile.jpg"
# Section for links to social websites
@@ -55,12 +55,12 @@ theme = "aafu" icon = "fa-twitter"
url = "#"
title = "Twitter"
- [[params.social.list]]
+ [[params.social.list]]
class = "ai"
icon = "ai-google-scholar"
url = "#"
title = "Google Scholar"
- [[params.social.list]]
+ [[params.social.list]]
class = "ai"
icon = "ai-researchgate"
url = "#"
@@ -130,6 +130,7 @@ theme = "aafu" [params.publication]
title = "Publications"
icon = "fas fa-book"
+ format = ["date", "authors", "title", "journal"]
[[params.publication.list]]
title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
@@ -137,12 +138,14 @@ theme = "aafu" date = "2018"
journal = "Journal of Field 52 (16), 9033-9044"
link = "#"
+
[[params.publication.list]]
title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
authors = "F Last, F Second, P secondary"
date = "2018"
journal = "Journal of Field 52 (16), 9033-9044"
link = "#"
+
[[params.publication.list]]
title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
authors = "F Last, F Second, P secondary"
@@ -192,10 +195,10 @@ theme = "aafu" [params.hobby]
title = "Hobbies"
icon = "fas fa-gamepad"
-
+
[[params.hobby.list]]
- hobby = "Cooking"
+ hobby = "Cooking"
[[params.hobby.list]]
- hobby = "Hiking"
+ hobby = "Hiking"
[[params.hobby.list]]
- hobby = "Baking"
+ hobby = "Baking"
\ No newline at end of file diff --git a/layouts/partials/addTitle.html b/layouts/partials/addTitle.html new file mode 100644 index 0000000..2d8ad0d --- /dev/null +++ b/layouts/partials/addTitle.html @@ -0,0 +1,9 @@ +{{ if (eq .ind "title") }} +<a href="{{ index .all `link` }}"> + <em> + {{ 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) ".") "" "." }} +{{ end }} diff --git a/layouts/partials/publication.html b/layouts/partials/publication.html index 357a0e0..210835c 100644 --- a/layouts/partials/publication.html +++ b/layouts/partials/publication.html @@ -1,9 +1,12 @@ +{{- $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 }}
<p>
- {{ .date }} · {{ .authors }} ·
- <a href="{{ .link }}"
- ><i>"{{ .title }}"</i></a
- >
- {{ .journal }}
+ {{ partial "addTitle" (dict "all" . "ind" $first) }}
+ {{ partial "addTitle" (dict "all" . "ind" $second) }}
+ {{ partial "addTitle" (dict "all" . "ind" $third) }}
+ {{ partial "addTitle" (dict "all" . "ind" $fourth) }}
</p>
{{ end }}
|