Responsive Admin Dashboard Using HTML CSS & JavaScript with Light & Dark Mode

Responsive Admin Dashboard Using HTML CSS & JavaScript with Light & Dark Mode

EGATOR

2 года назад

1,160,990 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Lucas Pedro
Lucas Pedro - 22.09.2023 20:26

The dashboard was very good, I'm going to use it in a service management system project that I'm developing, to contribute to the video code, I added the function that stores the last theme chosen by the user in the browser, this way when reloading the theme remains the same as the user chose. In the current code, the theme becomes clear every time the page reloads.

I separated the code responsible for the dark theme in another js and called it dark.js, so my current code looks like this:


const themeToggler = document.querySelector(".theme-toggler");
const darkThemeVariablesClass = 'dark-theme-variables';

// Verifique se já existe um tema salvo no localStorage
const savedTheme = localStorage.getItem('theme');
if (savedTheme) {
document.body.classList.add(savedTheme);
}

themeToggler.addEventListener('click', () => {
document.body.classList.toggle(darkThemeVariablesClass);

// Verifique se o tema atual é escuro e salve-o no localStorage
if (document.body.classList.contains(darkThemeVariablesClass)) {
localStorage.setItem('theme', darkThemeVariablesClass);
} else {
// Caso contrário, remova o tema do localStorage
localStorage.removeItem('theme');
}

themeToggler.querySelector('span:nth-child(1)').classList.toggle('active');
themeToggler.querySelector('span:nth-child(2)').classList.toggle('active');
});



One suggestion I intend to implement is to align the beginning of the logo with the menu icons, and align the center of the profile photo with the user's name

Ответить
Francis Omegas
Francis Omegas - 16.09.2023 13:39

this is best I can recommend for my up coming projects 😇😇😇😇😇😇☺☺☺☺☺

Ответить
DailyFindOut ស្វែងយល់ប្រចាំថ្ងៃ
DailyFindOut ស្វែងយល់ប្រចាំថ្ងៃ - 01.09.2023 20:06

Big thanks from Cambodia🥰

Ответить
Islamick Chat Bot
Islamick Chat Bot - 14.08.2023 11:12

Give me code on free

Ответить
Dream Earning
Dream Earning - 13.08.2023 18:36

source code give me

Ответить
CodeCampBase
CodeCampBase - 06.08.2023 12:53

People are buffled you dont need some shiny css framework to be able to design frontend :-)

Ответить
newentu
newentu - 03.08.2023 09:53

excelente tutorial, indio!!

Ответить
Alexander Mogren
Alexander Mogren - 02.08.2023 10:10

Awesome stuff. But whould be nice with the "active" changing when selecting in the sidebar. Now its static with the "Customer" always active. Also i found a bug in the responsive part. When changing the width to mobile size and toggle the menu and then drag the windowsize back to desktop the layout gets messed up. all the elements does not fall back into place. Maybe its becuse when you close the sidebar its get set to display none, and when changing size its still null so the grid gets messed up? So i just tested to set the display to nothing and now it works. So when hitting the close button it does display:''; instead of display:'none;

Ответить
Sowbharath Bharath
Sowbharath Bharath - 28.07.2023 16:12

please give code i want see and fix error

Ответить
TNTIX
TNTIX - 27.07.2023 21:11

good bro just change your vscode theme .

Ответить
PLAYUL
PLAYUL - 24.07.2023 09:40

Table for begginers:


//fill orders in table
Orders.forEach(order =>{
const tr = document.createElement('tr');
const trContent = `
<td>${order.productName}</td>
<td>${order.productNumber}</td>
<td>${order.paymentStatus}</td>
<td class="${order.shipping === 'Declined' ? 'danger' :
order.shipping === 'Pending' ? 'warning' :
'primary'}">${order.shipping}</td>
<td class="primary">Details</td>
`;
tr.innerHTML = trContent;
document.querySelector('table tbody').appendChild(tr);


})

Ответить
Temiloluwa Aina
Temiloluwa Aina - 21.07.2023 20:42

lovely video. learnt a lot of new things

