Major changes: - New ThemeManager with Twig templating and SCSS compilation - Dynamic themes system (themes/default, themes/demo) - LogManager with SQLite storage and syslog forwarding - RequestLogger with static helper methods - Admin UI overhaul (Bootstrap 5, dark mode) - Admin config page with logging and theme settings - Admin logs page with filters and search - Removed legacy Mustache templates - Removed test plugin and theme - Composer dependencies: Twig, scssphp, CommonMark, MaxMind GeoIP
332 lines
6.7 KiB
SCSS
332 lines
6.7 KiB
SCSS
// CodePress demo theme styles
|
|
// A distinct look to demonstrate that themes are fully swappable.
|
|
|
|
// Theme color variables (defined per theme; used by the CSS custom properties below)
|
|
$header-bg: #613583;
|
|
$header-font: #ffffff;
|
|
$header-height: 120px;
|
|
$nav-bg: #813d9c;
|
|
$nav-font: #ffffff;
|
|
$nav-height: 50px;
|
|
$sidebar-bg: #f3e8f7;
|
|
$sidebar-border: #d8b4e0;
|
|
|
|
// Optional header background image and overlay opacity
|
|
$header-bg-image: none;
|
|
$header-bg-opacity: 1;
|
|
|
|
:root {
|
|
--header-bg: #{$header-bg};
|
|
--header-font: #{$header-font};
|
|
--header-height: #{$header-height};
|
|
--nav-bg: #{$nav-bg};
|
|
--nav-font: #{$nav-font};
|
|
--nav-height: #{$nav-height};
|
|
--sidebar-bg: #{$sidebar-bg};
|
|
--sidebar-border: #{$sidebar-border};
|
|
}
|
|
|
|
// Header background (optional background image via $header-bg-image)
|
|
#site-header {
|
|
background-image: $header-bg-image;
|
|
background-size: cover;
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
position: relative;
|
|
}
|
|
|
|
@if $header-bg-image != 'none' {
|
|
#site-header::before {
|
|
content: '';
|
|
position: absolute;
|
|
inset: 0;
|
|
background-color: var(--header-bg);
|
|
opacity: $header-bg-opacity;
|
|
pointer-events: none;
|
|
z-index: 0;
|
|
}
|
|
}
|
|
|
|
// Rounded, softer header
|
|
.navbar {
|
|
background-color: var(--header-bg) !important;
|
|
min-height: var(--header-height);
|
|
border-bottom: 4px solid var(--nav-bg) !important;
|
|
|
|
.navbar-brand,
|
|
.navbar-text,
|
|
.form-control,
|
|
.btn {
|
|
color: var(--header-font) !important;
|
|
}
|
|
|
|
.form-control::placeholder {
|
|
color: rgba(255, 255, 255, 0.7) !important;
|
|
}
|
|
|
|
.btn-outline-light {
|
|
border-color: var(--header-font) !important;
|
|
}
|
|
}
|
|
|
|
// Language dropdown styling
|
|
.dropdown-menu {
|
|
background-color: var(--header-bg) !important;
|
|
border: 1px solid var(--header-font) !important;
|
|
}
|
|
|
|
.dropdown-item {
|
|
color: var(--header-font) !important;
|
|
|
|
&:hover {
|
|
background-color: rgba(255, 255, 255, 0.1) !important;
|
|
color: var(--header-font) !important;
|
|
}
|
|
}
|
|
|
|
.dropdown-toggle::after {
|
|
display: none !important;
|
|
}
|
|
|
|
.btn-outline-light {
|
|
color: var(--header-font) !important;
|
|
border-color: var(--header-font) !important;
|
|
|
|
&:hover {
|
|
background-color: rgba(255, 255, 255, 0.1) !important;
|
|
color: var(--header-font) !important;
|
|
}
|
|
|
|
&:focus,
|
|
&:active,
|
|
.show > &.dropdown-toggle {
|
|
background-color: rgba(255, 255, 255, 0.1) !important;
|
|
color: var(--header-font) !important;
|
|
border-color: var(--header-font) !important;
|
|
box-shadow: none !important;
|
|
}
|
|
}
|
|
|
|
.bi-chevron-down {
|
|
font-size: 0.75em;
|
|
margin-left: 0.25rem;
|
|
}
|
|
|
|
// Breadcrumb
|
|
.breadcrumb-item + .breadcrumb-item::before {
|
|
content: "" !important;
|
|
padding: 0 !important;
|
|
}
|
|
|
|
.breadcrumb {
|
|
--bs-breadcrumb-divider: "";
|
|
|
|
.breadcrumb-item {
|
|
color: var(--nav-font) !important;
|
|
|
|
a {
|
|
color: var(--nav-font) !important;
|
|
text-decoration: none;
|
|
|
|
&:hover {
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.sidebar-toggle-item {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-right: 0.5rem;
|
|
}
|
|
|
|
.sidebar-toggle-btn {
|
|
padding: 0;
|
|
line-height: 1;
|
|
font-size: 1.1rem;
|
|
color: var(--header-bg) !important;
|
|
border: none !important;
|
|
background: transparent !important;
|
|
box-shadow: none !important;
|
|
cursor: pointer;
|
|
|
|
&:hover {
|
|
opacity: 0.7;
|
|
}
|
|
}
|
|
|
|
.sidebar-column {
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.sidebar-hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
// Navigation section background
|
|
.navigation-section {
|
|
background-color: var(--nav-bg) !important;
|
|
color: var(--nav-font) !important;
|
|
min-height: var(--nav-height);
|
|
}
|
|
|
|
// Accessibility
|
|
.focus-visible:focus,
|
|
.btn:focus,
|
|
.form-control:focus,
|
|
.nav-link:focus {
|
|
outline: 3px solid #0056b3 !important;
|
|
outline-offset: 2px !important;
|
|
box-shadow: 0 0 0 1px #ffffff, 0 0 0 4px #0056b3 !important;
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
scroll-behavior: auto !important;
|
|
}
|
|
}
|
|
|
|
.nav-tabs {
|
|
background-color: transparent !important;
|
|
border: none !important;
|
|
|
|
.nav-link {
|
|
background-color: transparent !important;
|
|
border: none !important;
|
|
color: var(--nav-font) !important;
|
|
|
|
&:hover {
|
|
background-color: rgba(255, 255, 255, 0.1) !important;
|
|
}
|
|
|
|
&.active {
|
|
background-color: rgba(255, 255, 255, 0.2) !important;
|
|
border-bottom: 2px solid var(--nav-font) !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Sidebar styling - rounded cards look
|
|
.sidebar-column {
|
|
background-color: var(--sidebar-bg) !important;
|
|
border-right: 1px solid var(--sidebar-border) !important;
|
|
position: sticky;
|
|
top: 0;
|
|
min-height: calc(100vh - var(--header-height) - var(--nav-height) - 42px);
|
|
}
|
|
|
|
.sidebar {
|
|
padding: 1.5rem;
|
|
height: 100%;
|
|
overflow-y: auto;
|
|
|
|
.card {
|
|
border-radius: 1rem;
|
|
border: 1px solid var(--sidebar-border);
|
|
}
|
|
}
|
|
|
|
.content-column {
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
.content-wrapper {
|
|
padding: 2rem;
|
|
padding-bottom: 80px !important;
|
|
}
|
|
|
|
.main-content {
|
|
flex: 1;
|
|
}
|
|
|
|
// Mobile responsive
|
|
@media (max-width: 767.98px) {
|
|
.sidebar-column {
|
|
border-right: none !important;
|
|
border-top: 1px solid var(--sidebar-border) !important;
|
|
min-height: auto;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.content-wrapper {
|
|
min-height: auto;
|
|
padding-bottom: 2rem !important;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 991.98px) {
|
|
.sidebar-column {
|
|
order: 2 !important;
|
|
}
|
|
|
|
.content-column {
|
|
order: 1 !important;
|
|
}
|
|
}
|
|
|
|
// Code block styling
|
|
pre {
|
|
background: #f8f9fa;
|
|
padding: 1rem;
|
|
border-radius: 6px;
|
|
overflow-x: auto;
|
|
border: 1px solid #dee2e6;
|
|
margin-bottom: 1rem;
|
|
|
|
code {
|
|
background: none;
|
|
padding: 0;
|
|
color: #333;
|
|
font-size: 0.85rem;
|
|
line-height: 1.5;
|
|
}
|
|
}
|
|
|
|
code {
|
|
background: #e8e8e8;
|
|
padding: 0.15rem 0.4rem;
|
|
border-radius: 3px;
|
|
font-size: 0.9em;
|
|
color: #d63384;
|
|
}
|
|
|
|
// Footer icon hover effects
|
|
.footer-icon {
|
|
color: #6c757d;
|
|
text-decoration: none;
|
|
transition: all 0.2s ease-in-out;
|
|
display: inline-block;
|
|
padding: 2px;
|
|
|
|
&:hover {
|
|
color: #0d6efd;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
&:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
&.guide:hover {
|
|
color: #198754;
|
|
}
|
|
|
|
&.cms:hover {
|
|
color: #dc3545;
|
|
}
|
|
|
|
&.git:hover {
|
|
color: #6f42c1;
|
|
}
|
|
|
|
&.website:hover {
|
|
color: #fd7e14;
|
|
}
|
|
}
|