mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2026-03-22 00:28:12 +05:00
54 lines
1.5 KiB
Plaintext
54 lines
1.5 KiB
Plaintext
package templates
|
|
|
|
import "git.maid.zone/stuff/soundcloak/lib/cfg"
|
|
|
|
templ Base(title string, content templ.Component, head templ.Component) {
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<link rel="stylesheet" href="/_/static/global.css"/>
|
|
<link rel="stylesheet" href="/_/static/instance.css"/>
|
|
<link rel="icon" href="/_/static/favicon.ico"/>
|
|
<link rel="search" type="application/opensearchdescription+xml" title="soundcloak" href="/_/opensearch.xml"/>
|
|
<title>
|
|
if title != "" {
|
|
{ title } ~
|
|
}
|
|
soundcloak
|
|
</title>
|
|
if head != nil {
|
|
@head
|
|
}
|
|
</head>
|
|
<body>
|
|
if cfg.Debug {
|
|
<h1>!! running in debug mode !!</h1>
|
|
}
|
|
<a href="/" id="sc"><h1>soundcloak</h1></a>
|
|
@content
|
|
</body>
|
|
</html>
|
|
}
|
|
|
|
templ MainPageHead(p cfg.Preferences) {
|
|
if *p.SearchSuggestions {
|
|
<link rel="stylesheet" href="/_/static/index.css"/>
|
|
}
|
|
}
|
|
|
|
templ MainPage(p cfg.Preferences) {
|
|
@searchbar(p, "", "")
|
|
<footer>
|
|
<div style="margin-top:5rem;gap:1rem;display:grid;grid-template:auto/auto auto auto;justify-content:center">
|
|
<a class="btn" href="/discover">Discover Playlists</a>
|
|
<a class="btn" href="/_/preferences">Preferences</a>
|
|
<a class="btn" href="https://git.maid.zone/stuff/soundcloak">Source code</a>
|
|
<a class="btn" href="/_/static/notice.txt">Legal notice</a>
|
|
</div>
|
|
|
|
<p style="text-align:center">Build <a class="link" href={templ.SafeURL(cfg.CommitURL)}>{cfg.Commit}</a></p>
|
|
</footer>
|
|
}
|