HOLY REFACTOR GOOD GRIEF (also finally started some CRUD work)
Signed-off-by: ari melody <ari@arimelody.me>
This commit is contained in:
parent
1c310c9101
commit
442889340c
80 changed files with 1571 additions and 1330 deletions
|
@ -1,28 +1,28 @@
|
|||
{{define "head"}}
|
||||
<title>{{.GetTitle}} - {{.PrintArtists true true}}</title>
|
||||
<title>{{.Title}} - {{.PrintArtists true true}}</title>
|
||||
<link rel="icon" type="image/png" href="{{.GetArtwork}}">
|
||||
|
||||
<meta name="description" content="Stream "{{.GetTitle}}" by {{.PrintArtists true true}} on all platforms!">
|
||||
<meta name="description" content="Stream "{{.Title}}" 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 name="keywords" content="{{.PrintArtists true false}}, music, {{.Title}}, {{.ID}}, {{.GetReleaseYear}}">
|
||||
|
||||
<meta property="og:url" content="https://arimelody.me/music/{{.GetID}}">
|
||||
<meta property="og:url" content="https://arimelody.me/music/{{.ID}}">
|
||||
<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="{{.GetTitle}} - {{.PrintArtists true true}}">
|
||||
<meta property="og:description" content="Stream "{{.GetTitle}}" by {{.PrintArtists true true}} on all platforms!">
|
||||
<meta property="og.Title" content="{{.Title}} - {{.PrintArtists true true}}">
|
||||
<meta property="og:description" content="Stream "{{.Title}}" 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/{{.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 property="twitter:url" content="https://arimelody.me/music/{{.ID}}">
|
||||
<meta name="twitter.Title" content="{{.PrintArtists true true}} - {{.Title}}">
|
||||
<meta name="twitter:description" content="Stream "{{.Title}}" 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}}"">
|
||||
<meta name="twitter:image:alt" content="Cover art for "{{.Title}}"">
|
||||
|
||||
<link rel="stylesheet" href="/style/main.css">
|
||||
<link rel="stylesheet" href="/style/music-gateway.css">
|
||||
|
@ -47,51 +47,51 @@
|
|||
<div class="tilt-bottom"></div>
|
||||
<div class="tilt-bottomleft"></div>
|
||||
<div class="tilt-left"></div>
|
||||
<img id="artwork" src="{{.GetArtwork}}" alt="{{.GetTitle}} artwork" width=240 height=240>
|
||||
<img id="artwork" src="{{.GetArtwork}}" alt="{{.Title}} artwork" width=240 height=240>
|
||||
</div>
|
||||
<div id="vertical-line"></div>
|
||||
<div id="info">
|
||||
<div id="overview">
|
||||
<div id="title-container">
|
||||
<h1 id="title">{{.GetTitle}}</h1>
|
||||
<h1 id="title">{{.Title}}</h1>
|
||||
<span id="year" title="{{.PrintReleaseDate}}">{{.GetReleaseYear}}</span>
|
||||
</div>
|
||||
<p id="artist">{{.PrintArtists true true}}</p>
|
||||
<p id="type" class="{{.GetType}}">{{.GetType}}</p>
|
||||
<p id="type" class="{{.ReleaseType}}">{{.ReleaseType}}</p>
|
||||
|
||||
<ul id="links">
|
||||
{{if .GetBuyLink}}
|
||||
{{if .Buylink}}
|
||||
<li>
|
||||
<a href="{{.GetBuyLink}}" class="buy">{{or .GetBuyName "buy"}}</a>
|
||||
<a href="{{.Buylink}}" class="buy">{{or .Buyname "buy"}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
|
||||
{{range .GetLinks}}
|
||||
{{range .Links}}
|
||||
<li>
|
||||
<a class="{{.NormaliseName}}" href="{{.GetURL}}">{{.GetName}}</a>
|
||||
<a class="{{.NormaliseName}}" href="{{.URL}}">{{.Name}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
|
||||
{{if .GetDescription}}
|
||||
{{if .Description}}
|
||||
<p id="description">
|
||||
{{.GetDescription}}
|
||||
{{.Description}}
|
||||
</p>
|
||||
{{end}}
|
||||
|
||||
<button id="share">share</button>
|
||||
</div>
|
||||
|
||||
{{if .GetCredits}}
|
||||
{{if .Credits}}
|
||||
<div id="credits">
|
||||
<h2>credits:</h2>
|
||||
<ul>
|
||||
{{range .GetCredits}}
|
||||
{{$Artist := .GetArtist}}
|
||||
{{if $Artist.GetWebsite}}
|
||||
<li><strong><a href="{{$Artist.GetWebsite}}">{{$Artist.GetName}}</a></strong>: {{.GetRole}}</li>
|
||||
{{range .Credits}}
|
||||
{{$Artist := .Artist}}
|
||||
{{if $Artist.Website}}
|
||||
<li><strong><a href="{{$Artist.Website}}">{{$Artist.Name}}</a></strong>: {{.Role}}</li>
|
||||
{{else}}
|
||||
<li><strong>{{$Artist.GetName}}</strong>: {{.GetRole}}</li>
|
||||
<li><strong>{{$Artist.Name}}</strong>: {{.Role}}</li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</ul>
|
||||
|
@ -99,20 +99,20 @@
|
|||
{{end}}
|
||||
|
||||
{{if .IsSingle}}
|
||||
{{$Track := index .GetTracks 0}}
|
||||
{{if $Track.GetLyrics}}
|
||||
{{$Track := index .Tracks 0}}
|
||||
{{if $Track.Lyrics}}
|
||||
<div id="lyrics">
|
||||
<h2>lyrics:</h2>
|
||||
<p>{{$Track.GetLyrics}}</p>
|
||||
<p>{{$Track.Lyrics}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<div id="tracks">
|
||||
<h2>tracks:</h2>
|
||||
{{range $i, $track := .GetTracks}}
|
||||
{{range $i, $track := .Tracks}}
|
||||
<details>
|
||||
<summary class="album-track-title">{{$track.GetNumber}}. {{$track.GetTitle}}</summary>
|
||||
{{$track.GetLyrics}}
|
||||
<summary class="album-track-title">{{$track.Number}}. {{$track.Title}}</summary>
|
||||
{{$track.Lyrics}}
|
||||
</details>
|
||||
{{end}}
|
||||
</div>
|
||||
|
@ -123,13 +123,13 @@
|
|||
<ul>
|
||||
<li><a href="#overview">overview</a></li>
|
||||
|
||||
{{if .GetCredits}}
|
||||
{{if .Credits}}
|
||||
<li><a href="#credits">credits</a></li>
|
||||
{{end}}
|
||||
|
||||
{{if .IsSingle}}
|
||||
{{$Track := index .GetTracks 0}}
|
||||
{{if $Track.GetLyrics}}
|
||||
{{$Track := index .Tracks 0}}
|
||||
{{if $Track.Lyrics}}
|
||||
<li><a href="#lyrics">lyrics</a></li>
|
||||
{{end}}
|
||||
{{else}}
|
||||
|
@ -156,7 +156,7 @@
|
|||
<!-- <% } else { %> -->
|
||||
<!-- <div class="track-preview" id="preview-<%= data.id %>"> -->
|
||||
<!-- <i class="fa-solid fa-play play"></i> -->
|
||||
<!-- <p>{{.GetTitle}}</p> -->
|
||||
<!-- <p>{{.Title}}</p> -->
|
||||
<!-- <audio src="<%= file %>"></audio> -->
|
||||
<!-- </div> -->
|
||||
<!-- <% } %> -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue