Skip to content

Commit

Permalink
Add baseURL into links
Browse files Browse the repository at this point in the history
  • Loading branch information
dfalster committed Mar 19, 2024
1 parent 2f6b37f commit b3bb37a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ taxonomies:
label: label
year: year
format: format
condition: condition

13 changes: 7 additions & 6 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@

{{ $default_img := resources.Get "img/default.png" }}
<section class="album-card" style="background-image: url('{{ if .Params.cover }}{{ .Site.BaseURL }}/{{ .Params.cover }}{{ else }}{{ $default_img.Permalink }}{{ end }}')">

{{ if .Params.artist }}
<a href="/artist/{{ .Params.band | urlize }}" class="album-artist">{{ .Params.artist }}</a>
<a href="/AI-species-catalogue/artist/{{ .Params.band | urlize }}" class="album-artist">{{ .Params.artist }}</a>
{{ end }}
<a href="{{ .Page.Permalink }}" class="album-title">{{ .Title }}</a>
{{ if .Params.genres }}
<p class="album-genres">
{{ range .Params.genres }}
<a href="/genres/{{ . | urlize }}" class="genres">{{ . }}</a>
<a href="/AI-species-catalogue/genres/{{ . | urlize }}" class="genres">Gaah{{ . }}</a>
{{ end }}
</p>
{{ end }}
<ul>
{{ if .Params.year }}
<li><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18"><path d="M9 1V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7V1H9ZM20 11H4V19H20V11ZM7 5H4V9H20V5H17V7H15V5H9V7H7V5Z"></path></svg> Year : <a href="/year/{{ .Params.year }}" class="album-info">{{ .Params.year }}</a></li>
<li><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18"><path d="M9 1V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7V1H9ZM20 11H4V19H20V11ZM7 5H4V9H20V5H17V7H15V5H9V7H7V5Z"></path></svg> Year : <a href="{{ .Site.BaseURL }}/year/{{ .Params.year }}" class="album-info">{{ .Params.year }}</a></li>
{{ end }}
{{ if .Params.format }}
<li> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
Expand All @@ -33,15 +34,15 @@
</path>
</svg> Platform:
{{ range .Params.format }}
<a href="/format/{{ . | urlize }}" class="album-info">{{ . }}</a>
<a href="/AI-species-catalogue/format/{{ . | urlize }}" class="album-info">{{ . }}</a>
{{ end }}
</li>
{{ end }}
{{ if .Params.condition }}
<li>Condition : <a href="/condition/{{ .Params.condition | urlize }}" class="album-info">{{ .Params.condition }}</a> </li>
<li>Condition : <a href="/AI-species-catalogue/condition/{{ .Params.condition | urlize }}" class="album-info">{{ .Params.condition }}</a> </li>
{{ end }}
{{ if .Params.label }}
<li><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18"><path d="M10.9042 2.1001L20.8037 3.51431L22.2179 13.4138L13.0255 22.6062C12.635 22.9967 12.0019 22.9967 11.6113 22.6062L1.71184 12.7067C1.32131 12.3162 1.32131 11.683 1.71184 11.2925L10.9042 2.1001ZM11.6113 4.22142L3.83316 11.9996L12.3184 20.4849L20.0966 12.7067L19.036 5.28208L11.6113 4.22142ZM13.7327 10.5854C12.9516 9.80433 12.9516 8.538 13.7327 7.75695C14.5137 6.9759 15.78 6.9759 16.5611 7.75695C17.3421 8.538 17.3421 9.80433 16.5611 10.5854C15.78 11.3664 14.5137 11.3664 13.7327 10.5854Z"></path></svg> Business model : <a href="/label/{{ .Params.label | urlize }}" class="album-info">{{ .Params.label }}</a></li>
<li><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18"><path d="M10.9042 2.1001L20.8037 3.51431L22.2179 13.4138L13.0255 22.6062C12.635 22.9967 12.0019 22.9967 11.6113 22.6062L1.71184 12.7067C1.32131 12.3162 1.32131 11.683 1.71184 11.2925L10.9042 2.1001ZM11.6113 4.22142L3.83316 11.9996L12.3184 20.4849L20.0966 12.7067L19.036 5.28208L11.6113 4.22142ZM13.7327 10.5854C12.9516 9.80433 12.9516 8.538 13.7327 7.75695C14.5137 6.9759 15.78 6.9759 16.5611 7.75695C17.3421 8.538 17.3421 9.80433 16.5611 10.5854C15.78 11.3664 14.5137 11.3664 13.7327 10.5854Z"></path></svg> Business model : <a href="/AI-species-catalogue/label/{{ .Params.label | urlize }}" class="album-info">{{ .Params.label }}</a></li>
{{ end }} </ul>
</section>
{{ end }}
Expand Down
12 changes: 6 additions & 6 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<header style="background-image: url('https://www.sydneyoperahouse.com/sites/default/files/styles/3x1__2560w/public/collaborodam_assets/more-than-human-3-1.jpg.webp?itok=DtUpvrVN');">
<h1>{{ .Site.Title }}</h1>
<nav>
<a href="{{ .Site.BaseURL }}">Home</a>
<a href="/about/">About</a>
<a href="/artist/">Species</a>
<a href="/genres/">Functions</a>
<a href="/format/">Platform</a>
<a href="/label/">Business model</a>
<a href="/AI-species-catalogue">Home</a>
<a href="/AI-species-catalogue/about/">About</a>
<a href="/AI-species-catalogue/artist/">Species</a>
<a href="/AI-species-catalogue/genres/">Functions</a>
<a href="/AI-species-catalogue/format/">Platform</a>
<a href="/AI-species-catalogue/label/">Business model</a>
</nav>


Expand Down

0 comments on commit b3bb37a

Please sign in to comment.