Update list components

This commit is contained in:
Gabriel Arazas 2023-03-23 14:30:22 +08:00
parent e2a3455162
commit cc1eb4f9ad
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 5 additions and 9 deletions

View File

@ -1,10 +1,8 @@
<ul class="list links site__links--content" style="margin: 0">
<nav class="links site__links--content" style="margin: 0">
{{ range $.Site.Menus.links }}
<li>
<a href="{{ .URL }}" rel="me">{{ .Name }}</a>
</li>
<a href="{{ .URL }}" rel="me">{{ .Name }}</a>
{{ end }}
</ul>
</nav>
<style>
.links {
--size: 1.5em;

View File

@ -1,6 +1,6 @@
<!-- List all of the social media links -->
{{ with (index $.Site.Data "more-contentful").contacts }}
<ul class="list site__socials--content">
<nav class="site__socials--content">
{{ $useImage := index . "useImage" | default false }}
{{ $links := sort .links "name" "asc" }}
@ -8,12 +8,10 @@
{{- /* Render the link only to externally linked pages/files and those with >=0 weight. */ -}}
{{ if (and (not .excludeInMenu) (eq (absLangURL .url) .url)) }}
<li>
<a {{ if $useImage }}class="site__social-icon"{{ end }} rel="me" href="{{ .url | absLangURL }}" aria-label="{{ with .name }}{{ . }}{{ else }}{{ .id }}{{ end }}">
{{- .name }}
</a>
</li>
{{ end }}
{{- end -}}
</ul>
</nav>
{{ end }}