mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2024-11-17 09:27:37 +00:00
67 lines
2.3 KiB
Text
67 lines
2.3 KiB
Text
package views
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/ditatompel/xmr-remote-nodes/internal/config"
|
|
"time"
|
|
)
|
|
|
|
var buildTime = time.Now().Unix()
|
|
|
|
type Meta struct {
|
|
Title string
|
|
Description string
|
|
Keywords string
|
|
Robots string
|
|
Permalink string
|
|
Identifier string
|
|
}
|
|
|
|
templ base(m Meta) {
|
|
<!DOCTYPE html>
|
|
<html lang="en" class="dark">
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<title>{ m.Title } — xmr.ditatompel.com</title>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<meta name="title" content={ fmt.Sprintf("%s — xmr.ditatompel.com", m.Title) }/>
|
|
<meta name="description" content={ m.Description }/>
|
|
<meta name="keywords" content={ m.Keywords }/>
|
|
<meta name="robots" content={ m.Robots }/>
|
|
<meta name="theme-color" content="#272b31"/>
|
|
<meta name="author" content="ditatompel"/>
|
|
<meta property="og:site_name" content="xmr.ditatompel.com"/>
|
|
<meta property="og:type" content="website"/>
|
|
<meta property="og:url" content={ m.Permalink }/>
|
|
<meta property="og:locale" content="en_US"/>
|
|
<meta property="og:title" content={ fmt.Sprintf("%s — xmr.ditatompel.com", m.Title) }/>
|
|
<meta property="og:description" content={ m.Description }/>
|
|
<link href={ fmt.Sprintf("/assets/css/main.min.css?t=%d", buildTime) } rel="stylesheet"/>
|
|
<script src={ fmt.Sprintf("/assets/js/htmx.min.js?t=%d", buildTime) }></script>
|
|
<script src={ fmt.Sprintf("/assets/js/clipboard.min.js?t=%d", buildTime) }></script>
|
|
<script src={ fmt.Sprintf("/assets/js/main.min.js?t=%d", buildTime) }></script>
|
|
</head>
|
|
<body class="bg-neutral-900 text-neutral-400" hx-boost="true" hx-indicator="#hx-indicator-main">
|
|
@navbar(m.Identifier)
|
|
<main class="shrink-0 min-h-screen">
|
|
{ children... }
|
|
</main>
|
|
<footer class="mt-auto py-3 bg-neutral-800 text-center">
|
|
<div class="max-w-[85rem] mx-auto px-4 sm:px-6 lg:px-8">
|
|
<p class="text-sm">XMR Nodes { config.Version }, <a href="https://github.com/ditatompel/xmr-remote-nodes" target="_blank" rel="noopener" class="external">source code</a> licensed under <strong>BSD-3-Clause</strong> license.</p>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|
|
}
|
|
|
|
templ BaseLayout(m Meta, cmp templ.Component) {
|
|
@base(m) {
|
|
@cmp
|
|
}
|
|
}
|
|
|
|
templ BlankLayout(cmp templ.Component) {
|
|
@cmp
|
|
}
|