Skip to content

Commit c4ac6f7

Browse files
committed
style: TT-332 color palette
1 parent 419ff2b commit c4ac6f7

File tree

4 files changed

+71
-102
lines changed

4 files changed

+71
-102
lines changed

src/app/modules/shared/components/dark-mode/dark-mode.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<button
2-
class="w-10 h-6 rounded-full bg-white flex items-center transition duration-300 focus:outline-none shadow"
2+
class="w-10 h-6 rounded-full bg-gray-lightest flex items-center transition duration-300 focus:outline-none shadow"
33
(click)="changeToDarkOrLightTheme()"
44
>
55
<div
66
#themeToggle
7-
class="w-7 h-7 relative rounded-full transition duration-500 transform bg-yellow-300 -translate-x-1 p-1"
7+
class="w-7 h-7 relative rounded-full transition duration-500 transform bg-warning -translate-x-1 p-1"
88
>
99
<ng-container *ngIf="isDarkTheme(); else elseToggle">
1010
<img src="assets/icons/moon.svg" alt="moon icon" />

src/app/modules/shared/components/dark-mode/dark-mode.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ export class DarkModeComponent implements AfterViewInit {
6161
switchThemeToggleStyles(theme: string): void {
6262
switch (theme) {
6363
case 'dark':
64-
this.themeToggle.nativeElement.classList.remove('bg-yellow-300', '-translate-x-1');
65-
this.themeToggle.nativeElement.classList.add('bg-gray-300', 'translate-x-1/2');
64+
this.themeToggle.nativeElement.classList.remove('bg-warning', '-translate-x-1');
65+
this.themeToggle.nativeElement.classList.add('bg-gray-lighter', 'translate-x-1/2');
6666
break;
6767
case 'light':
68-
this.themeToggle.nativeElement.classList.remove('bg-gray-300', 'translate-x-1/2');
69-
this.themeToggle.nativeElement.classList.add('bg-yellow-300', '-translate-x-1');
68+
this.themeToggle.nativeElement.classList.remove('bg-gray-lighter', 'translate-x-1/2');
69+
this.themeToggle.nativeElement.classList.add('bg-warning', '-translate-x-1');
7070
break;
7171
}
7272
}

src/app/modules/shared/components/sidebar/sidebar.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
<div class="d-flex dark:bg-gray" id="wrapper">
2-
<div class="border-right dark:bg-grey-dark" id="sidebar-wrapper">
1+
<div class="d-flex bg-gray-lighter dark:bg-gray-darker dark:text-white" id="wrapper">
2+
<div class="border-right bg-gray-lightest dark:bg-gray-dark" id="sidebar-wrapper">
33
<div class="sidebar-heading" style="text-align: center">
44
<img src="assets/img/ioet.png" width="90" height="auto" style="padding-top: 2rem; padding-bottom: 2rem;" alt="logo" />
55
</div>
6-
<div class="list-group list-group-flush">
6+
<div class="list-group list-group-flush bg-gray-lightest dark:bg-gray-darker">
77
<a
88
*ngFor="let item of itemsSidebar"
99
[routerLink]="item.route"
1010
routerLinkActive=""
11-
class="list-group-item list-group-item-action dark:bg-grey-dark dark:text-white"
11+
class="list-group-item list-group-item-action bg-gray-lightest dark:bg-gray-dark dark:text-white"
1212
[ngClass]="{active: item.active}"
1313
>
1414
<i class="{{ item.icon }}"></i> {{ item.text }}
1515
</a>
1616
</div>
1717
</div>
1818
<div id="page-content-wrapper">
19-
<nav class="navbar navbar-expand-lg navbar-light border-bottom">
20-
<button class="btn btn-primary" id="menu-toggle">
19+
<nav class="navbar navbar-expand-lg navbar-light border-bottom bg-gray-lightest dark:bg-gray-dark">
20+
<button class="btn btn-primary bg-primary hover:bg-primary-light" id="menu-toggle">
2121
Toggle Menu
2222
</button>
2323
<div class="dark-mode-toggle">
@@ -33,7 +33,7 @@
3333
</div>
3434
</nav>
3535
<div class="container-fluid px-0 full-height">
36-
<div class="content_app h-100">
36+
<div class="content_app mx-10 my-10 rounded-md bg-gray-lightest dark:bg-gray-dark">
3737
<router-outlet></router-outlet>
3838
</div>
3939
</div>

tailwind.config.js

Lines changed: 58 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,63 @@
11
module.exports = {
2-
prefix: '',
3-
purge: {
4-
content: [
5-
'./src/**/*.{html,ts}',
6-
]
7-
},
8-
darkMode: 'class',
9-
theme: {
10-
extend: {
11-
screens: {
12-
sm: '640px',
13-
md: '768px',
14-
lg: '1024px',
15-
xl: '1280px',
16-
'2xl': '1536px',
17-
},
18-
fontFamily: {
19-
sans: [
20-
'Poppins'
21-
],
22-
},
23-
fontSize: {
24-
xs: ['0.75rem', { lineHeight: '1rem' }],
25-
sm: ['0.875rem', { lineHeight: '1.25rem' }],
26-
base: ['1rem', { lineHeight: '1.5rem' }],
27-
lg: ['1.125rem', { lineHeight: '1.75rem' }],
28-
xl: ['1.25rem', { lineHeight: '1.75rem' }],
29-
'2xl': ['1.5rem', { lineHeight: '2rem' }],
30-
},
31-
fontWeight: {
32-
regular: '400',
33-
medium: '500',
34-
semibold: '600',
35-
},
36-
colors: {
37-
info: {
38-
light: "#20CDD3",
39-
DEFAULT: "#30BCED",
40-
dark: "#3D57D9",
41-
},
42-
warn: {
43-
light: "#E87002",
44-
DEFAULT: "#FF5E0A",
45-
dark: "#E53402",
46-
},
47-
danger: {
48-
light: "#E5524C",
49-
DEFAULT: "#FF3948",
50-
dark: "#E83C27",
51-
},
52-
success: {
53-
light: "#31E080",
54-
DEFAULT: "#2ED47A",
55-
dark: "#25A860",
56-
},
57-
purple: {
58-
light: "#8C0E9E",
59-
DEFAULT: "#861388",
60-
dark: "#5E1973",
61-
},
62-
black: {
63-
light: "#FFFFFF",
64-
DEFAULT: "#192A3E",
65-
dark: "#161429",
66-
},
67-
grey: {
68-
light: "#C2CFE0",
69-
DEFAULT: "#90A0B7",
70-
dark: "#334D6E",
71-
},
72-
},
73-
width: (theme) => ({
74-
auto: 'auto',
75-
...theme('spacing'),
76-
'1/2': '50%',
77-
'1/3': '33.333333%',
78-
'2/3': '66.666667%',
79-
'1/5': '20%',
80-
'2/5': '40%',
81-
'3/5': '60%',
82-
'4/5': '80%',
83-
full: '100%',
84-
screen: '100vw',
85-
min: 'min-content',
86-
max: 'max-content',
87-
}),
2+
prefix: '',
3+
purge: {
4+
content: ['./src/**/*.{html,ts}'],
5+
},
6+
darkMode: 'class',
7+
theme: {
8+
colors: {
9+
transparent: 'transparent',
10+
current: 'currentColor',
11+
white: '#FFFFFF',
12+
black: '#000000',
13+
primary: {
14+
light: '#59C9F0',
15+
DEFAULT: '#30BCED',
16+
dark: '#2183A5',
17+
},
18+
secondary: {
19+
light: '#FF7E3B',
20+
DEFAULT: '#FF5E0A',
21+
dark: '#B24107',
22+
},
23+
info: {
24+
light: '#44C7D0',
25+
DEFAULT: '#16BAC5',
26+
dark: '#0F8289',
27+
},
28+
error: {
29+
light: '#FF606C',
30+
DEFAULT: '#FF3948',
31+
dark: '#B22732',
32+
},
33+
success: {
34+
light: '#57DC94',
35+
DEFAULT: '#2ED47A',
36+
dark: '#209455',
37+
},
38+
warning: {
39+
light: '#FFC76B',
40+
DEFAULT: '#FFB946',
41+
dark: '#B28131',
42+
},
43+
gray: {
44+
lightest: '#F3F4F6',
45+
lighter: '#D6D6D7',
46+
light: '#6F6F6F',
47+
DEFAULT: '#4B4B4B',
48+
dark: '#323639',
49+
darker: '#282C2F',
50+
darkest: '#202124',
8851
},
8952
},
90-
variants: {
91-
extend: {},
53+
extend: {
54+
fontFamily: {
55+
poppins: ['Poppins', 'sans-serif'],
56+
},
9257
},
93-
plugins: [require('@tailwindcss/forms'),require('@tailwindcss/typography')],
58+
},
59+
variants: {
60+
extend: {},
61+
},
62+
plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],
9463
};

0 commit comments

Comments
 (0)