Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
63dcbc7
style: TT-332 include Tailwind in global style file
JosueOb Sep 2, 2021
5a5f6f9
feat: TT-332 dark mode implementation
JosueOb Sep 3, 2021
b017fbd
style: TT-332 color palette
JosueOb Sep 6, 2021
2d648d7
test: TT-332 unit test on the dark mode component
JosueOb Sep 6, 2021
1e23038
fix: TT-216 add tabIndex attribute to materialDatePicker and to Date …
bytesantiago Sep 7, 2021
13fd98a
chore(release): 1.50.5 [skip ci]nn
semantic-release-bot Sep 7, 2021
c63a8a0
refactor: TT-332 application of Azure toggle function to display dark…
JosueOb Sep 8, 2021
8e1ec7e
style: TT-332 TW prefix added to the color palette
JosueOb Sep 8, 2021
181bc76
refactor: TT-332 changes in sidebar and dark mode components
JosueOb Sep 8, 2021
704ba0e
fix: TT-334 keep the sidebar item selected when the page is refreshed…
JosueOb Sep 9, 2021
0125ac6
chore(release): 1.50.6 [skip ci]nn
semantic-release-bot Sep 9, 2021
5ecda54
refactor: TT-332 changes to the button to change the page theme
JosueOb Sep 10, 2021
f6fd309
test: TT-332 unit test to check if the user has the dark-mode feature…
JosueOb Sep 11, 2021
ff1ded3
style: TT-332 include Tailwind in global style file
JosueOb Sep 2, 2021
419ff2b
feat: TT-332 dark mode implementation
JosueOb Sep 3, 2021
c4ac6f7
style: TT-332 color palette
JosueOb Sep 6, 2021
57f96d7
test: TT-332 unit test on the dark mode component
JosueOb Sep 6, 2021
1507382
refactor: TT-332 application of Azure toggle function to display dark…
JosueOb Sep 8, 2021
18997af
style: TT-332 TW prefix added to the color palette
JosueOb Sep 8, 2021
1ed1c33
refactor: TT-332 changes in sidebar and dark mode components
JosueOb Sep 8, 2021
b99fa46
refactor: TT-332 changes to the button to change the page theme
JosueOb Sep 10, 2021
1e2e392
test: TT-332 unit test to check if the user has the dark-mode feature…
JosueOb Sep 11, 2021
b8705dd
refactor: TT-332 changes in the unit test description of the dark mod…
JosueOb Sep 13, 2021
95d1ed3
refactor: TT-332 changes in the unit test description of the dark mod…
JosueOb Sep 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style: TT-332 color palette
  • Loading branch information
