talk archive: display listings consistent with talk widget (Close #184)

- talk widget: Change `detailed_list = false` option to `list_format = 0`
- Update docs
This commit is contained in:
George Cushen 2017-10-01 00:10:38 +01:00
commit 2c74ad3947
7 changed files with 27 additions and 34 deletions

View file

@ -14,8 +14,10 @@ weight = 30
# Number of talks to list.
count = 10
# Show talk details (such as abstract)? (true/false)
detailed_list = false
# List format.
# 0 = Simple
# 1 = Detailed
list_format = 0
+++

View file

@ -66,7 +66,7 @@ You can also associate custom link buttons with the publication by adding the fo
url = "http://www.example.org"
```
If you enabled `detailed_list` for publications in `config.toml`, then there are a few more optional variables that you can include in the publication page preamble. You may use `abstract_short = "friendly summary of abstract"` and `publication_short = "abbreviated publication details"` to display a friendly summary of the abstract and abbreviate the publication details, respectively. Furthermore, there is the option to display a different image on the homepage to the publication detail page by setting `image_preview = "my-image.jpg"`. This can be useful if you wish to scale down the image for the homepage or simply if you just wish to show a different image for the preview.
If you set `list_format=2` to enable a detailed listing of publications in the Publication Widget (`home/publications.md`) or Publication Archive (`publication/_index.md`), then there are a few more optional variables that you can include in the publication page preamble. You may use `abstract_short = "friendly summary of abstract"` and `publication_short = "abbreviated publication details"` to display a friendly summary of the abstract and abbreviate the publication details, respectively. Furthermore, there is the option to display a different image on the homepage to the publication detail page by setting `image_preview = "my-image.jpg"`. This can be useful if you wish to scale down the image for the homepage or simply if you just wish to show a different image for the preview.
{{% alert warning %}}
Any double quotes (`"`) or backslashes (e.g. LaTeX `\times`) occurring within the value of any frontmatter parameter (such as the *abstract*) should be escaped with a backslash (`\`). For example, the symbol `"` and LaTeX text `\times` become `\"` and `\\times`, respectively. Refer to the [TOML documentation](https://github.com/toml-lang/toml#user-content-string) for more info.

View file

@ -4,9 +4,13 @@ date = "2017-01-01T00:00:00Z"
math = false
highlight = false
# List format.
# 0 = Simple
# 1 = Detailed
list_format = 0
# Optional featured image (relative to `static/img/` folder).
[header]
image = ""
caption = ""
+++

View file

@ -1,5 +1,5 @@
<li itemscope itemtype="http://schema.org/CreativeWork">
<i class="fa-li fa fa-comment-o pub-icon" aria-hidden="true"></i>
<div class="pub-list-item" style="margin-bottom: 1rem" itemscope itemtype="http://schema.org/CreativeWork">
<i class="fa fa-comment-o pub-icon" aria-hidden="true"></i>
<span itemprop="name"><a href="{{ .Permalink }}">{{ .Title }}</a></span>
<p>
{{ .Date.Format $.Site.Params.date_format }},
@ -9,4 +9,4 @@
{{ .Params.event | markdownify }}
{{ end }}
</p>
</li>
</div>

View file

@ -19,17 +19,12 @@
<div class="col-xs-12 col-md-8">
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if $page.Params.detailed_list }}
{{ range first $page.Params.count (where $.Data.Pages "Type" "talk") }}
{{ partial "talk_li_detailed" . }}
{{ end }}
{{ else }}
<ul class="fa-ul">
{{ range first $page.Params.count (where $.Data.Pages "Type" "talk") }}
{{ partial "talk_li_simple" . }}
{{ if eq $page.Params.list_format 1 }}
{{ partial "talk_li_detailed" . }}
{{ else }}
{{ partial "talk_li_simple" . }}
{{ end }}
</ul>
{{ end }}
</div>
</div>

View file

@ -10,17 +10,12 @@
<div class="col-xs-12 col-md-8">
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if $page.Params.detailed_list }}
{{ range (where (where $.Data.Pages "Type" "talk") ".Params.selected" true) }}
{{ partial "talk_li_detailed" . }}
{{ end }}
{{ else }}
<ul class="fa-ul">
{{ range (where (where $.Data.Pages "Type" "talk") ".Params.selected" true) }}
{{ partial "talk_li_simple" . }}
{{ if eq $page.Params.list_format 1 }}
{{ partial "talk_li_detailed" . }}
{{ else }}
{{ partial "talk_li_simple" . }}
{{ end }}
</ul>
{{ end }}
</div>
</div>

View file

@ -18,18 +18,15 @@
<h3>{{ .Key }}</h3>
</div>
<div class="col-md-10">
<ul class="compact fa-ul">
{{ range .Pages.ByDate.Reverse }}
<li>
<i class="fa-li fa fa-comment-o" aria-hidden="true"
style="color:#03396c;font-size:80%;padding-top:6px;"></i>
{{ .Title }}
<p>{{ partial "talk_links" (dict "content" . "is_list" 1) }}</p>
</li>
{{ range .Pages.ByDate.Reverse }}
{{ if eq $.Params.list_format 1 }}
{{ partial "talk_li_detailed" . }}
{{ else }}
{{ partial "talk_li_simple" . }}
{{ end }}
{{ end }}
</ul>
</div>
</div>
{{ end }}