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.
|
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}
|
## Appearance in Media {#media}
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,22 @@
|
|||||||
{{- $data := .Site.Data.links -}}
|
{{- $data := .Site.Data.links -}}
|
||||||
{{- if $type -}}
|
{{- if $type -}}
|
||||||
{{- $data = where $data "type" $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>
|
<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 -}}
|
{{- $tags := slice -}}
|
||||||
{{- range .lang }}{{ $tags = $tags | append . }}{{ end -}}
|
{{- range .lang }}{{ $tags = $tags | append . }}{{ end -}}
|
||||||
{{- range .tags }}{{ $tags = $tags | append . }}{{ end -}}
|
{{- range .tags }}{{ $tags = $tags | append . }}{{ end -}}
|
||||||
@@ -23,4 +36,7 @@
|
|||||||
{{ range $tags }} <span class="label label-success">{{ . }}</span>{{ end -}}
|
{{ range $tags }} <span class="label label-success">{{ . }}</span>{{ end -}}
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{- if $limit_trigger }}
|
||||||
|
</details>
|
||||||
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user