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,22 +0,0 @@
|
|||
{{define "head"}}
|
||||
<title>admin - ari melody 💫</title>
|
||||
<link rel="shortcut icon" href="/img/favicon.png" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="/style/admin.css">
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<main>
|
||||
<script type="module" src="/script/admin.js" defer></script>
|
||||
|
||||
<h1>
|
||||
# admin panel
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
whapow! nothing here.
|
||||
<br>
|
||||
nice try, though.
|
||||
</p>
|
||||
</main>
|
||||
{{end}}
|
55
views/admin/index.html
Normal file
55
views/admin/index.html
Normal file
|
@ -0,0 +1,55 @@
|
|||
{{define "head"}}
|
||||
<title>admin - ari melody 💫</title>
|
||||
<link rel="shortcut icon" href="/img/favicon.png" type="image/x-icon">
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<header>
|
||||
<img src="/img/favicon.png" alt="" class="icon">
|
||||
<a href="/admin">home</a>
|
||||
<a href="/admin/releases">releases</a>
|
||||
<a href="/admin/artists">artists</a>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
|
||||
<h1>Releases</h1>
|
||||
<div class="card releases">
|
||||
{{range $Release := .Releases}}
|
||||
<div class="release">
|
||||
<div class="release-artwork">
|
||||
<img src="{{$Release.Artwork}}" alt="" width="128" loading="lazy">
|
||||
</div>
|
||||
<div class="release-info">
|
||||
<h3 class="release-title">{{$Release.Title}} <small>{{$Release.GetReleaseYear}}</small></h3>
|
||||
<p class="release-artists">{{$Release.PrintArtists true true}}</p>
|
||||
<p class="release-type-single">{{$Release.ReleaseType}}</p>
|
||||
<div class="release-actions">
|
||||
<a href="/admin/releases/{{$Release.ID}}">Edit</a>
|
||||
<a href="/music/{{$Release.ID}}" target="_blank">Gateway</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if not .Releases}}
|
||||
<p>There are no releases.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<h1>Artists</h1>
|
||||
<div class="card artists">
|
||||
{{range $Artist := .Artists}}
|
||||
<div class="artist">
|
||||
<img src="https://arimelody.me/img/favicon.png" alt="" width="64" loading="lazy" class="artist-avatar">
|
||||
<a href="/admin/artists/arimelody" class="artist-name">ari melody</a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if not .Artists}}
|
||||
<p>There are no artists.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<script type="module" src="/admin/static/admin.js" defer></script>
|
||||
{{end}}
|
22
views/admin/layout.html
Normal file
22
views/admin/layout.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
{{block "head" .}}{{end}}
|
||||
|
||||
<link rel="stylesheet" href="/admin/static/admin.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{block "content" .}}
|
||||
{{end}}
|
||||
|
||||
{{template "prideflag"}}
|
||||
</body>
|
||||
|
||||
</html>
|
20
views/admin/login.html
Normal file
20
views/admin/login.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{{define "head"}}
|
||||
<title>admin - ari melody 💫</title>
|
||||
<link rel="shortcut icon" href="/img/favicon.png" type="image/x-icon">
|
||||
|
||||
<style>
|
||||
.discord {
|
||||
color: #5865F2;
|
||||
}
|
||||
</style>
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<main>
|
||||
|
||||
<p>Log in with <a href="{{.}}" class="discord">Discord</a>.</p>
|
||||
|
||||
</main>
|
||||
|
||||
<script type="module" src="/admin/static/admin.js" defer></script>
|
||||
{{end}}
|
|
@ -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> -->
|
||||
<!-- <% } %> -->
|
||||
|
|
|
@ -26,22 +26,22 @@
|
|||
|
||||
<div id="music-container">
|
||||
{{range $Release := .}}
|
||||
<div class="music" id="{{$Release.GetID}}" swap-url="/music/{{$Release.GetID}}">
|
||||
<div class="music" id="{{$Release.ID}}" swap-url="/music/{{$Release.ID}}">
|
||||
<div class="music-artwork">
|
||||
<img src="{{$Release.GetArtwork}}" alt="{{$Release.GetTitle}} artwork" width="128" loading="lazy">
|
||||
<img src="{{$Release.GetArtwork}}" alt="{{$Release.Title}} artwork" width="128" loading="lazy">
|
||||
</div>
|
||||
<div class="music-details">
|
||||
<h1 class="music-title">
|
||||
<a href="/music/{{$Release.GetID}}">
|
||||
{{$Release.GetTitle}}
|
||||
<a href="/music/{{$Release.ID}}">
|
||||
{{$Release.Title}}
|
||||
</a>
|
||||
</h1>
|
||||
<h2 class="music-artist">{{$Release.PrintArtists true true}}</h2>
|
||||
<h3 class="music-type-{{$Release.GetType}}">{{$Release.GetType}}</h3>
|
||||
<h3 class="music-type-{{$Release.ReleaseType}}">{{$Release.ReleaseType}}</h3>
|
||||
<ul class="music-links">
|
||||
{{range $Link := $Release.GetLinks}}
|
||||
{{range $Link := $Release.Links}}
|
||||
<li>
|
||||
<a href="{{$Link.GetURL}}" class="link-button">{{$Link.GetName}}</a>
|
||||
<a href="{{$Link.URL}}" class="link-button">{{$Link.Name}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{define "prideflag"}}
|
||||
<a href="https://github.com/mellodoot/prideflag" target="_blank" id="prideflag">
|
||||
<a href="https://git.arimelody.me/ari/prideflag" target="_blank" id="prideflag">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="120" height="120" hx-preserve="true">
|
||||
<path id="red" d="M120,80 L100,100 L120,120 Z" style="fill:#d20605"/>
|
||||
<path id="orange" d="M120,80 V40 L80,80 L100,100 Z" style="fill:#ef9c00"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue