refactoring everything teehee (i'm so glad this isn't a team project)
Signed-off-by: ari melody <ari@arimelody.me>
This commit is contained in:
parent
c684f0c7ae
commit
10f5f51e76
17 changed files with 970 additions and 547 deletions
|
@ -1,28 +1,28 @@
|
|||
{{define "head"}}
|
||||
<title>{{.Title}} - {{.PrintPrimaryArtists false true}}</title>
|
||||
<link rel="icon" href="{{.ResolveArtwork}}">
|
||||
<title>{{.GetTitle}} - {{.PrintArtists true true}}</title>
|
||||
<link rel="icon" type="image/png" href="{{.GetArtwork}}">
|
||||
|
||||
<meta name="description" content="Stream "{{.Title}}" by {{.PrintPrimaryArtists false true}} on all platforms!">
|
||||
<meta name="author" content="{{.PrintPrimaryArtists false true}}">
|
||||
<meta name="keywords" content="{{.PrintPrimaryArtists false false}}, music, {{.Title}}, {{.Id}}, {{.GetReleaseYear}}">
|
||||
<meta name="description" content="Stream "{{.GetTitle}}" by {{.PrintArtists true true}} on all platforms!">
|
||||
<meta name="author" content="{{.PrintArtists true true}}">
|
||||
<meta name="keywords" content="{{.PrintArtists true false}}, music, {{.GetTitle}}, {{.GetID}}, {{.GetReleaseYear}}">
|
||||
|
||||
<meta property="og:url" content="https://arimelody.me/music/{{.Id}}">
|
||||
<meta property="og:url" content="https://arimelody.me/music/{{.GetID}}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:locale" content="en_IE">
|
||||
<meta property="og:site_name" content="ari melody music">
|
||||
<meta property="og.Title" content="{{.Title}} - {{.PrintPrimaryArtists false true}}">
|
||||
<meta property="og:description" content="Stream "{{.Title}}" by {{.PrintPrimaryArtists false true}} on all platforms!">
|
||||
<meta property="og:image" content="https://arimelody.me{{.ResolveArtwork}}">
|
||||
<meta property="og.Title" content="{{.GetTitle}} - {{.PrintArtists true true}}">
|
||||
<meta property="og:description" content="Stream "{{.GetTitle}}" by {{.PrintArtists true true}} on all platforms!">
|
||||
<meta property="og:image" content="https://arimelody.me{{.GetArtwork}}">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@funniduck">
|
||||
<meta name="twitter:creator" content="@funniduck">
|
||||
<meta property="twitter:domain" content="arimelody.me">
|
||||
<meta property="twitter:url" content="https://arimelody.me/music/{{.Id}}">
|
||||
<meta name="twitter.Title" content="{{.PrintPrimaryArtists false true}} - {{.Title}}">
|
||||
<meta name="twitter:description" content="Stream "{{.Title}}" by {{.PrintPrimaryArtists false true}} on all platforms!">
|
||||
<meta name="twitter:image" content="https://arimelody.me{{.ResolveArtwork}}">
|
||||
<meta name="twitter:image:alt" content="Cover art for "{{.Title}}"">
|
||||
<meta property="twitter:url" content="https://arimelody.me/music/{{.GetID}}">
|
||||
<meta name="twitter.Title" content="{{.PrintArtists true true}} - {{.GetTitle}}">
|
||||
<meta name="twitter:description" content="Stream "{{.GetTitle}}" by {{.PrintArtists true true}} on all platforms!">
|
||||
<meta name="twitter:image" content="https://arimelody.me{{.GetArtwork}}">
|
||||
<meta name="twitter:image:alt" content="Cover art for "{{.GetTitle}}"">
|
||||
|
||||
<link rel="stylesheet" href="/style/main.css">
|
||||
<link rel="stylesheet" href="/style/music-gateway.css">
|
||||
|
@ -32,7 +32,7 @@
|
|||
<main>
|
||||
<script type="module" src="/script/music-gateway.js"></script>
|
||||
|
||||
<div id="background" style="background-image: url({{.ResolveArtwork}})"></div>
|
||||
<div id="background" style="background-image: url({{.GetArtwork}})"></div>
|
||||
|
||||
<a href="/music" swap-url="/music" id="go-back" title="back to arimelody.me"><</a>
|
||||
<br><br>
|
||||
|
@ -47,51 +47,51 @@
|
|||
<div class="tilt-bottom"></div>
|
||||
<div class="tilt-bottomleft"></div>
|
||||
<div class="tilt-left"></div>
|
||||
<img id="artwork" src="{{.ResolveArtwork}}" alt="{{.Title}} artwork" width=240 height=240>
|
||||
<img id="artwork" src="{{.GetArtwork}}" alt="{{.GetTitle}} artwork" width=240 height=240>
|
||||
</div>
|
||||
<div id="vertical-line"></div>
|
||||
<div id="info">
|
||||
<div id="overview">
|
||||
<div id="title-container">
|
||||
<h1 id="title">{{.Title}}</h1>
|
||||
<h1 id="title">{{.GetTitle}}</h1>
|
||||
<span id="year" title="{{.PrintReleaseDate}}">{{.GetReleaseYear}}</span>
|
||||
</div>
|
||||
<p id="artist">{{.PrintPrimaryArtists false true}}</p>
|
||||
<p id="type" class="{{.ResolveType}}">{{.ResolveType}}</p>
|
||||
<p id="artist">{{.PrintArtists true true}}</p>
|
||||
<p id="type" class="{{.GetType}}">{{.GetType}}</p>
|
||||
|
||||
<ul id="links">
|
||||
{{if .Buylink}}
|
||||
{{if .GetBuyLink}}
|
||||
<li>
|
||||
<a href="{{.Buylink}}" class="buy">{{or .Buyname "buy"}}</a>
|
||||
<a href="{{.GetBuyLink}}" class="buy">{{or .GetBuyName "buy"}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
|
||||
{{range .Links}}
|
||||
{{range .GetLinks}}
|
||||
<li>
|
||||
<a class="{{.NormaliseName}}" href="{{.Url}}">{{.Name}}</a>
|
||||
<a class="{{.NormaliseName}}" href="{{.GetURL}}">{{.GetName}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
|
||||
{{if .Description}}
|
||||
{{if .GetDescription}}
|
||||
<p id="description">
|
||||
{{.Description}}
|
||||
{{.GetDescription}}
|
||||
</p>
|
||||
{{end}}
|
||||
|
||||
<button id="share">share</button>
|
||||
</div>
|
||||
|
||||
{{if .Credits}}
|
||||
{{if .GetCredits}}
|
||||
<div id="credits">
|
||||
<h2>credits:</h2>
|
||||
<ul>
|
||||
{{range .Credits}}
|
||||
{{$Artist := .ResolveArtist}}
|
||||
{{if $Artist.Website}}
|
||||
<li><strong><a href="{{$Artist.Website}}">{{$Artist.Name}}</a></strong>: {{.Role}}</li>
|
||||
{{range .GetCredits}}
|
||||
{{$Artist := .GetArtist}}
|
||||
{{if $Artist.GetWebsite}}
|
||||
<li><strong><a href="{{$Artist.GetWebsite}}">{{$Artist.GetName}}</a></strong>: {{.GetRole}}</li>
|
||||
{{else}}
|
||||
<li><strong>{{$Artist.Name}}</strong>: {{.Role}}</li>
|
||||
<li><strong>{{$Artist.GetName}}</strong>: {{.GetRole}}</li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</ul>
|
||||
|
@ -99,38 +99,38 @@
|
|||
{{end}}
|
||||
|
||||
{{if .IsSingle}}
|
||||
{{$Track := index .Tracks 0}}
|
||||
{{if $Track.Lyrics}}
|
||||
{{$Track := index .GetTracks 0}}
|
||||
{{if $Track.GetLyrics}}
|
||||
<div id="lyrics">
|
||||
<h2>lyrics:</h2>
|
||||
<p>{{$Track.Lyrics}}</p>
|
||||
<p>{{$Track.GetLyrics}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<div id="tracks">
|
||||
<h2>tracks:</h2>
|
||||
{{range .Tracks}}
|
||||
{{range .GetTracks}}
|
||||
<details>
|
||||
<summary class="album-track-title">{{.Title}}</summary>
|
||||
{{.Lyrics}}
|
||||
<summary class="album-track-title">{{.GetTitle}}</summary>
|
||||
{{.GetLyrics}}
|
||||
</details>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{if or .Credits not .IsSingle}}
|
||||
{{if or .GetCredits not .IsSingle}}
|
||||
<div id="extras">
|
||||
<ul>
|
||||
<li><a href="#overview">overview</a></li>
|
||||
|
||||
{{if .Credits}}
|
||||
{{if .GetCredits}}
|
||||
<li><a href="#credits">credits</a></li>
|
||||
{{end}}
|
||||
|
||||
{{if .IsSingle}}
|
||||
{{$Track := index .Tracks 0}}
|
||||
{{if $Track.Lyrics}}
|
||||
{{$Track := index .GetTracks 0}}
|
||||
{{if $Track.GetLyrics}}
|
||||
<li><a href="#lyrics">lyrics</a></li>
|
||||
{{end}}
|
||||
{{else}}
|
||||
|
@ -158,7 +158,7 @@
|
|||
<!-- <% } else { %> -->
|
||||
<!-- <div class="track-preview" id="preview-<%= data.id %>"> -->
|
||||
<!-- <i class="fa-solid fa-play play"></i> -->
|
||||
<!-- <p>{{.Title}}</p> -->
|
||||
<!-- <p>{{.GetTitle}}</p> -->
|
||||
<!-- <audio src="<%= file %>"></audio> -->
|
||||
<!-- </div> -->
|
||||
<!-- <% } %> -->
|
||||
|
|
|
@ -25,19 +25,19 @@
|
|||
</h1>
|
||||
|
||||
<div id="music-container">
|
||||
{{range $Album := .}}
|
||||
<div class="music" id="{{$Album.Id}}" swap-url="/music/{{$Album.Id}}">
|
||||
{{range $Release := .}}
|
||||
<div class="music" id="{{$Release.GetID}}" swap-url="/music/{{$Release.GetID}}">
|
||||
<div class="music-artwork">
|
||||
<img src="{{$Album.ResolveArtwork}}" alt="{{$Album.Title}} artwork" width="128" loading="lazy">
|
||||
<img src="{{$Release.GetArtwork}}" alt="{{$Release.GetTitle}} artwork" width="128" loading="lazy">
|
||||
</div>
|
||||
<div class="music-details">
|
||||
<a href="/music/{{$Album.Id}}"><h1 class="music-title">{{$Album.Title}}</h1></a>
|
||||
<h2 class="music-artist">{{$Album.PrintPrimaryArtists false true}}</h2>
|
||||
<h3 class="music-type-{{.ResolveType}}">{{$Album.ResolveType}}</h3>
|
||||
<a href="/music/{{$Release.GetID}}"><h1 class="music-title">{{$Release.GetTitle}}</h1></a>
|
||||
<h2 class="music-artist">{{$Release.PrintArtists true true}}</h2>
|
||||
<h3 class="music-type-{{$Release.GetType}}">{{$Release.GetType}}</h3>
|
||||
<ul class="music-links">
|
||||
{{range $Link := $Album.Links}}
|
||||
{{range $Link := $Release.GetLinks}}
|
||||
<li>
|
||||
<a href="{{$Link.Url}}" class="link-button">{{$Link.Name}}</a>
|
||||
<a href="{{$Link.GetURL}}" class="link-button">{{$Link.GetName}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue