116 lines
2.3 KiB
HTML
116 lines
2.3 KiB
HTML
{{ define "layout" }}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>{{ template "title" . }}</title>
|
|
<style>
|
|
body {
|
|
font-family: "Courier New", Courier, monospace;
|
|
background: #111;
|
|
color: #eee;
|
|
padding: 0;
|
|
margin: 0;
|
|
text-align: center;
|
|
}
|
|
nav {
|
|
background-color: #222;
|
|
border-bottom: 1px solid #444;
|
|
padding: 5px 0;
|
|
margin-bottom: 20px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
nav ul {
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
display: inline-flex;
|
|
gap: 15px;
|
|
}
|
|
nav li {
|
|
display: inline;
|
|
}
|
|
nav a {
|
|
color: #0af;
|
|
text-decoration: none;
|
|
padding: 4px 8px;
|
|
border: 1px solid transparent;
|
|
font-weight: bold;
|
|
font-size: 14px;
|
|
}
|
|
nav a:hover {
|
|
background-color: #0af;
|
|
color: #111;
|
|
border-color: #0af;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
h1 {
|
|
margin-top: 0;
|
|
}
|
|
|
|
table {
|
|
border-collapse: collapse;
|
|
margin: auto;
|
|
margin-bottom: 20px;
|
|
}
|
|
table.fw {
|
|
width: 100%;
|
|
}
|
|
th,
|
|
td {
|
|
padding: 8px 12px;
|
|
border: 1px solid #444;
|
|
text-align: left;
|
|
white-space: nowrap;
|
|
}
|
|
th {
|
|
background-color: #222;
|
|
}
|
|
tr:nth-child(even) {
|
|
background-color: #1a1a1a;
|
|
}
|
|
a.page-link {
|
|
margin: 0 5px;
|
|
text-decoration: none;
|
|
color: #0af;
|
|
}
|
|
a.page-link.current {
|
|
font-weight: bold;
|
|
color: #fff;
|
|
}
|
|
a {
|
|
color: #0af;
|
|
text-decoration: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<nav>
|
|
<ul>
|
|
<li><a href="/">Home</a></li>
|
|
<li><a href="/shares">View Shares</a></li>
|
|
<li><a href="/top-shares">Top Shares</a></li>
|
|
<li><a href="/daily-stats">Daily Stats</a></li>
|
|
</ul>
|
|
|
|
{{ if .UserName }}
|
|
<ul>
|
|
<li>{{ .UserName }}</li>
|
|
<li><a href="/logout">Logout</a></li>
|
|
</ul>
|
|
{{ else }}
|
|
<ul>
|
|
<li><a href="/login">Login</a></li>
|
|
</ul>
|
|
{{ end }}
|
|
</nav>
|
|
|
|
<h1>{{ template "header" . }}</h1>
|
|
|
|
{{ template "content" . }}
|
|
</body>
|
|
</html>
|
|
{{ end }}
|