Skip to content

Commit cc93e44

Browse files
committed
tons of ui updates
1 parent cebd6f0 commit cc93e44

17 files changed

Lines changed: 110 additions & 88 deletions

File tree

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# ColdBox Name and Environment
22
APPNAME=ColdBox
33
ENVIRONMENT=development
4+
ASSET_URL=/includes
45

56
# BoxLang Environment
67
BOXLANG_DEBUG=true

app/config/Coldbox.bx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class {
1616
*/
1717
variables.coldbox = {
1818
// Application Setup
19-
appName : getSystemSetting( "APPNAME", "Your app name here" ),
19+
appName : getSystemSetting( "APPNAME", "InternalApp" ),
2020
eventName : "event",
2121
// Development Settings
2222
reinitPassword : "",
@@ -59,8 +59,20 @@ class {
5959
* --------------------------------------------------------------------------
6060
* Custom Settings
6161
* --------------------------------------------------------------------------
62+
* These settings control cbGenesis defaults
6263
*/
63-
variables.settings = {}
64+
variables.settings = {
65+
// The main logo path for the app, if empty it will use the default cbGenesis logo
66+
appLogo : "/includes/images/cbgenesis-icon-full.svg",
67+
// The main title for the app used in the sidebar
68+
appTitle : "cbGenesis",
69+
// Copyright notice
70+
copyrightNotice: "© #year()# cbGenesis. All rights reserved.",
71+
// The default theme for the app, can be "light" or "dark"
72+
defaultTheme: "dark",
73+
// The login layout to use, can be "AuthCenter" or "AuthSplit" or your own custom layout.
74+
loginLayout: "AuthSplit"
75+
}
6476

6577
/**
6678
* --------------------------------------------------------------------------

app/handlers/Dashboard.bx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,12 @@
1010
class extends="coldbox.system.EventHandler" {
1111

1212
function index( event, rc, prc ){
13-
// ── MOCK auth guard ───────────────────────────────────────────────────
14-
// Replace with cbsecurity annotation: @secured on the class or action,
15-
// or call: secure() which redirects via cbsecurity rules.
16-
if ( !structKeyExists( session, "currentUser" ) ) {
17-
return relocate( "auth/login" );
18-
}
19-
// ── END MOCK ─────────────────────────────────────────────────────────
20-
2113
prc.title = "Dashboard";
2214

2315
// Populate display user for the Admin layout (prc.authUser).
2416
// The Admin layout reads this struct — it does NOT call methods on a User object,
2517
// so it works for both this mock and a real authenticated user.
26-
var cu = session.currentUser;
18+
var cu = new app.models.system.User()
2719
prc.authUser = {
2820
"name" : cu.fullName ?: ( cu.firstName ?: "Admin" ) & " " & ( cu.lastName ?: "" ),
2921
"email" : cu.email ?: "",

app/layouts/AuthCenter.bxm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
x-cloak
3838
@click="$store.theme.toggle()"
3939
:aria-label="$store.theme.mode === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'">
40-
<i class="ph ph-sun" x-show="$store.theme.mode === 'dark'"></i>
41-
<i class="ph ph-moon" x-show="$store.theme.mode === 'light'"></i>
40+
<i class="ph-duotone ph-sun" x-show="$store.theme.mode === 'dark'"></i>
41+
<i class="ph-duotone ph-moon" x-show="$store.theme.mode === 'light'"></i>
4242
</button>
4343
</div>
4444

app/layouts/AuthSplit.bxm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@
4343
<!--- Feature highlights --->
4444
<ul class="auth-split-features">
4545
<li class="auth-split-feature">
46-
<span class="feature-icon"><i class="ph ph-lightning"></i></span>
46+
<span class="feature-icon"><i class="ph-duotone ph-lightning"></i></span>
4747
Fast and lightweight framework
4848
</li>
4949
<li class="auth-split-feature">
50-
<span class="feature-icon"><i class="ph ph-shield-check"></i></span>
50+
<span class="feature-icon"><i class="ph-duotone ph-shield-check"></i></span>
5151
Secure by default with CSRF &amp; auth
5252
</li>
5353
<li class="auth-split-feature">
54-
<span class="feature-icon"><i class="ph ph-cloud"></i></span>
54+
<span class="feature-icon"><i class="ph-duotone ph-cloud"></i></span>
5555
Ready to deploy anywhere
5656
</li>
5757
</ul>
@@ -79,8 +79,8 @@
7979
x-cloak
8080
@click="$store.theme.toggle()"
8181
:aria-label="$store.theme.mode === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'">
82-
<i class="ph ph-sun" x-show="$store.theme.mode === 'dark'"></i>
83-
<i class="ph ph-moon" x-show="$store.theme.mode === 'light'"></i>
82+
<i class="ph-duotone ph-sun" x-show="$store.theme.mode === 'dark'"></i>
83+
<i class="ph-duotone ph-moon" x-show="$store.theme.mode === 'light'"></i>
8484
</button>
8585
</div>
8686

app/views/_partials/header.bxm

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
Renders the sticky top bar: sidebar toggle, breadcrumb, theme toggle,
44
notifications, and user dropdown.
55

6-
The theme toggle button uses a morphing sun/moon SVG.
7-
CSS for .icon-theme-toggle lives in resources/assets/scss/components/_logo.scss.
8-
96
Usage (from Admin layout, inside .main-wrapper):
107
#view( "_partials/header" )#
118

@@ -24,13 +21,13 @@
2421
@click="$store.sidebar.toggle()"
2522
:aria-label="$store.sidebar.collapsed ? 'Expand sidebar' : 'Collapse sidebar'"
2623
:title="$store.sidebar.collapsed ? 'Expand sidebar' : 'Collapse sidebar'">
27-
<i class="ph ph-list" aria-hidden="true"></i>
24+
<i class="ph-duotone ph-list" aria-hidden="true"></i>
2825
</button>
2926

3027
<nav aria-label="Breadcrumb">
3128
<ol class="topbar-breadcrumb">
3229
<li class="topbar-breadcrumb-item">
33-
<a href="/">Home</a>
30+
<a href="/dashboard">Home</a>
3431
</li>
3532
<li class="topbar-breadcrumb-item active" aria-current="page">
3633
#( prc.keyExists( "title" ) ? prc.title : "Dashboard" )#
@@ -46,35 +43,18 @@
4643
--->
4744
<ul class="topbar-right">
4845

49-
<!--- Theme toggle (morphing sun ↔ crescent-moon SVG) --->
46+
<!--- Theme toggle --->
5047
<li>
5148
<button class="topbar-btn"
5249
x-cloak
5350
@click="$store.theme.toggle()"
5451
:aria-label="$store.theme.mode === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'"
5552
:title="$store.theme.mode === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'">
56-
<svg xmlns="http://www.w3.org/2000/svg"
57-
width="20" height="20"
58-
viewBox="0 0 32 32"
59-
fill="currentColor"
60-
class="icon-theme-toggle"
61-
:class="{ 'is-dark': $store.theme.mode === 'dark' }"
62-
aria-hidden="true"
63-
focusable="false">
64-
<clipPath id="topbar-theme-cutout">
65-
<path d="M0-11h25a1 1 0 0017 13v30H0Z"></path>
66-
</clipPath>
67-
<g clip-path="url(##topbar-theme-cutout)">
68-
<circle cx="16" cy="16" r="8.4"></circle>
69-
<path d="M18.3 3.2c0 1.3-1 2.3-2.3 2.3s-2.3-1-2.3-2.3S14.7.9 16 .9s2.3 1 2.3 2.3zm-4.6 25.6c0-1.3 1-2.3 2.3-2.3s2.3 1 2.3 2.3-1 2.3-2.3 2.3-2.3-1-2.3-2.3zm15.1-10.5c-1.3 0-2.3-1-2.3-2.3s1-2.3 2.3-2.3 2.3 1 2.3 2.3-1 2.3-2.3 2.3zM3.2 13.7c1.3 0 2.3 1 2.3 2.3s-1 2.3-2.3 2.3S.9 17.3.9 16s1-2.3 2.3-2.3zm5.8-7C9 7.9 7.9 9 6.7 9S4.4 8 4.4 6.7s1-2.3 2.3-2.3S9 5.4 9 6.7zm16.3 21c-1.3 0-2.3-1-2.3-2.3s1-2.3 2.3-2.3 2.3 1 2.3 2.3-1 2.3-2.3 2.3zm2.4-21c0 1.3-1 2.3-2.3 2.3S23 7.9 23 6.7s1-2.3 2.3-2.3 2.4 1 2.4 2.3zM6.7 23C8 23 9 24 9 25.3s-1 2.3-2.3 2.3-2.3-1-2.3-2.3 1-2.3 2.3-2.3z"></path>
70-
</g>
71-
</svg>
53+
<i class="ph-duotone ph-sun" x-show="$store.theme.mode === 'dark'" aria-hidden="true"></i>
54+
<i class="ph-duotone ph-moon" x-show="$store.theme.mode === 'light'" aria-hidden="true"></i>
7255
</button>
7356
</li>
7457

75-
<!--- Notification bell (returns its own <li>) --->
76-
#view( "_partials/notificationBell" )#
77-
7858
<!--- Vertical divider --->
7959
<li class="topbar-divider-item" role="separator" aria-hidden="true">
8060
<span class="topbar-divider"></span>
@@ -93,7 +73,7 @@
9373
<span class="topbar-user-name">
9474
#( prc.keyExists( "authUser" ) ? prc.authUser.name : "Admin" )#
9575
</span>
96-
<i class="ph ph-caret-down topbar-user-chevron" aria-hidden="true"></i>
76+
<i class="ph-duotone ph-caret-down topbar-user-chevron" aria-hidden="true"></i>
9777
</button>
9878
<ul class="dropdown-menu dropdown-menu-end"
9979
aria-labelledby="topbarUserMenu">
@@ -105,20 +85,14 @@
10585
<li><hr class="dropdown-divider"></li>
10686
<li>
10787
<a class="dropdown-item" href="/profile">
108-
<i class="ph ph-user" aria-hidden="true"></i>
88+
<i class="ph-duotone ph-user" aria-hidden="true"></i>
10989
Profile
11090
</a>
11191
</li>
112-
<li>
113-
<a class="dropdown-item" href="/settings">
114-
<i class="ph ph-gear" aria-hidden="true"></i>
115-
Settings
116-
</a>
117-
</li>
11892
<li><hr class="dropdown-divider"></li>
11993
<li>
12094
<a class="dropdown-item text-danger" href="/auth/logout">
121-
<i class="ph ph-sign-out" aria-hidden="true"></i>
95+
<i class="ph-duotone ph-sign-out" aria-hidden="true"></i>
12296
Sign out
12397
</a>
12498
</li>

app/views/_partials/mainNav.bxm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<!--- ── Brand ──────────────────────────────────────────── --->
2121
<div class="sidebar-header">
22-
<a href="/" class="sidebar-brand">
22+
<a href="/dashboard" class="sidebar-brand">
2323
#view( view: "_partials/logo", args: { variant: "compact" } )#
2424
</a>
2525
</div>
@@ -43,7 +43,7 @@
4343
class="sidebar-nav-item"
4444
:class="path === '/' || path.startsWith('/dashboard') ? 'active' : ''"
4545
title="Dashboard">
46-
<i class="ph ph-house sidebar-nav-icon" aria-hidden="true"></i>
46+
<i class="ph-duotone ph-house sidebar-nav-icon" aria-hidden="true"></i>
4747
<span class="sidebar-nav-text">Dashboard</span>
4848
</a>
4949
</li>
@@ -52,7 +52,7 @@
5252
class="sidebar-nav-item"
5353
:class="path.startsWith('/analytics') ? 'active' : ''"
5454
title="Analytics">
55-
<i class="ph ph-chart-line sidebar-nav-icon" aria-hidden="true"></i>
55+
<i class="ph-duotone ph-chart-line sidebar-nav-icon" aria-hidden="true"></i>
5656
<span class="sidebar-nav-text">Analytics</span>
5757
</a>
5858
</li>
@@ -61,7 +61,7 @@
6161
class="sidebar-nav-item"
6262
:class="path.startsWith('/reports') ? 'active' : ''"
6363
title="Reports">
64-
<i class="ph ph-files sidebar-nav-icon" aria-hidden="true"></i>
64+
<i class="ph-duotone ph-files sidebar-nav-icon" aria-hidden="true"></i>
6565
<span class="sidebar-nav-text">Reports</span>
6666
</a>
6767
</li>
@@ -77,7 +77,7 @@
7777
class="sidebar-nav-item"
7878
:class="path.startsWith('/users') ? 'active' : ''"
7979
title="Users">
80-
<i class="ph ph-users sidebar-nav-icon" aria-hidden="true"></i>
80+
<i class="ph-duotone ph-users sidebar-nav-icon" aria-hidden="true"></i>
8181
<span class="sidebar-nav-text">Users</span>
8282
</a>
8383
</li>
@@ -86,7 +86,7 @@
8686
class="sidebar-nav-item"
8787
:class="path.startsWith('/content') ? 'active' : ''"
8888
title="Content">
89-
<i class="ph ph-stack sidebar-nav-icon" aria-hidden="true"></i>
89+
<i class="ph-duotone ph-stack sidebar-nav-icon" aria-hidden="true"></i>
9090
<span class="sidebar-nav-text">Content</span>
9191
</a>
9292
</li>
@@ -95,7 +95,7 @@
9595
class="sidebar-nav-item"
9696
:class="path.startsWith('/settings') ? 'active' : ''"
9797
title="Settings">
98-
<i class="ph ph-gear sidebar-nav-icon" aria-hidden="true"></i>
98+
<i class="ph-duotone ph-gear sidebar-nav-icon" aria-hidden="true"></i>
9999
<span class="sidebar-nav-text">Settings</span>
100100
</a>
101101
</li>

app/views/_partials/messagebox.bxm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
role="alert"
5656
aria-live="polite">
5757

58-
<i class="ph #encodeForHTMLAttribute( localIcon )# messagebox__icon" aria-hidden="true"></i>
58+
<i class="ph-duotone #encodeForHTMLAttribute( localIcon )# messagebox__icon" aria-hidden="true"></i>
5959

6060
<div class="messagebox__body">
6161
<bx:if len( trim( args.title ) )>
@@ -69,7 +69,7 @@
6969
class="messagebox__dismiss"
7070
@click="dismiss()"
7171
aria-label="Dismiss">
72-
<i class="ph ph-x" aria-hidden="true"></i>
72+
<i class="ph-duotone ph-x" aria-hidden="true"></i>
7373
</button>
7474
</bx:if>
7575

app/views/_partials/notificationBell.bxm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<button type="button"
1515
class="topbar-btn"
1616
aria-label="Notifications">
17-
<i class="ph ph-bell" aria-hidden="true"></i>
17+
<i class="ph-duotone ph-bell" aria-hidden="true"></i>
1818
</button>
1919
</li>
2020
</bx:output>

app/views/auth/forgotPassword.bxm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="text-center mb-4">
55
<div class="d-inline-flex align-items-center justify-content-center rounded-circle mb-3"
66
style="width:56px;height:56px;background:var(--bl-gradient-soft);">
7-
<i class="ph ph-key" style="font-size:1.5rem;color:var(--bl-cyan-dark);" aria-hidden="true"></i>
7+
<i class="ph-duotone ph-key" style="font-size:1.5rem;color:var(--bl-cyan-dark);" aria-hidden="true"></i>
88
</div>
99
<h1 class="auth-heading">Forgot your password?</h1>
1010
<p class="auth-subheading">Enter your email and we'll send you a reset link</p>
@@ -75,7 +75,7 @@
7575

7676
<p class="text-center mb-0 mt-3" style="font-size:0.9rem;color:var(--app-text-muted);">
7777
<a href="#event.buildLink( 'auth/login' )#" class="auth-link">
78-
<i class="ph ph-arrow-left me-1" aria-hidden="true"></i>
78+
<i class="ph-duotone ph-arrow-left me-1" aria-hidden="true"></i>
7979
Back to sign in
8080
</a>
8181
</p>

0 commit comments

Comments
 (0)