refactor(frontend): decouple app shell from PrimeNG layout system (#307)

* refactor(layout): decouple shell from PrimeNG

* fix(frontend): review fixes for layout decoupling

- Rewrite layout service spec to match new API surface
- Remove dead ToastModule import from AppLayoutComponent
- Add missing type="button" to profile and logout buttons
- Add missing i18n keys to all non-English locales

* chore(frontend): Layout shell consistency

* chore(frontend): shell and routing improvements

* chore(frontend): remove stray shimmer effect

* chore(frontend): code cleanup

* chore(ui): Fix navitem types consistency

* chore(frontend): simplify layout structure + imports

* chore(frontend): remove empty files

* chore(frontend): Menu component cleanup

* chore(frontend): remove nav translation layer

* chore(frontend): revert stray artwork change

* chore(frontend): revert author animation tweak

* chore(frontend): review fixes

* fix(frontend): restore topbar template after rebase conflict
This commit is contained in:
Alex
2026-04-22 17:26:57 -04:00
committed by Zach Yale
parent 61b9b53a60
commit 55a6343f65
110 changed files with 1688 additions and 1518 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

@@ -18,9 +18,6 @@ body {
min-height: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
--glow-image: url("../../../images/topbar.png"), radial-gradient(50% 50% at center -25px, var(--p-primary-color) 0%, #000 100%);
--glow-blend: hard-light, color-dodge;
}
a {
@@ -32,11 +29,6 @@ a {
min-height: 100dvh;
scroll-behavior: smooth;
background-color: var(--ground-background);
background-blend-mode: var(--glow-blend);
background-image: var(--glow-image);
background-position: top;
background-repeat: no-repeat;
background-size: auto 20rem;
}
p {
@@ -12,7 +12,7 @@
left: 1.1rem;
transition: transform variables.$transition-duration, left variables.$transition-duration;
background-color: var(--card-background);
border: 1px solid var(--p-content-border-color);
border: 1px solid var(--content-border-color);
border-radius: variables.$border-radius;
padding: 0.5rem 0.8rem 0.5rem 1.35rem;
box-shadow: 0 3px 5px rgb(0 0 0 / 2%), 0 0 2px rgb(0 0 0 / 5%), 0 1px 4px rgb(0 0 0 / 8%);
@@ -35,7 +35,7 @@
font-size: .857rem;
text-transform: uppercase;
font-weight: 700;
color: var(--surface-900);
color: var(--text-secondary-color);
margin: .75rem 0;
}
@@ -93,7 +93,7 @@
background-color: var(--surface-hover);
}
&:focus {
&:focus-visible {
@include mixins.focused-inset;
}
}
@@ -1,17 +1,3 @@
@mixin focus-visible() {
&:focus-visible {
outline: 1px solid var(--primary-color);
outline-offset: var(--p-focus-ring-offset);
}
}
@mixin focused() {
outline: 0 none;
outline-offset: 0;
transition: box-shadow .2s;
box-shadow: var(--focus-ring);
}
@mixin focused-inset() {
outline: 0 none;
outline-offset: 0;
@@ -19,4 +5,3 @@
box-shadow: inset var(--focus-ring);
}
@@ -11,28 +11,6 @@
@media (width >= 992px) {
.layout-wrapper {
&.layout-overlay {
.layout-main-container {
margin-left: 0;
padding: 5rem 1.1rem 1.1rem 3.6rem;
}
.layout-sidebar {
transform: translateX(-100%);
left: 0;
top: 0;
height: 100dvh;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
&.layout-overlay-active {
.layout-sidebar {
transform: translateX(0);
}
}
}
&.layout-static {
.layout-main-container {
padding-left: calc(var(--sidebar-width, 225px) + 30px);
@@ -85,6 +63,9 @@
z-index: 998;
width: 100%;
height: 100%;
padding: 0;
border: 0;
appearance: none;
background-color: rgb(0 0 0 / 60%);
}
@@ -1,4 +1,3 @@
@use "mixins";
@use "variables";
.layout-topbar {
@@ -11,7 +10,7 @@
padding: 0 1rem;
background-color: color-mix(in srgb, var(--card-background) 25%, transparent);
border: none;
border-bottom: 1px solid var(--p-content-border-color);
border-bottom: 1px solid var(--content-border-color);
transition: left variables.$transition-duration;
display: flex;
align-items: center;
@@ -63,8 +62,6 @@
background-color: var(--card-background);
cursor: pointer;
// @include focus-visible();
&:hover {
border-color: var(--primary-color);
}
@@ -149,6 +146,43 @@
}
.layout-menu-button,
.mobile-menu-trigger {
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 2.5rem;
height: 2.5rem;
padding: 0;
border: 1px solid var(--border-color);
background-color: var(--card-background);
cursor: pointer;
outline-color: transparent;
transition: outline-color .2s, border-color .2s, transform .3s ease-in-out;
i {
color: var(--text-color);
}
&:hover {
border-color: var(--primary-color);
}
&:focus-visible {
outline: 2px solid var(--primary-color);
outline-offset: 2px;
}
}
.layout-menu-button {
border-radius: 999px;
}
.mobile-menu-trigger {
border-radius: 6px;
}
.rotate-left {
transform: rotate(0deg);
transition: transform 0.3s ease-in-out;
@@ -5,7 +5,7 @@ h1, h2, h3, h4, h5, h6 {
font-family: inherit;
font-weight: 500;
line-height: 1.2;
color: var(--surface-900);
color: var(--high-contrast-text-color);
&:first-child {
margin-top: 0;
@@ -50,7 +50,7 @@ blockquote {
}
hr {
border-top: solid var(--surface-border);
border-top: solid var(--border-color);
border-width: 1px 0 0;
margin: 1rem 0;
}
@@ -1,4 +1,4 @@
/* General */
$scale: 14px; /* main font size */
$border-radius: 12px; /* border radius of layout element e.g. card, sidebar */
$transition-duration: .2s; /* transition duration of layout elements e.g. sidebar, overlay menus */
$transition-duration: .2s; /* transition duration of layout elements e.g. sidebar */
@@ -6,4 +6,3 @@
@use "_content";
@use "_responsive";
@use "_typography";
@use "variables/main/dark";
@@ -1 +0,0 @@
@import './main/_dark';
@@ -1,28 +0,0 @@
:root[class~="p-dark"] {
/* Primary */
--primary-color: var(--p-primary-color);
--primary-contrast-color: var(--p-primary-contrast-color);
--primary-hover-color: var(--p-primary-hover-color);
--primary-text-color: var(--p-primary-400);
--primary-text-color-dark: var(--p-primary-900);
/* Content & Text */
--text-color: var(--p-surface-0);
--text-color-secondary: var(--p-surface-300);
--text-secondary-color: var(--p-surface-400);
--high-contrast-text-color: var(--p-surface-0);
--p-text-muted-color: var(--p-surface-400);
--p-content-background: var(--p-surface-900);
--p-content-border-color: var(--p-surface-700);
/* Surfaces & Borders */
--ground-background: var(--p-surface-950);
--overlay-background: var(--p-surface-900);
--card-background: var(--p-surface-900);
--card-border: 1px solid transparent;
--border-color: var(--p-surface-700);
/* Code, Mark & Selection */
--code-background: var(--p-surface-900);
}
+53
View File
@@ -0,0 +1,53 @@
:root {
/* Primary */
--primary-color: #4ade80;
--primary-color-rgb: 74, 222, 128;
--primary-contrast-color: #1a1e21;
--primary-hover-color: #86efac;
--primary-text-color: #4ade80;
--primary-text-color-dark: #14532d;
/* Text */
--text-color: #ffffff;
--text-color-secondary: #b4bcc7;
--text-secondary-color: #919ca9;
--text-muted-color: #919ca9;
--high-contrast-text-color: #ffffff;
/* Surfaces */
--ground-background: #0d1012;
--overlay-background: #1a1e21;
--card-background: #1a1e21;
--content-background: #1a1e21;
--code-background: #1a1e21;
/* Borders */
--border-color: #464f56;
--content-border-color: #464f56;
--card-border: 1px solid transparent;
/* Surface scale */
--surface-0: #ffffff;
--surface-50: #f4f6f8;
--surface-100: #e6e9ed;
--surface-200: #d3d8de;
--surface-300: #b4bcc7;
--surface-400: #919ca9;
--surface-500: #71808a;
--surface-600: #5a666f;
--surface-700: #464f56;
--surface-800: #34393e;
--surface-900: #1a1e21;
--surface-950: #0d1012;
/* Interaction */
--surface-hover: color-mix(in srgb, var(--surface-400) 12%, transparent);
--surface-border: var(--surface-700);
/* Focus */
--focus-ring-offset: 2px;
--focus-ring: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color) 40%, transparent);
/* Typography */
--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}