Skip to content

Commit 5b668eb

Browse files
committed
feat: add home page to add an another example for dashboard prefab
1 parent e1e0906 commit 5b668eb

File tree

17 files changed

+830
-206
lines changed

17 files changed

+830
-206
lines changed

doc-app/app/components/theme-selector.gts

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,62 @@ export default class ThemeSelector extends Component<ThemeSelectorSignature> {
5454
}
5555

5656
<template>
57-
<div class="dropdown dropdown-top {{if @sidebarCollapsed "dropdown-right dropdown-end" "dropdown-start"}} {{if this.themeDropdownOpen "dropdown-open"}}">
58-
<button type="button" class="btn btn-ghost btn-sm gap-1" {{on "click" this.toggleThemeDropdown}}>
59-
<svg class="size-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
60-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"/>
57+
<div
58+
class="dropdown dropdown-top
59+
{{if @sidebarCollapsed 'dropdown-right dropdown-end' 'dropdown-start'}}
60+
{{if this.themeDropdownOpen 'dropdown-open'}}"
61+
>
62+
<button
63+
type="button"
64+
class="btn btn-ghost btn-sm gap-1"
65+
{{on "click" this.toggleThemeDropdown}}
66+
>
67+
<svg
68+
class="size-5"
69+
fill="none"
70+
viewBox="0 0 24 24"
71+
stroke="currentColor"
72+
>
73+
<path
74+
stroke-linecap="round"
75+
stroke-linejoin="round"
76+
stroke-width="2"
77+
d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"
78+
/>
6179
</svg>
6280
{{#unless @sidebarCollapsed}}
6381
<span>Theme</span>
64-
<svg class="size-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
65-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
82+
<svg
83+
class="size-4"
84+
fill="none"
85+
viewBox="0 0 24 24"
86+
stroke="currentColor"
87+
>
88+
<path
89+
stroke-linecap="round"
90+
stroke-linejoin="round"
91+
stroke-width="2"
92+
d="M19 9l-7 7-7-7"
93+
/>
6694
</svg>
6795
{{/unless}}
6896
</button>
69-
<ul class="dropdown-content menu bg-base-200 rounded-box z-50 w-52 p-2 shadow">
97+
<ul
98+
class="dropdown-content menu bg-base-200 rounded-box z-50 w-52 p-2 shadow"
99+
>
70100
<li class="menu-title px-2 py-1 text-base-content/70">Theme</li>
71101
{{#each this.THEMES as |themeName|}}
72102
<li>
73-
<button type="button" {{on "click" (fn this.setTheme themeName)}} class="flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 {{if (this.isCurrentTheme themeName) "active"}}">
74-
<span data-theme={{themeName}} class="grid grid-cols-2 gap-0.5 p-0.5 rounded-sm">
103+
<button
104+
type="button"
105+
{{on "click" (fn this.setTheme themeName)}}
106+
class="flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5
107+
{{if (this.isCurrentTheme themeName) 'active'}}"
108+
>
109+
<span
110+
data-theme={{themeName}}
111+
class="grid grid-cols-2 gap-0.5 p-0.5 rounded-sm"
112+
>
75113
<span class="w-2 h-2 rounded-sm bg-primary"></span>
76114
<span class="w-2 h-2 rounded-sm bg-secondary"></span>
77115
<span class="w-2 h-2 rounded-sm bg-accent"></span>

doc-app/app/router.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Router.map(function () {
4646
});
4747
});
4848
});
49-
this.route('login', function () { })
50-
this.route('forgot-password', function () { })
51-
this.route('reset-password', function () { })
49+
this.route('home', function () {});
50+
this.route('login', function () {});
51+
this.route('forgot-password', function () {});
52+
this.route('reset-password', function () {});
5253
});

doc-app/app/styles/app.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
/* stylelint-disable import-notation */
55
@import 'tailwindcss';
66
@plugin "daisyui" {
7-
themes: nord --default, dracula, cupcake, corporate;
7+
themes:
8+
nord --default,
9+
dracula,
10+
cupcake,
11+
corporate;
812
}
913
@import '@triptyk/ember-input/dist/app.css';
1014
@import '@triptyk/ember-ui/dist/app.css';

doc-app/app/styles/auth.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
.auth-layout-content .tpk-login-form,
1414
.auth-layout-content .tpk-forgot-password-form,
15-
.auth-layout-content .tpk-reset-password-form {
15+
.auth-layout-content .tpk-reset-password-form {
1616
@apply flex flex-col w-full gap-4 bg-base-100 p-8 rounded-2xl shadow-xl border border-base-200;
1717
}
1818

@@ -24,7 +24,7 @@
2424
@apply w-full;
2525
}
2626

27-
.auth-layout-content button[type="submit"] {
27+
.auth-layout-content button[type='submit'] {
2828
@apply w-1/2 mx-auto btn btn-primary;
2929
}
3030

0 commit comments

Comments
 (0)