Ответить
chinababa zhou
chinababa zhou - 09.07.2023 06:36

老外的教程简单明了 确实有可供借鉴之处。good

Ответить
Bn Yamine
Bn Yamine - 30.06.2023 02:55

How do I leave dark mode if it is activated on all pages ?

Ответить
Bn Yamine
Bn Yamine - 30.06.2023 02:11

can you give me please code sourse od css Because the link in the description is not working

Ответить
Leonel Chaparro
Leonel Chaparro - 28.06.2023 10:17

Bro can you do it using React?

Ответить
Mustapha Dadzie
Mustapha Dadzie - 26.06.2023 22:35

Super

Ответить
Aʙʜɪ Pᴀʀᴇᴛᴀ
Aʙʜɪ Pᴀʀᴇᴛᴀ - 23.06.2023 11:35

Where is the source code

Ответить
Chris Ashby
Chris Ashby - 17.06.2023 03:56

How do you make the active highlight for the sidebar nav items change when you click the different pages?

Ответить
Angela Milton
Angela Milton - 15.06.2023 09:01

This tutorial is great!!! Thanks for sharing

Ответить
everything funny
everything funny - 12.06.2023 16:53

I tried copying everything he did and the results is different

Ответить
everything funny
everything funny - 12.06.2023 16:52

All the code is wrong

Ответить
wispr
wispr - 08.06.2023 04:23

hey how would i add this to my main website?

Ответить
Vishnu Ravva
Vishnu Ravva - 06.06.2023 23:12

It really helped me build such a great UI and understood responsiveness concepts very well. Learnt something new. Looking forward to have such content in future too.

Ответить
𝑰𝑵𝑭𝑬𝑹𝑵𝑶
𝑰𝑵𝑭𝑬𝑹𝑵𝑶 - 02.06.2023 08:57

hello , i have an issue , is there anyway to contact you ? you can pick which ever platform you prefer , i just need help with the code,thanks

Ответить
Thaha
Thaha - 26.05.2023 09:28

thank you so much for the video.

Ответить
Geyser Storne
Geyser Storne - 25.05.2023 20:35

Thank you.

Ответить
Kenan Masrey
Kenan Masrey - 24.05.2023 18:52

how i can get the source code for this project?

Ответить
Olatunde Olukoya
Olatunde Olukoya - 20.05.2023 02:36

Beautiful beautiful beautiful 🎉. Thanks thanks thanks

Ответить
Franque
Franque - 11.05.2023 08:16

Great man, I love your this 👍.

Ответить
Feel The Beat🎶
Feel The Beat🎶 - 06.05.2023 19:04

this project was very useful for my first-year web project.❤❤ Thank you!!!!!

Ответить
Juan Pablo Then
Juan Pablo Then - 24.04.2023 05:20

Terminado y con algunas modificaciones es perfecto
gracias....

Ответить
Kwame Oware.
Kwame Oware. - 20.04.2023 21:51

get in touch there's something I would like us to work on asap. Thanks

Ответить
Samantha Oosterling
Samantha Oosterling - 18.04.2023 00:51

Please check email :)

Ответить
Eliakim Simões
Eliakim Simões - 17.04.2023 02:53

do You have repository this project?

Ответить
Eliakim Simões
Eliakim Simões - 16.04.2023 17:37

amazing!

Ответить
Vishal Yadav
Vishal Yadav - 03.04.2023 21:15

Appriciated

Ответить
Shadow Hunter NightBlade
Shadow Hunter NightBlade - 03.04.2023 06:09

Nice ❤

Ответить
Legit Tutorial
Legit Tutorial - 01.04.2023 18:55

This is the first seeing this method of writing css

Ответить
Pawel O
Pawel O - 27.03.2023 12:32

The guy is from Ghana! Respect!

Ответить
Michael Ekemode
Michael Ekemode - 26.03.2023 11:48

Hi new subscriber here and I wanted to ask how did you come to construct this, cause you had all the set values(color, font weight, and so on) down for this video but was the way you did it at first trial?

Ответить