start work to implement a 'read further' separator for the links
Problems: The JS based selectors lead to strange results as in the top5 list there might me no items in the first 5 left. Perhaps a JS-only solution might make sense in the long run
This commit is contained in:
@@ -13,7 +13,7 @@ You can click on the buttons to select only links with the given language or top
|
||||
|
||||
A selection of my presentations and radio shows I participated in. By clicking on the respective icons you can watch the video recording, access the slides and listen to the audio recording.
|
||||
|
||||
{{< links type="av" >}}
|
||||
{{< links type="av" limit="5" >}}
|
||||
|
||||
## Appearance in Media {#media}
|
||||
|
||||
|
||||
@@ -2,9 +2,22 @@
|
||||
{{- $data := .Site.Data.links -}}
|
||||
{{- if $type -}}
|
||||
{{- $data = where $data "type" $type -}}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- $data = sort $data "date" "desc" }}
|
||||
{{- $datalen := $data | len }}
|
||||
{{- $limit := (.Get "limit" | default -1) | int }}
|
||||
{{- $limit_trigger := false }}
|
||||
<ul>
|
||||
{{- range sort $data "date" "desc" }}
|
||||
{{- range $index, $val := $data }}
|
||||
{{- /* Evaluate limit */}}
|
||||
{{- if eq $index $limit }}
|
||||
{{- $limit_trigger = true }}
|
||||
<details><summary>Show more</summary>
|
||||
{{- end }}
|
||||
{{- $tags := slice -}}
|
||||
{{- range $val.lang }}{{ $tags = $tags | append . }}{{ end -}}
|
||||
{{- range $val.tags }}{{ $tags = $tags | append . }}{{ end -}}
|
||||
|
||||
{{- $tags := slice -}}
|
||||
{{- range .lang }}{{ $tags = $tags | append . }}{{ end -}}
|
||||
{{- range .tags }}{{ $tags = $tags | append . }}{{ end -}}
|
||||
@@ -23,4 +36,7 @@
|
||||
{{ range $tags }} <span class="label label-success">{{ . }}</span>{{ end -}}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{- if $limit_trigger }}
|
||||
</details>
|
||||
{{- end }}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user