Files
hotline-planner/dev/backend/HotlinePlanner profile pic and bg worker/Views/Shared/_Layout.cshtml
2026-02-24 13:32:01 +01:00

225 lines
9.7 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - Hotline Planner</title>
<!-- Premium Typography & Icons -->
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" type="text/css">
<link href="https://cdn.jsdelivr.net/npm/animate.css@4.0.0/animate.min.css" rel="stylesheet" type="text/css">
<!-- Quasar CSS (Stable CDN) -->
<link href="https://cdn.jsdelivr.net/npm/quasar@2.14.2/dist/quasar.prod.css" rel="stylesheet" type="text/css">
<style>
:root {
--brand-primary: #1976D2;
--brand-secondary: #26A69A;
--bg-light: #F8F9FA;
--border-color: rgba(0, 0, 0, 0.08);
}
body {
font-family: 'Outfit', sans-serif;
background-color: var(--bg-light);
color: #1D1D1D;
margin: 0;
}
.clean-header {
background: white !important;
color: #1D1D1D !important;
border-bottom: 1px solid var(--border-color);
}
.clean-card {
background: white;
border: 1px solid var(--border-color);
border-radius: 12px;
box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
[v-cloak] { display: none !important; }
.q-toolbar__title {
font-weight: 700;
letter-spacing: -0.5px;
font-size: 1.25rem;
}
.q-btn {
text-transform: none;
font-weight: 500;
}
.nav-active {
color: var(--brand-primary) !important;
background: rgba(25, 118, 210, 0.05);
font-weight: 600;
}
.border-top { border-top: 1px solid var(--border-color); }
/* Page scale transition */
.page-fade-enter-active, .page-fade-leave-active {
transition: all 0.2s ease;
}
.page-fade-enter-from { opacity: 0; transform: scale(0.99); }
.page-fade-leave-to { opacity: 0; transform: scale(1.01); }
</style>
</head>
<body>
<div id="q-app" v-cloak>
<q-layout view="lHh Lpr lFf">
<q-header elevated class="clean-header">
<q-toolbar class="q-px-lg">
<q-btn flat round dense icon="menu" color="primary" v-on:click="leftDrawerOpen = !leftDrawerOpen"></q-btn>
<q-toolbar-title class="text-primary">
Hotline Planner
</q-toolbar-title>
<div class="gt-xs text-grey-6 q-mr-lg">NextGen v{{appVersion}}</div>
<div v-if="isAuthenticated">
<q-btn flat no-caps color="primary" class="q-px-md">
<q-avatar size="32px" class="q-mr-sm">
<q-icon name="account_circle" size="32px"></q-icon>
</q-avatar>
<span class="gt-sm">{{userName}}</span>
<q-menu transition-show="jump-down" transition-hide="jump-up" class="clean-card shadow-12">
<q-list style="min-width: 200px">
<q-item class="q-py-md">
<q-item-section avatar>
<q-avatar icon="person" color="grey-2" text-color="primary"></q-avatar>
</q-item-section>
<q-item-section>
<q-item-label class="text-weight-bold">{{userName}}</q-item-label>
<q-item-label caption>Administrator</q-item-label>
</q-item-section>
</q-item>
<q-separator></q-separator>
<q-item clickable v-v-close-popup v-on:click="logout">
<q-item-section avatar>
<q-icon name="logout" color="negative"></q-icon>
</q-item-section>
<q-item-section class="text-negative">Sign Out</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</div>
</q-toolbar>
</q-header>
<q-drawer v-model="leftDrawerOpen" bordered class="bg-white" :width="260">
<q-scroll-area class="fit">
<q-list padding class="q-mt-md">
<q-item-label header class="text-weight-bold text-uppercase text-grey-6 q-px-lg" style="font-size: 0.7rem; letter-spacing: 1px;">Navigation</q-item-label>
<q-item clickable tag="a" href="/" class="q-mx-md q-mb-xs rounded-borders" active-class="nav-active" :active="isCurrentPath('/')">
<q-item-section avatar>
<q-icon name="dashboard"></q-icon>
</q-item-section>
<q-item-section>Dashboard</q-item-section>
</q-item>
<q-item-label header class="text-weight-bold text-uppercase text-grey-6 q-px-lg q-mt-md" style="font-size: 0.7rem; letter-spacing: 1px;">Auditing</q-item-label>
<q-item clickable tag="a" href="/Account/EventLogs" class="q-mx-md q-mb-xs rounded-borders" active-class="nav-active" :active="isCurrentPath('/Account/EventLogs')">
<q-item-section avatar>
<q-icon name="assignment"></q-icon>
</q-item-section>
<q-item-section>Event Logs</q-item-section>
</q-item>
<q-item clickable tag="a" href="/Account/Tokens" class="q-mx-md q-mb-xs rounded-borders" active-class="nav-active" :active="isCurrentPath('/Account/Tokens')">
<q-item-section avatar>
<q-icon name="vpn_key"></q-icon>
</q-item-section>
<q-item-section>Token Store</q-item-section>
</q-item>
<q-item-label header class="text-weight-bold text-uppercase text-grey-6 q-px-lg q-mt-md" style="font-size: 0.7rem; letter-spacing: 1px;">System</q-item-label>
<q-item clickable tag="a" href="/Home/Privacy" class="q-mx-md rounded-borders" active-class="nav-active" :active="isCurrentPath('/Home/Privacy')">
<q-item-section avatar>
<q-icon name="security"></q-icon>
</q-item-section>
<q-item-section>Privacy Policy</q-section>
</q-item>
</q-list>
</q-scroll-area>
</q-drawer>
<q-page-container>
<q-page class="q-pa-xl">
<div class="max-width-1200 q-mx-auto">
@RenderBody()
</div>
</q-page>
</q-page-container>
<q-footer class="bg-white text-grey-6 q-pa-md text-center border-top">
<div class="text-caption">
&copy; @DateTime.Now.Year - Hotline Planner NextGen - Secure Workforce Intelligence
</div>
</q-footer>
</q-layout>
</div>
<!-- Vue 3 & Quasar (Stable CDNs) -->
<script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script>
<script src="https://cdn.jsdelivr.net/npm/quasar@2.14.2/dist/quasar.umd.prod.js"></script>
<script>
const app = Vue.createApp({
data() {
return {
leftDrawerOpen: false,
appVersion: '2.0.0',
isAuthenticated: @(User.Identity?.IsAuthenticated.ToString().ToLower() ?? "false"),
userName: '@(User.Identity?.Name ?? "")'
}
},
methods: {
logout() {
const form = document.createElement('form');
form.method = 'POST';
form.action = '/Account/Logout';
document.body.appendChild(form);
form.submit();
},
isCurrentPath(path) {
return window.location.pathname === path;
}
}
});
app.use(Quasar, {
config: {
brand: {
primary: '#1976D2',
secondary: '#26A69A',
accent: '#9C27B0',
dark: '#1D1D1D',
positive: '#2E7D32',
negative: '#D32F2F',
info: '#0288D1',
warning: '#F57C00'
}
}
});
</script>
@await RenderSectionAsync("Scripts", required: false)
<script>
if (!window.vueAppMounted) {
app.mount('#q-app');
window.vueAppMounted = true;
}
</script>
</body>
</html>