Inital commit
This commit is contained in:
commit
a6af7dbfcb
114 files changed
+27520
No files matched your search
@@ -0,0 +1,29 @@
|
||||
<% if (typeof accessCode !== "undefined" && accessCode && accessCode.code) { %>
|
||||
<div class="windows-overlay">
|
||||
<div class="section">
|
||||
<strong>Access Code Active:</strong> <%= accessCode.code %>
|
||||
</div>
|
||||
|
||||
<% if (accessCode.data) { %>
|
||||
<% if (accessCode.data.type === "quota" || accessCode.data.type === "both") { %>
|
||||
<div class="section">
|
||||
<strong>Requests Left:</strong> <%= accessCode.data.quota %>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (accessCode.data.type === "time" || accessCode.data.type === "both") { %>
|
||||
<div class="section">
|
||||
<strong>Expires:</strong> <%= timeToPass(accessCode.data.expires) %>
|
||||
</div>
|
||||
<% } %>
|
||||
<div class="section">
|
||||
<strong>Unlocks:</strong> <%= accessCode.data.data %>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<% if (accessCode.error) { %>
|
||||
<div class="section danger">
|
||||
<%= accessCode.error %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
@@ -0,0 +1,586 @@
|
||||
<style>
|
||||
:root {
|
||||
--admin-surface: var(--surface);
|
||||
--admin-surface-2: var(--surface-elevated);
|
||||
--admin-surface-3: rgba(255, 255, 255, 0.06);
|
||||
--admin-border: var(--border);
|
||||
--admin-border-muted: var(--border-muted);
|
||||
--admin-border-soft: rgba(255, 255, 255, 0.12);
|
||||
--admin-border-strong: var(--border);
|
||||
--admin-text: var(--text);
|
||||
--admin-muted: var(--text-muted);
|
||||
--admin-dim: var(--text-dim);
|
||||
--admin-accent: var(--accent);
|
||||
--admin-accent-soft: var(--accent-soft);
|
||||
--admin-danger: var(--danger);
|
||||
--admin-warn: var(--warn);
|
||||
--admin-radius: var(--radius);
|
||||
--admin-shadow: none;
|
||||
--admin-transition: 160ms ease;
|
||||
}
|
||||
|
||||
/* ---------- shell / layout ---------- */
|
||||
.admin-shell {
|
||||
width: 100%;
|
||||
max-width: 1180px;
|
||||
margin: 0 auto;
|
||||
padding: 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.admin-shell--wide {
|
||||
max-width: 1400px;
|
||||
}
|
||||
|
||||
.page-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.page-head h1 {
|
||||
margin: 0;
|
||||
font-size: 1.55rem;
|
||||
color: var(--admin-accent);
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
|
||||
.page-head .spacer {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.sub {
|
||||
color: var(--admin-muted);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.admin-nav {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.admin-nav a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
padding: 0.85rem 1rem;
|
||||
background: var(--admin-surface);
|
||||
border: 1px solid var(--admin-border);
|
||||
color: var(--admin-text);
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
text-decoration: none;
|
||||
transition: border-color var(--admin-transition), background-color var(--admin-transition);
|
||||
}
|
||||
|
||||
.admin-nav a:hover,
|
||||
.admin-nav a:focus-visible {
|
||||
border-color: var(--admin-accent);
|
||||
background: var(--admin-accent-soft);
|
||||
}
|
||||
|
||||
.admin-nav a .ico {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
flex: 0 0 auto;
|
||||
border: 2px solid var(--admin-accent);
|
||||
transform: rotate(45deg);
|
||||
transition: background-color var(--admin-transition);
|
||||
}
|
||||
|
||||
.admin-nav a:hover .ico,
|
||||
.admin-nav a:focus-visible .ico {
|
||||
background: var(--admin-accent);
|
||||
}
|
||||
|
||||
.admin-section-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
font-size: 0.72rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.16em;
|
||||
color: var(--admin-muted);
|
||||
margin-top: 0.35rem;
|
||||
}
|
||||
|
||||
.admin-section-title::after {
|
||||
content: "";
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
background: var(--admin-border-muted);
|
||||
}
|
||||
|
||||
/* ---------- cards ---------- */
|
||||
.card {
|
||||
background: var(--admin-surface);
|
||||
border: 1px solid var(--admin-border);
|
||||
padding: 1.15rem 1.25rem;
|
||||
box-shadow: var(--admin-shadow);
|
||||
}
|
||||
|
||||
.card h2 {
|
||||
margin: 0 0 1rem 0;
|
||||
font-size: 1.05rem;
|
||||
color: var(--admin-accent);
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.card h2 .hint {
|
||||
color: var(--admin-muted);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 400;
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.grid-2 {
|
||||
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||
}
|
||||
|
||||
.grid-3 {
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
}
|
||||
|
||||
/* ---------- stat cards ---------- */
|
||||
.stat-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
||||
gap: 0.85rem;
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
background: var(--admin-surface);
|
||||
border: 1px solid var(--admin-border);
|
||||
padding: 1rem 1.1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.stat-card::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0 auto 0 0;
|
||||
width: 3px;
|
||||
background: var(--admin-accent);
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.stat-card .kpi {
|
||||
font-size: 1.7rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.1;
|
||||
color: var(--text);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.stat-card .label {
|
||||
font-size: 0.68rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.12em;
|
||||
color: var(--admin-muted);
|
||||
}
|
||||
|
||||
.stat-card .foot {
|
||||
font-size: 0.75rem;
|
||||
color: var(--admin-dim);
|
||||
}
|
||||
|
||||
/* ---------- chips / badges ---------- */
|
||||
.chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
background: var(--admin-surface-3);
|
||||
border: 1px solid var(--admin-border-muted);
|
||||
padding: 0.15rem 0.55rem;
|
||||
font-size: 0.75rem;
|
||||
color: var(--admin-text);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.chip.accent {
|
||||
border-color: var(--admin-accent);
|
||||
color: var(--admin-accent);
|
||||
}
|
||||
|
||||
.cc-badge {
|
||||
display: inline-block;
|
||||
padding: 0.1rem 0.45rem;
|
||||
margin-left: 0.35rem;
|
||||
font-size: 0.7rem;
|
||||
letter-spacing: 0.06em;
|
||||
border: 1px solid var(--admin-border-muted);
|
||||
color: var(--admin-text);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.flag {
|
||||
font-size: 1.05em;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.none {
|
||||
color: var(--admin-dim);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* ---------- tables ---------- */
|
||||
.table-wrap {
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.admin-table {
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
background: var(--admin-surface);
|
||||
border: 1px solid var(--admin-border);
|
||||
}
|
||||
|
||||
.admin-table th,
|
||||
.admin-table td {
|
||||
padding: 0.7rem 0.9rem;
|
||||
border-bottom: 1px solid var(--admin-border-soft);
|
||||
text-align: left;
|
||||
font-size: 0.88rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.admin-table th {
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
color: var(--admin-accent);
|
||||
font-size: 0.7rem;
|
||||
letter-spacing: 0.09em;
|
||||
text-transform: uppercase;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.admin-table tbody tr:nth-child(even) {
|
||||
background-color: rgba(255, 255, 255, 0.03);
|
||||
}
|
||||
|
||||
.admin-table tbody tr:hover {
|
||||
background-color: rgba(255, 255, 255, 0.07);
|
||||
}
|
||||
|
||||
.admin-table tbody tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* ---------- horizontal bar chart ---------- */
|
||||
.bars {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.55rem;
|
||||
}
|
||||
|
||||
.bar-row {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(90px, 30%) 1fr auto;
|
||||
align-items: center;
|
||||
gap: 0.65rem;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
.bar-row .bar-label {
|
||||
color: var(--admin-text);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.bar-track {
|
||||
position: relative;
|
||||
height: 16px;
|
||||
background: var(--admin-surface-3);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bar-fill {
|
||||
height: 100%;
|
||||
min-width: 2px;
|
||||
background: linear-gradient(90deg, rgba(206, 229, 255, 0.4), var(--admin-accent));
|
||||
transition: width 400ms ease;
|
||||
}
|
||||
|
||||
.bar-row .bar-value {
|
||||
color: var(--admin-muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
white-space: nowrap;
|
||||
font-size: 0.78rem;
|
||||
}
|
||||
|
||||
/* ---------- vertical bar chart ---------- */
|
||||
.vchart {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 3px;
|
||||
height: 170px;
|
||||
padding-top: 0.5rem;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.vchart .vbar {
|
||||
flex: 1 1 auto;
|
||||
min-width: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.vchart .vbar .vfill {
|
||||
width: 100%;
|
||||
background: linear-gradient(180deg, var(--admin-accent), rgba(206, 229, 255, 0.25));
|
||||
min-height: 2px;
|
||||
transition: height 400ms ease;
|
||||
}
|
||||
|
||||
.vchart .vbar:hover .vfill {
|
||||
filter: brightness(1.2);
|
||||
}
|
||||
|
||||
.vchart .vbar .vlabel {
|
||||
font-size: 0.58rem;
|
||||
color: var(--admin-dim);
|
||||
white-space: nowrap;
|
||||
margin-top: 4px;
|
||||
transform: rotate(-45deg);
|
||||
transform-origin: center;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.vchart .vbar .vtip {
|
||||
position: absolute;
|
||||
bottom: calc(100% + 4px);
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--admin-border);
|
||||
padding: 2px 6px;
|
||||
font-size: 0.7rem;
|
||||
white-space: nowrap;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity var(--admin-transition);
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.vchart .vbar:hover .vtip {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* ---------- donut ---------- */
|
||||
.donut-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.25rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.donut {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
flex: 0 0 auto;
|
||||
border: 1px solid var(--admin-border);
|
||||
}
|
||||
|
||||
.donut::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 26px;
|
||||
border-radius: 50%;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--admin-border-soft);
|
||||
}
|
||||
|
||||
.donut-center {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 2;
|
||||
text-align: center;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.donut-center strong {
|
||||
font-size: 1.2rem;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.donut-center span {
|
||||
font-size: 0.62rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
color: var(--admin-muted);
|
||||
}
|
||||
|
||||
.legend {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.4rem;
|
||||
font-size: 0.82rem;
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.legend .lg-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.legend .swatch {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.legend .lg-val {
|
||||
margin-left: auto;
|
||||
color: var(--admin-muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
/* ---------- heatmap ---------- */
|
||||
.heatmap {
|
||||
display: grid;
|
||||
grid-template-columns: auto repeat(24, 1fr);
|
||||
gap: 2px;
|
||||
font-size: 0.6rem;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.heatmap .hm-cell {
|
||||
aspect-ratio: 1;
|
||||
min-width: 12px;
|
||||
background: var(--admin-surface-3);
|
||||
}
|
||||
|
||||
.heatmap .hm-row-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--admin-muted);
|
||||
padding-right: 0.35rem;
|
||||
white-space: nowrap;
|
||||
min-width: 34px;
|
||||
}
|
||||
|
||||
.heatmap .hm-col-label {
|
||||
text-align: center;
|
||||
color: var(--admin-dim);
|
||||
}
|
||||
|
||||
.heatmap .hm-cell:hover {
|
||||
outline: 1px solid var(--admin-accent);
|
||||
}
|
||||
|
||||
/* ---------- misc ---------- */
|
||||
.toolbar {
|
||||
display: flex;
|
||||
gap: 0.6rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.toolbar form {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.empty {
|
||||
text-align: center;
|
||||
color: var(--admin-dim);
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.num {
|
||||
font-variant-numeric: tabular-nums;
|
||||
text-align: center;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.kv {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.kv .kv-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.2rem;
|
||||
}
|
||||
|
||||
.kv .kv-label {
|
||||
font-size: 0.68rem;
|
||||
letter-spacing: 0.09em;
|
||||
text-transform: uppercase;
|
||||
color: var(--admin-muted);
|
||||
}
|
||||
|
||||
.kv .kv-value {
|
||||
color: var(--admin-text);
|
||||
font-size: 0.95rem;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.range-tabs {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.range-tabs a {
|
||||
padding: 0.28rem 0.7rem;
|
||||
border: 1px solid var(--admin-border-muted);
|
||||
font-size: 0.78rem;
|
||||
color: var(--admin-muted);
|
||||
text-decoration: none;
|
||||
transition: background-color var(--admin-transition), color var(--admin-transition), border-color var(--admin-transition);
|
||||
}
|
||||
|
||||
.range-tabs a:hover,
|
||||
.range-tabs a:focus-visible {
|
||||
border-color: var(--admin-accent);
|
||||
color: var(--admin-accent);
|
||||
}
|
||||
|
||||
.range-tabs a.active {
|
||||
background: var(--admin-accent);
|
||||
border-color: var(--admin-accent);
|
||||
color: var(--bg);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.admin-shell {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.bar-row {
|
||||
grid-template-columns: minmax(70px, 40%) 1fr auto;
|
||||
}
|
||||
|
||||
.admin-nav {
|
||||
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,265 @@
|
||||
<%- include('./admin-base'); -%>
|
||||
<style>
|
||||
.editor-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
padding: 1rem;
|
||||
max-width: 780px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.editor-container--wide {
|
||||
max-width: 960px;
|
||||
}
|
||||
|
||||
.editor-container .btn {
|
||||
align-self: flex-start;
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.editor-container h1 {
|
||||
text-align: center;
|
||||
font-size: 1.8rem;
|
||||
margin: 0;
|
||||
color: var(--admin-accent);
|
||||
}
|
||||
|
||||
.editor-container section {
|
||||
background: var(--admin-surface);
|
||||
border: 1px solid var(--admin-border);
|
||||
padding: 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.editor-container h2 {
|
||||
margin: 0;
|
||||
font-size: 1.2rem;
|
||||
color: var(--admin-accent);
|
||||
}
|
||||
|
||||
.editor-container label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
font-size: 0.8rem;
|
||||
color: var(--admin-muted);
|
||||
}
|
||||
|
||||
.editor-container .editor-form {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr auto auto;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.editor-container .editor-form--compact {
|
||||
grid-template-columns: 1fr auto auto;
|
||||
}
|
||||
|
||||
.editor-container .editor-form--stacked {
|
||||
grid-template-columns: 1fr;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.editor-container .editor-form input[type="text"],
|
||||
.editor-container .editor-form input[type="url"],
|
||||
.editor-container .editor-form input[type="number"],
|
||||
.editor-container .editor-form input[type="date"],
|
||||
.editor-container .editor-form input[type="datetime-local"],
|
||||
.editor-container .editor-form input[type="file"],
|
||||
.editor-container .editor-form select,
|
||||
.editor-container .editor-form textarea {
|
||||
padding: 0.4rem 0.6rem;
|
||||
font-size: 0.85rem;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.editor-container .editor-form label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 0.8rem;
|
||||
color: var(--admin-muted);
|
||||
}
|
||||
|
||||
.editor-container .editor-form button {
|
||||
padding: 0.4rem 0.8rem;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.editor-container input[readonly] {
|
||||
background: var(--admin-surface-3);
|
||||
color: var(--admin-muted);
|
||||
}
|
||||
|
||||
.editor-container select option {
|
||||
background: var(--bg);
|
||||
color: var(--admin-text);
|
||||
}
|
||||
|
||||
.editor-container button {
|
||||
border: 1px solid var(--admin-border);
|
||||
background: transparent;
|
||||
color: var(--admin-text);
|
||||
font-weight: 600;
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 0.9rem;
|
||||
cursor: pointer;
|
||||
transition: background-color var(--admin-transition), color var(--admin-transition), border-color var(--admin-transition);
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.editor-container button:hover,
|
||||
.editor-container button:focus-visible {
|
||||
background: var(--admin-border);
|
||||
color: var(--bg);
|
||||
}
|
||||
|
||||
.editor-container button.delete,
|
||||
.editor-container .btn-danger {
|
||||
border-color: var(--admin-danger);
|
||||
color: var(--admin-danger);
|
||||
}
|
||||
|
||||
.editor-container button.delete:hover,
|
||||
.editor-container .btn-danger:hover,
|
||||
.editor-container button.delete:focus-visible,
|
||||
.editor-container .btn-danger:focus-visible {
|
||||
background: var(--admin-danger);
|
||||
color: var(--bg);
|
||||
}
|
||||
|
||||
.editor-container .editor-actions {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.editor-container .icon-host {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.icon-select {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.icon-select-trigger {
|
||||
background: var(--admin-surface-3);
|
||||
border: 1px solid var(--admin-border);
|
||||
padding: 0.3rem;
|
||||
cursor: pointer;
|
||||
color: var(--admin-text);
|
||||
font-weight: 600;
|
||||
transition: border-color var(--admin-transition), background-color var(--admin-transition);
|
||||
}
|
||||
|
||||
.icon-select-trigger:hover,
|
||||
.icon-select-trigger:focus-visible {
|
||||
border-color: var(--admin-accent);
|
||||
}
|
||||
|
||||
.icon-select-trigger img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.icon-options {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background: var(--surface-solid);
|
||||
border: 1px solid var(--admin-border);
|
||||
margin-top: 4px;
|
||||
z-index: 1000;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.icon-option {
|
||||
padding: 0.3rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
cursor: pointer;
|
||||
font-size: 0.85rem;
|
||||
border: none;
|
||||
color: var(--admin-text);
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.icon-option:hover {
|
||||
background: var(--hover-bg);
|
||||
}
|
||||
|
||||
.icon-option img {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.preview {
|
||||
max-width: 60px;
|
||||
border: 1px solid var(--admin-border-muted);
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.editor-container img.editor-preview-img,
|
||||
.editor-container video.editor-preview-img {
|
||||
max-width: 180px;
|
||||
border: 1px solid var(--admin-border-muted);
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.editor-container .font-note {
|
||||
font-size: 0.8rem;
|
||||
color: var(--admin-muted);
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.editor-container .field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.editor-container .field > span {
|
||||
font-size: 0.8rem;
|
||||
color: var(--admin-muted);
|
||||
}
|
||||
|
||||
.editor-container .font-preview {
|
||||
border: 1px dashed var(--admin-border-muted);
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
padding: 0.75rem;
|
||||
font-family: var(--font-body);
|
||||
font-size: 1.1rem;
|
||||
line-height: 1.4;
|
||||
word-break: break-word;
|
||||
transition: border-color 0.2s ease, opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.editor-container .font-preview.is-active {
|
||||
border-color: var(--admin-accent);
|
||||
}
|
||||
|
||||
.editor-container .font-actions {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.browse-panel .editor-container {
|
||||
max-width: 960px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,533 @@
|
||||
<%- include('./admin-base'); -%>
|
||||
<style>
|
||||
.stalker-page {
|
||||
margin: 0 auto;
|
||||
padding: 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.page-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.page-head h1 {
|
||||
margin: 0;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.stat-row {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.stat {
|
||||
background: var(--admin-surface-3);
|
||||
border: 1px solid var(--admin-border);
|
||||
padding: 0.3rem 0.9rem;
|
||||
font-size: 0.85rem;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.stat strong {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.table-wrap {
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
background: var(--admin-surface);
|
||||
border: 1px solid var(--admin-border);
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
table th,
|
||||
table td {
|
||||
padding: 0.75rem 1rem;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
||||
text-align: left;
|
||||
font-size: 0.9rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table th {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
color: var(--admin-accent);
|
||||
font-size: 0.72rem;
|
||||
letter-spacing: 0.09em;
|
||||
text-transform: uppercase;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table tbody tr:nth-child(even) {
|
||||
background-color: rgba(255, 255, 255, 0.04);
|
||||
}
|
||||
|
||||
table tbody tr:hover {
|
||||
background-color: rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
table tbody tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.ip-link {
|
||||
font-weight: 600;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
color: var(--admin-accent);
|
||||
}
|
||||
|
||||
.none {
|
||||
color: #777;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.cc-badge {
|
||||
display: inline-block;
|
||||
padding: 0.1rem 0.45rem;
|
||||
margin-left: 0.35rem;
|
||||
font-size: 0.7rem;
|
||||
letter-spacing: 0.06em;
|
||||
border: 1px solid var(--admin-border-muted);
|
||||
color: #ccc;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.loc-city {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.loc-country {
|
||||
color: #aaa;
|
||||
font-size: 0.85rem;
|
||||
margin-left: 0.35rem;
|
||||
}
|
||||
|
||||
.isp {
|
||||
color: #ddd;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.ua-cell {
|
||||
max-width: 260px;
|
||||
}
|
||||
|
||||
.ua-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border: 1px solid var(--admin-border-soft);
|
||||
padding: 0.15rem 0.55rem;
|
||||
font-size: 0.75rem;
|
||||
color: #ddd;
|
||||
margin: 0.1rem 0.2rem 0.1rem 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ua-more {
|
||||
font-size: 0.75rem;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.num {
|
||||
font-variant-numeric: tabular-nums;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.actions form {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.empty {
|
||||
text-align: center;
|
||||
color: #888;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.35rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pagination .pg {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 2rem;
|
||||
padding: 0.3rem 0.6rem;
|
||||
border: 1px solid var(--admin-border-muted);
|
||||
font-size: 0.85rem;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.pagination a.pg:hover {
|
||||
border-color: var(--admin-accent);
|
||||
color: var(--admin-accent);
|
||||
}
|
||||
|
||||
.pagination .pg.current {
|
||||
background: var(--admin-accent);
|
||||
border-color: var(--admin-accent);
|
||||
color: var(--bg);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sub {
|
||||
color: #aaa;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
display: flex;
|
||||
gap: 0.6rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.toolbar form {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--admin-surface);
|
||||
border: 1px solid var(--admin-border);
|
||||
padding: 1.25rem;
|
||||
}
|
||||
|
||||
.card h2 {
|
||||
margin: 0 0 1rem 0;
|
||||
font-size: 1.1rem;
|
||||
color: var(--admin-accent);
|
||||
}
|
||||
|
||||
.info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: 1.1rem;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.2rem;
|
||||
}
|
||||
|
||||
.info-item .label {
|
||||
font-size: 0.7rem;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.info-item .value {
|
||||
color: #eee;
|
||||
font-size: 0.95rem;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
#map {
|
||||
height: 380px;
|
||||
width: 100%;
|
||||
border: 1px solid var(--admin-border);
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.leaflet-container {
|
||||
background: #222;
|
||||
}
|
||||
|
||||
.leaflet-bar {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.leaflet-bar a,
|
||||
.leaflet-bar a:hover {
|
||||
background-color: #1a1a1a;
|
||||
color: #fff;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.leaflet-bar a.leaflet-disabled {
|
||||
background-color: #2a2a2a;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.leaflet-popup-content-wrapper,
|
||||
.leaflet-popup-tip {
|
||||
background: #111;
|
||||
color: #eee;
|
||||
border: 1px solid var(--admin-border-muted);
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.leaflet-popup-content {
|
||||
margin: 10px 14px;
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
.leaflet-container a.leaflet-popup-close-button {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.leaflet-container a.leaflet-popup-close-button:hover {
|
||||
color: #ff5f5f;
|
||||
}
|
||||
|
||||
.leaflet-control-attribution {
|
||||
background: rgba(17, 17, 17, 0.8);
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.leaflet-control-attribution a {
|
||||
color: var(--admin-accent);
|
||||
}
|
||||
|
||||
.ua-list {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ua-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
padding: 0.75rem 0.9rem;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid var(--admin-border-soft);
|
||||
}
|
||||
|
||||
.ua-item .ua-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 0.6rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.ua-name {
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ua-version {
|
||||
color: #999;
|
||||
font-weight: 400;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.ua-os {
|
||||
color: #bbb;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.ua-raw {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-size: 0.75rem;
|
||||
color: #888;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.log-table td.url {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
color: var(--text);
|
||||
font-size: 0.85rem;
|
||||
word-break: break-all;
|
||||
max-width: 360px;
|
||||
}
|
||||
|
||||
.log-table td.ua-cell-log {
|
||||
max-width: 260px;
|
||||
}
|
||||
|
||||
.filter-form {
|
||||
background: var(--admin-surface);
|
||||
border: 1px solid var(--admin-border);
|
||||
padding: 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.85rem;
|
||||
}
|
||||
|
||||
.filter-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.filter-grid label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3rem;
|
||||
font-size: 0.7rem;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.filter-grid input,
|
||||
.filter-grid select {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border: 1px solid var(--admin-border-muted);
|
||||
color: #eee;
|
||||
padding: 0.45rem 0.6rem;
|
||||
font-family: inherit;
|
||||
font-size: 0.85rem;
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
option {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.filter-grid input:focus,
|
||||
.filter-grid select:focus {
|
||||
outline: none;
|
||||
border-color: var(--admin-accent);
|
||||
}
|
||||
|
||||
.filter-actions {
|
||||
display: flex;
|
||||
gap: 0.6rem;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.geo-fence summary {
|
||||
cursor: pointer;
|
||||
color: var(--admin-accent);
|
||||
font-size: 0.8rem;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.geo-fence .filter-grid {
|
||||
margin-top: 0.85rem;
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.filter-grid {
|
||||
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.stalker-page {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.table-wrap table {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.table-wrap table,
|
||||
.table-wrap tbody,
|
||||
.table-wrap tr,
|
||||
.table-wrap td {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table-wrap thead {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table-wrap tbody {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.table-wrap tr {
|
||||
background: var(--admin-surface);
|
||||
border: 1px solid var(--admin-border);
|
||||
padding: 0.35rem 0.9rem;
|
||||
}
|
||||
|
||||
.table-wrap tr:nth-child(even) {
|
||||
background: var(--admin-surface);
|
||||
}
|
||||
|
||||
.table-wrap tr:hover {
|
||||
background-color: var(--admin-surface);
|
||||
}
|
||||
|
||||
.table-wrap td {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
padding: 0.45rem 0;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.table-wrap td:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.table-wrap td::before {
|
||||
content: attr(data-label);
|
||||
color: #888;
|
||||
font-size: 0.7rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.table-wrap td .none,
|
||||
.table-wrap td .num {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.table-wrap td.actions {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.table-wrap td.actions::before {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.table-wrap td.ua-cell,
|
||||
.table-wrap td.ua-cell-log {
|
||||
max-width: none;
|
||||
overflow-x: auto;
|
||||
justify-content: flex-start;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
.log-table td.url {
|
||||
max-width: none;
|
||||
word-break: break-word;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,3 @@
|
||||
<a class="link nav-link" href="<%= href %>"<% if (typeof useHistoryBack !== 'undefined' && useHistoryBack) { %> onclick="if(history.length > 1){ history.back(); return false; }"<% } %>>
|
||||
<div class="link-text"><%= label %></div>
|
||||
</a>
|
||||
@@ -0,0 +1,22 @@
|
||||
<div class="gallery-editor">
|
||||
<div class="container">
|
||||
<div class="center-n">
|
||||
<%- include('./search-form', { action: searchAction, search, mode }); -%>
|
||||
|
||||
<a class="btn" href="<%= addHref %>"><%= addLabel %></a>
|
||||
|
||||
<%- include('./pagination', { currentPage, totalPages, search, mode, t }); -%>
|
||||
|
||||
<div class="gallery-grid">
|
||||
<% items.forEach(item => { %>
|
||||
<div class="gallery-box">
|
||||
<div class="image-title"><%= item.name %></div>
|
||||
<a href="<%= editHrefPrefix %><%= item.id %>">
|
||||
<img class="grid-thumb" src="<%= thumbnailPrefix %><%= item.thumbnailName %>">
|
||||
</a>
|
||||
</div>
|
||||
<% }) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,22 @@
|
||||
<div class="gallery-grid">
|
||||
<% items.forEach(item => { %>
|
||||
<div class="gallery-box">
|
||||
<div class="image-title"><%= item.name %><% if (item.isVideo) { %> <span class="video-badge">▶</span><% } %></div>
|
||||
<a href="<%= t(viewPathPrefix + item.id + (typeof accessCode !== 'undefined' && accessCode?.code ? `?access_code=${accessCode.code}` : '')) %>">
|
||||
<% if (item.isVideo) { %>
|
||||
<video class="grid-thumb grid-video"
|
||||
src="/gallery/video/<%= item.id %><%= typeof accessCode !== 'undefined' && accessCode?.code ? `?access_code=${accessCode.code}` : '' %>"
|
||||
alt="<%= item.name %>"
|
||||
muted
|
||||
playsinline
|
||||
preload="metadata"
|
||||
loop
|
||||
poster="<%= thumbnailPathPrefix %><%= item.thumbnailName %>">
|
||||
</video>
|
||||
<% } else { %>
|
||||
<img class="grid-thumb" src="<%= thumbnailPathPrefix %><%= item.thumbnailName %>" alt="<%= item.name %>">
|
||||
<% } %>
|
||||
</a>
|
||||
</div>
|
||||
<% }) %>
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<%- include('./head'); -%>
|
||||
<%- include('./social-meta', {
|
||||
socialTitle,
|
||||
socialDescription,
|
||||
socialImage
|
||||
}); -%>
|
||||
<title><%= pageTitle %></title>
|
||||
</head>
|
||||
<body>
|
||||
<%- include('../scripts'); -%>
|
||||
|
||||
<%- include('./browse-page', {
|
||||
title,
|
||||
sectionLabel,
|
||||
wrapTitleInLink: typeof wrapTitleInLink !== 'undefined' ? wrapTitleInLink : false,
|
||||
useHistoryBack: typeof useHistoryBack !== 'undefined' ? useHistoryBack : false,
|
||||
searchAction,
|
||||
items,
|
||||
viewPathPrefix,
|
||||
thumbnailPathPrefix,
|
||||
currentPage,
|
||||
totalPages,
|
||||
search,
|
||||
mode,
|
||||
accessCode,
|
||||
tracer,
|
||||
t
|
||||
}); -%>
|
||||
|
||||
<%- include('../footer'); -%>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="container">
|
||||
<div class="center-a page-content">
|
||||
<% if (typeof wrapTitleInLink !== 'undefined' && wrapTitleInLink) { %>
|
||||
<a class="page-title-link" href="<%= t('/') %>">
|
||||
<h1><%= title %> - <%= sectionLabel %></h1>
|
||||
</a>
|
||||
<% } else { %>
|
||||
<h1><%= title %> - <%= sectionLabel %></h1>
|
||||
<% } %>
|
||||
|
||||
<h2 class="section-heading"><%= sectionLabel %></h2>
|
||||
|
||||
<%- include('./back-link', {
|
||||
href: t('/'),
|
||||
label: 'Back home',
|
||||
useHistoryBack: typeof useHistoryBack !== 'undefined' ? useHistoryBack : false
|
||||
}); -%>
|
||||
|
||||
<%- include('./search-form', { action: searchAction, search, mode, accessCode, tracer }); -%>
|
||||
<%- include('./access-codes'); -%>
|
||||
<%- include('./pagination', { currentPage, totalPages, search, mode, accessCode, t }); -%>
|
||||
<%- include('./browse-grid', { items, viewPathPrefix, thumbnailPathPrefix, accessCode, t }); -%>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
<script>
|
||||
const dates = [...document.getElementsByClassName("ISO-date-raw")];
|
||||
for (const date of dates) {
|
||||
const d = new Date(date.textContent.trim());
|
||||
if (!isNaN(d.getTime())) {
|
||||
date.textContent = d.toLocaleString();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,10 @@
|
||||
<meta content="#cee5ff" name="theme-color">
|
||||
<meta name="twitter:title" content="<%= titleShort %>">
|
||||
<meta name="twitter:description" content="<%= description %>">
|
||||
<meta name="twitter:image" content="/assets/images/avatar.png">
|
||||
<meta property="og:title" content="<%= titleShort %>" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:image" content="/assets/images/avatar.png" />
|
||||
<meta property="og:description" content="<%= description %>">
|
||||
<meta property="description" content="<%= description %>">
|
||||
<meta name="robots" content="index, follow" />
|
||||
@@ -0,0 +1,2 @@
|
||||
<%- include('./upperHead'); -%>
|
||||
<%- include('./discoverables'); -%>
|
||||
@@ -0,0 +1,26 @@
|
||||
document.querySelectorAll('.icon-select').forEach(select => {
|
||||
const trigger = select.querySelector('.icon-select-trigger');
|
||||
const options = select.querySelector('.icon-options');
|
||||
const hiddenInput = select.querySelector('input[name="icon"]');
|
||||
|
||||
trigger.addEventListener('click', () => {
|
||||
options.style.display = options.style.display === 'block' ? 'none' : 'block';
|
||||
});
|
||||
|
||||
options.querySelectorAll('.icon-option').forEach(option => {
|
||||
option.addEventListener('click', () => {
|
||||
const id = option.dataset.id;
|
||||
const name = option.dataset.name;
|
||||
|
||||
hiddenInput.value = id;
|
||||
|
||||
if (name) {
|
||||
trigger.innerHTML = `<img src="/assets/images/${name}" alt="">`;
|
||||
} else {
|
||||
trigger.innerHTML = `<span style="color:#bbb;">None</span>`;
|
||||
}
|
||||
|
||||
options.style.display = 'none';
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,49 @@
|
||||
<% if (createAt) { %>
|
||||
<p class="media-meta"><strong>Created at</strong>: <%= createAt %></p>
|
||||
<% } %>
|
||||
|
||||
<% if (typeof artists !== 'undefined' && artists && artists.length) { %>
|
||||
<div class="slight-border">
|
||||
<h5>Artists</h5>
|
||||
<% artists.forEach(artist => { %>
|
||||
<div class="artist">
|
||||
<span class="artist-name"><%= artist.name %></span>
|
||||
<% if (artist.urls.length > 0) { %>
|
||||
<div class="artist-links">
|
||||
<% artist.urls.forEach(url => { %>
|
||||
<a href="<%= url %>" target="_blank" rel="noopener noreferrer" class="underline chip-link">
|
||||
<%= url %>
|
||||
</a>
|
||||
<% }) %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<% }) %>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<% if (typeof sources !== 'undefined' && sources && sources.length > 0) { %>
|
||||
<div class="slight-border">
|
||||
<h5>Sources</h5>
|
||||
<div class="sources">
|
||||
<% sources.forEach(source => { %>
|
||||
<a href="<%= source %>" target="_blank" rel="noopener noreferrer" class="underline chip-link">
|
||||
<%= source %>
|
||||
</a>
|
||||
<% }) %>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<% if (typeof tags !== 'undefined' && tags && tags.length > 0) { %>
|
||||
<div class="slight-border">
|
||||
<h5>Tags</h5>
|
||||
<div class="tags">
|
||||
<% tags.forEach(tag => { %>
|
||||
<a href="<%= tagSearchBase %>?search=<%= tag %>&mode=tags<%= typeof accessCode !== 'undefined' && accessCode?.code ? `&access_code=${accessCode.code}` : '' %>" rel="noopener noreferrer" class="underline chip-tag">
|
||||
<%= tag %>
|
||||
</a>
|
||||
<% }) %>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
@@ -0,0 +1,30 @@
|
||||
<%
|
||||
let start = Math.max(1, currentPage - 3);
|
||||
let end = Math.min(totalPages, currentPage + 3);
|
||||
|
||||
if (currentPage <= 4) {
|
||||
start = 1;
|
||||
end = Math.min(7, totalPages);
|
||||
} else if (currentPage + 3 > totalPages) {
|
||||
end = totalPages;
|
||||
start = Math.max(1, totalPages - 6);
|
||||
}
|
||||
|
||||
const accessSuffix = typeof accessCode !== "undefined" && accessCode?.code
|
||||
? `&access_code=${accessCode.code}`
|
||||
: "";
|
||||
const querySuffix = `&search=${search}&mode=${mode}${accessSuffix}`;
|
||||
%>
|
||||
<div class="pagination">
|
||||
<% if (currentPage > 1) { %>
|
||||
<a href="<%= t('?page=' + (currentPage - 1) + querySuffix) %>">Prev</a>
|
||||
<% } %>
|
||||
|
||||
<% for (let p = start; p <= end; p++) { %>
|
||||
<a href="<%= t('?page=' + p + querySuffix) %>" class="<%= p === currentPage ? 'active' : '' %>"><%= p %></a>
|
||||
<% } %>
|
||||
|
||||
<% if (currentPage < totalPages) { %>
|
||||
<a href="<%= t('?page=' + (currentPage + 1) + querySuffix) %>">Next</a>
|
||||
<% } %>
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
<form method="get" action="<%= action %>" class="search-form">
|
||||
<input type="text" name="search" value="<%= search %>" placeholder="Search...">
|
||||
|
||||
<% if (typeof accessCode !== "undefined" && accessCode && accessCode.code) { %>
|
||||
<input type="text" name="access_code" value="<%= accessCode.code %>" hidden>
|
||||
<% } %>
|
||||
|
||||
<% if (typeof tracer !== 'undefined' && tracer) { %>
|
||||
<input type="text" name="t" value="<%= tracer.id %>" hidden>
|
||||
<% } %>
|
||||
|
||||
<select name="mode">
|
||||
<option value="general" <%= mode === "general" ? "selected" : "" %>>General</option>
|
||||
<option value="tags" <%= mode === "tags" ? "selected" : "" %>>Tags</option>
|
||||
</select>
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
@@ -0,0 +1,8 @@
|
||||
<meta content="#cee5ff" name="theme-color">
|
||||
<meta name="twitter:title" content="<%= socialTitle %>">
|
||||
<meta name="twitter:description" content="<%= socialDescription %>">
|
||||
<meta name="twitter:image" content="<%= socialImage %>">
|
||||
<meta property="og:title" content="<%= socialTitle %>" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:image" content="<%= socialImage %>" />
|
||||
<meta property="og:description" content="<%= socialDescription %>">
|
||||
@@ -0,0 +1,19 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="manifest" href="/site.webmanifest">
|
||||
<link rel="stylesheet" href="/assets/styles.css">
|
||||
<% if (typeof font !== 'undefined' && font && font.file) { %>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: '<%= font.family %>';
|
||||
src: url('/assets/fonts/<%= font.file %>?v=<%= font.updated || 0 %>');
|
||||
font-display: swap;
|
||||
}
|
||||
:root {
|
||||
--font-body: '<%= font.family %>', 'Courier New', Courier, monospace;
|
||||
}
|
||||
</style>
|
||||
<% } %>
|
||||
Reference in new issue
Block a user