JosueOb committed Sep 13, 2021
commit c4ac6f768e2fad27fc8980d4301a85647d0b17a5
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<button
class="w-10 h-6 rounded-full bg-white flex items-center transition duration-300 focus:outline-none shadow"
class="w-10 h-6 rounded-full bg-gray-lightest flex items-center transition duration-300 focus:outline-none shadow"
(click)="changeToDarkOrLightTheme()"
>
<div
#themeToggle
class="w-7 h-7 relative rounded-full transition duration-500 transform bg-yellow-300 -translate-x-1 p-1"
class="w-7 h-7 relative rounded-full transition duration-500 transform bg-warning -translate-x-1 p-1"
>
<ng-container *ngIf="isDarkTheme(); else elseToggle">
<img src="assets/icons/moon.svg" alt="moon icon" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ export class DarkModeComponent implements AfterViewInit {
switchThemeToggleStyles(theme: string): void {
switch (theme) {
case 'dark':
this.themeToggle.nativeElement.classList.remove('bg-yellow-300', '-translate-x-1');
this.themeToggle.nativeElement.classList.add('bg-gray-300', 'translate-x-1/2');
this.themeToggle.nativeElement.classList.remove('bg-warning', '-translate-x-1');
this.themeToggle.nativeElement.classList.add('bg-gray-lighter', 'translate-x-1/2');
break;
case 'light':
this.themeToggle.nativeElement.classList.remove('bg-gray-300', 'translate-x-1/2');
this.themeToggle.nativeElement.classList.add('bg-yellow-300', '-translate-x-1');
this.themeToggle.nativeElement.classList.remove('bg-gray-lighter', 'translate-x-1/2');
this.themeToggle.nativeElement.classList.add('bg-warning', '-translate-x-1');
break;
}
}
Expand Down
14 changes: 7 additions & 7 deletions src/app/modules/shared/components/sidebar/sidebar.component.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<div class="d-flex dark:bg-gray" id="wrapper">
<div class="border-right dark:bg-grey-dark" id="sidebar-wrapper">
<div class="d-flex bg-gray-lighter dark:bg-gray-darker dark:text-white" id="wrapper">
<div class="border-right bg-gray-lightest dark:bg-gray-dark" id="sidebar-wrapper">
<div class="sidebar-heading" style="text-align: center">
<img src="assets/img/ioet.png" width="90" height="auto" style="padding-top: 2rem; padding-bottom: 2rem;" alt="logo" />
</div>
<div class="list-group list-group-flush">
<div class="list-group list-group-flush bg-gray-lightest dark:bg-gray-darker">
<a
*ngFor="let item of itemsSidebar"
[routerLink]="item.route"
routerLinkActive=""
class="list-group-item list-group-item-action dark:bg-grey-dark dark:text-white"
class="list-group-item list-group-item-action bg-gray-lightest dark:bg-gray-dark dark:text-white"
[ngClass]="{active: item.active}"
>
<i class="{{ item.icon }}"></i> {{ item.text }}
</a>
</div>
</div>
<div id="page-content-wrapper">
<nav class="navbar navbar-expand-lg navbar-light border-bottom">
<button class="btn btn-primary" id="menu-toggle">
<nav class="navbar navbar-expand-lg navbar-light border-bottom bg-gray-lightest dark:bg-gray-dark">
<button class="btn btn-primary bg-primary hover:bg-primary-light" id="menu-toggle">
Toggle Menu
</button>
<div class="dark-mode-toggle">
Expand All @@ -33,7 +33,7 @@
</div>
</nav>
<div class="container-fluid px-0 full-height">
<div class="content_app h-100">
<div class="content_app mx-10 my-10 rounded-md bg-gray-lightest dark:bg-gray-dark">
<router-outlet></router-outlet>
</div>
</div>
Expand Down
147 changes: 58 additions & 89 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,94 +1,63 @@
module.exports = {
prefix: '',
purge: {
content: [
'./src/**/*.{html,ts}',
]
},
darkMode: 'class',
theme: {
extend: {
screens: {
sm: '640px',
md: '768px',
lg: '1024px',
xl: '1280px',
'2xl': '1536px',
},
fontFamily: {
sans: [
'Poppins'
],
},
fontSize: {
xs: ['0.75rem', { lineHeight: '1rem' }],
sm: ['0.875rem', { lineHeight: '1.25rem' }],
base: ['1rem', { lineHeight: '1.5rem' }],
lg: ['1.125rem', { lineHeight: '1.75rem' }],
xl: ['1.25rem', { lineHeight: '1.75rem' }],
'2xl': ['1.5rem', { lineHeight: '2rem' }],
},
fontWeight: {
regular: '400',
medium: '500',
semibold: '600',
},
colors: {
info: {
light: "#20CDD3",
DEFAULT: "#30BCED",
dark: "#3D57D9",
},
warn: {
light: "#E87002",
DEFAULT: "#FF5E0A",
dark: "#E53402",
},
danger: {
light: "#E5524C",
DEFAULT: "#FF3948",
dark: "#E83C27",
},
success: {
light: "#31E080",
DEFAULT: "#2ED47A",
dark: "#25A860",
},
purple: {
light: "#8C0E9E",
DEFAULT: "#861388",
dark: "#5E1973",
},
black: {
light: "#FFFFFF",
DEFAULT: "#192A3E",
dark: "#161429",
},
grey: {
light: "#C2CFE0",
DEFAULT: "#90A0B7",
dark: "#334D6E",
},
},
width: (theme) => ({
auto: 'auto',
...theme('spacing'),
'1/2': '50%',
'1/3': '33.333333%',
'2/3': '66.666667%',
'1/5': '20%',
'2/5': '40%',
'3/5': '60%',
'4/5': '80%',
full: '100%',
screen: '100vw',
min: 'min-content',
max: 'max-content',
}),
prefix: '',
purge: {
content: ['./src/**/*.{html,ts}'],
},
darkMode: 'class',
theme: {
colors: {
transparent: 'transparent',
current: 'currentColor',
white: '#FFFFFF',
black: '#000000',
primary: {
light: '#59C9F0',
DEFAULT: '#30BCED',
dark: '#2183A5',
},
secondary: {
light: '#FF7E3B',
DEFAULT: '#FF5E0A',
dark: '#B24107',
},
info: {
light: '#44C7D0',
DEFAULT: '#16BAC5',
dark: '#0F8289',
},
error: {
light: '#FF606C',
DEFAULT: '#FF3948',
dark: '#B22732',
},
success: {
light: '#57DC94',
DEFAULT: '#2ED47A',
dark: '#209455',
},
warning: {
light: '#FFC76B',
DEFAULT: '#FFB946',
dark: '#B28131',
},
gray: {
lightest: '#F3F4F6',
lighter: '#D6D6D7',
light: '#6F6F6F',
DEFAULT: '#4B4B4B',
dark: '#323639',
darker: '#282C2F',
darkest: '#202124',
},
},
variants: {
extend: {},
extend: {
fontFamily: {
poppins: ['Poppins', 'sans-serif'],
},
},
plugins: [require('@tailwindcss/forms'),require('@tailwindcss/typography')],
},
variants: {
extend: {},
},
plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],
};