This commit is contained in:
+7
-7
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"name": "pulse-signage",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"version": "1.1.2",
|
||||
"private": false,
|
||||
"description": "Pulse Signage application with MySQL and media uploads",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.lzstealth.com/LZStealth/pulse-signage.git"
|
||||
},
|
||||
"main": "src/common.js",
|
||||
"scripts": {
|
||||
"start": "node -r dotenv/config src/web.js",
|
||||
"start:web": "node -r dotenv/config src/web.js",
|
||||
"start:player": "node -r dotenv/config src/player.js",
|
||||
"dev:web": "nodemon -r dotenv/config src/web.js",
|
||||
"dev:player": "nodemon -r dotenv/config src/player.js",
|
||||
"docker:build": "docker build -t pulse-signage:test .",
|
||||
"docker:up": "docker-compose up -d",
|
||||
"docker:down": "docker-compose down",
|
||||
"docker:logs": "docker-compose logs -f --tail=100"
|
||||
"dev:player": "nodemon -r dotenv/config src/player.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"dotenv": "^17.4.2",
|
||||
|
||||
@@ -126,7 +126,9 @@ a {
|
||||
top: 0;
|
||||
align-self: start;
|
||||
min-height: 100vh;
|
||||
padding: 22px 18px 18px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 16px 12px 12px;
|
||||
color: var(--sidebar-text);
|
||||
background: var(--sidebar-background);
|
||||
border-right: 1px solid var(--sidebar-border);
|
||||
@@ -220,7 +222,6 @@ a {
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
margin-top: auto;
|
||||
padding: 16px 14px 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -228,8 +229,16 @@ a {
|
||||
color: var(--sidebar-text);
|
||||
}
|
||||
|
||||
.sidebar-footer--bottom {
|
||||
margin-top: auto;
|
||||
padding: 0;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.sidebar-footer strong,
|
||||
.sidebar-footer span {
|
||||
.sidebar-footer > div > span,
|
||||
.sidebar-footer > .sidebar-version {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -244,7 +253,7 @@ a {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.sidebar-footer span {
|
||||
.sidebar-footer > div > span {
|
||||
color: var(--sidebar-muted);
|
||||
font-size: 12px;
|
||||
line-height: 1.35;
|
||||
@@ -301,6 +310,14 @@ a {
|
||||
color: var(--sidebar-text-strong);
|
||||
}
|
||||
|
||||
.sidebar-version {
|
||||
color: var(--sidebar-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
||||
.theme-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -359,7 +376,7 @@ a {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
background: currentColor;
|
||||
background: var(--sidebar-background);
|
||||
}
|
||||
|
||||
.login-page-body .theme-toggle__icon--moon::after {
|
||||
@@ -408,14 +425,16 @@ html[data-theme='dark'] .theme-toggle__icon--sun {
|
||||
}
|
||||
|
||||
.theme-toggle--sidebar {
|
||||
position: absolute;
|
||||
right: 18px;
|
||||
bottom: 18px;
|
||||
width: auto;
|
||||
padding: 0;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
z-index: 2;
|
||||
color: var(--sidebar-text-strong);
|
||||
}
|
||||
|
||||
.theme-toggle--sidebar .theme-toggle__icon--moon,
|
||||
.theme-toggle--sidebar .theme-toggle__icon--sun {
|
||||
color: var(--sidebar-text-strong);
|
||||
}
|
||||
|
||||
.theme-toggle--sidebar .theme-toggle__label {
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const Handlebars = require('handlebars');
|
||||
const { version: appVersion } = require('../../package.json');
|
||||
|
||||
const VIEWS_ROOT = path.join(__dirname, 'views');
|
||||
const cache = new Map();
|
||||
@@ -47,7 +48,7 @@ function loadTemplate(relativePath) {
|
||||
}
|
||||
|
||||
function renderView(viewName, context) {
|
||||
const viewContext = Object.assign({ stylesheets: [], scripts: [] }, context || {});
|
||||
const viewContext = Object.assign({ stylesheets: [], scripts: [], appVersion: appVersion }, context || {});
|
||||
const page = loadTemplate(`${viewName}.hbs`);
|
||||
const layout = loadTemplate(path.join('layout.hbs'));
|
||||
const body = page(viewContext);
|
||||
@@ -55,7 +56,7 @@ function renderView(viewName, context) {
|
||||
}
|
||||
|
||||
function renderFragment(viewName, context) {
|
||||
const viewContext = Object.assign({ stylesheets: [], scripts: [] }, context || {});
|
||||
const viewContext = Object.assign({ stylesheets: [], scripts: [], appVersion: appVersion }, context || {});
|
||||
const page = loadTemplate(`${viewName}.hbs`);
|
||||
const layout = loadTemplate(path.join('frame-layout.hbs'));
|
||||
const body = page(viewContext);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{{title}} - Signage</title>
|
||||
<title>{{title}} - Pulse</title>
|
||||
<link rel="icon" type="image/png" href="/assets/favicon.png" />
|
||||
<script src="/assets/js/theme-init.js"></script>
|
||||
<link rel="stylesheet" href="/assets/css/admin.css" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||
<title>{{title}} - Signage</title>
|
||||
<title>{{title}} - Pulse</title>
|
||||
<link rel="icon" type="image/png" href="/assets/favicon.png" />
|
||||
<script src="/assets/js/theme-init.js"></script>
|
||||
<link rel="stylesheet" href="/assets/css/admin.css" />
|
||||
@@ -75,9 +75,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="theme-toggle theme-toggle--sidebar" data-theme-toggle aria-pressed="false" aria-label="Switch to dark mode">
|
||||
<span class="theme-toggle__icon theme-toggle__icon--moon" aria-hidden="true"></span>
|
||||
</button>
|
||||
<div class="sidebar-footer sidebar-footer--bottom" aria-label="Sidebar controls">
|
||||
<span class="sidebar-version">v{{appVersion}}</span>
|
||||
<button type="button" class="theme-toggle theme-toggle--sidebar" data-theme-toggle aria-pressed="false" aria-label="Switch to dark mode">
|
||||
<span class="theme-toggle__icon theme-toggle__icon--moon" aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<button type="button" class="sidebar-backdrop" data-sidebar-backdrop aria-label="Close navigation"></button>
|
||||
|
||||
Reference in New Issue
Block a user