slice things up in partials for modularity
This commit is contained in:
parent
c9a800d5fa
commit
b702ce6cda
6 changed files with 135 additions and 127 deletions
22
themes/one-pager/layouts/partials/music.html
Normal file
22
themes/one-pager/layouts/partials/music.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<!-- MUSIC SECTION -->
|
||||
<section id="music" class="section">
|
||||
<h2>Music Traxxx</h2>
|
||||
<div style="text-align: right; margin-bottom: 1rem;">
|
||||
<button onclick="refreshMusic()" class="refresh-button">
|
||||
<span>🎲 Randomize</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="music-grid" id="musicGrid">
|
||||
{{ $allMusic := slice }}
|
||||
{{ range $path, $entries := hugo.Data.music }}
|
||||
{{ range $entries }}
|
||||
{{ $allMusic = $allMusic | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $musicData := jsonify $allMusic }}
|
||||
<script>
|
||||
window.allMusicData = {{ $musicData | safeJS }};
|
||||
</script>
|
||||
</div>
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue