How To Add Dark-mode To Your Website

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • In this video you will learn how to add a Dark-mode toggle button to your website or web-app in just minutes using Darkmode.js
    Get Darkmode.js: darkmodejs.lea...
    Learn more about "mix-blend-mode": developer.mozi...

Комментарии • 117

  • @samueltadesse
    @samueltadesse 2 года назад

    Wow cool, I’ve an exam on 29th, to develop a website, which it requires Dark-Mode. Perfect on time. Tanx

  • @studywithlakshsurana
    @studywithlakshsurana 4 года назад +1

    it worked !!
    i was searching for hours and i got this
    this is amazing

    • @ieatwebsites
      @ieatwebsites  4 года назад

      I’m glad it finally worked for you! 😁

  • @gilbertardila
    @gilbertardila 2 года назад +1

    Thanks, that is amazing how easy you can change a page into dark mode.

  • @GolDVYT
    @GolDVYT 4 года назад +3

    Everytime i seach yuotube it automatically takes me to ur video, ive had it like this for +1 year and ur just getting free views :)

    • @ieatwebsites
      @ieatwebsites  4 года назад

      That’s crazy. Why is taking you there automatically?

    • @cope5223
      @cope5223 3 года назад +1

      @@ieatwebsites I think it is saved to his browser by bookmark or it's just saved lol
      Btw great video! Subbed

    • @ieatwebsites
      @ieatwebsites  3 года назад

      That makes sense. Thank you! 😄

  • @OmidElmiVlog
    @OmidElmiVlog 4 года назад +3

    I used the plugin of that on my WordPress website but everything changed invert even images.

    • @jonastangen4601
      @jonastangen4601 4 года назад +3

      Add isolation: isolate; in css on the assets you want to be ignored by the darkmode.

  • @Thepssaini
    @Thepssaini 4 года назад +2

    How to add in wordpress site without any plugin.

  • @majdsami9325
    @majdsami9325 Год назад

    I want a specific CSS design to be displayed , how i can do it ?

  • @opsdelayed1038
    @opsdelayed1038 2 года назад +1

    thanks so much, did not know its THAT easy wow

  • @chome4
    @chome4 4 года назад +1

    How do you target headings? I have h1 set to grey and it stays grey when I want it to go to white. It works simple for the example website but not as easy when incorporated into an existing site. I've tried adding 'textColor' to the javascript file but no change.

    • @ieatwebsites
      @ieatwebsites  4 года назад +1

      Take a look at the documentation: darkmodejs.learn.uno/#override-style

  • @mamunsikder6367
    @mamunsikder6367 3 года назад +1

    love from Bangladesh

  • @utkarshsingh2868
    @utkarshsingh2868 3 года назад

    when i add this icon to my HTML page the icon shows on website but when clicking that button nothing changes on my website it dosen't show any change to my website. Can you help me asap??

  • @RyanLBuchanan
    @RyanLBuchanan 3 года назад +2

    You are the coolest! Thanks so much!

  • @oliverturp8667
    @oliverturp8667 3 года назад +2

    Is there an easy way to use this method but have the widget fixed in a footer rather than floating always on the page?

    • @ieatwebsites
      @ieatwebsites  3 года назад +1

      Yep. You can add your own CSS code and do whatever you want.

  • @ayomideadeniji3399
    @ayomideadeniji3399 2 года назад

    I'm having trouble linking the pages it is not reflecting on the website please 🥺 help

  • @prithwihegde349
    @prithwihegde349 Год назад

    How to change images after dark mode applied?

  • @Taboollc
    @Taboollc 4 года назад +1

    Problem is .. i dont want the option to switch ... i want dark mode as default on all site pages !! How ?

    • @tworivertown7497
      @tworivertown7497 4 года назад

      Just make it as dark mode as default when you start to build it initially...

  • @RsSonal
    @RsSonal 2 года назад

    It worked awesome!!!!
    But even after changing that right to left setting the label wasn't set to left, it must be some small change. Please help me if any clue....
    otherwise worked very well in my aspx page

  • @sumbalamjad5861
    @sumbalamjad5861 4 года назад +2

    Thank you! Its cool!

  • @ajazzy8078
    @ajazzy8078 3 года назад

    i think it just inverted the color of the website. so how to stop inverted the images in the website.

    • @ieatwebsites
      @ieatwebsites  3 года назад

      Take a look at the documentation, you can add specific classes to elements that you don’t want to change.

  • @abubakarsaifullahwahla939
    @abubakarsaifullahwahla939 3 года назад

    my fonts and heading colors are not changing. in normal mode i colored them black so they are showing black in dark mode too. any help ?

    • @ieatwebsites
      @ieatwebsites  3 года назад

      You can add specific css classes for that. Take a look at the documentation.

    • @abubakarsaifullahwahla939
      @abubakarsaifullahwahla939 3 года назад

      @@ieatwebsites ok let me try then i will update u in few minutes.

  • @seenivasan6398
    @seenivasan6398 Год назад +1

    Super bro

  • @zubaidahnafisa2423
    @zubaidahnafisa2423 3 года назад +1

    thank u so much..ur saved me!

  • @midnightrainbow6299
    @midnightrainbow6299 3 года назад +1

    What's the easiest way to do this for every single page if you have quite a lot of them?

    • @ieatwebsites
      @ieatwebsites  3 года назад

      Are you using a CMS?

    • @midnightrainbow6299
      @midnightrainbow6299 3 года назад

      @@ieatwebsites I'm not sure what codes are being used. It works on just the home page but not the rest of them. Is there away I can contact you and show you the website?

  • @PankajSharma-hx8pu
    @PankajSharma-hx8pu 4 года назад

    What about licence ? is it under MIT licence ?

  • @dzikriasmawi2995
    @dzikriasmawi2995 3 года назад

    hi... how to add this script in joomla backend?i want to change my backend joomla template into dark mode...

    • @ieatwebsites
      @ieatwebsites  3 года назад

      I don’t have experience with joomla. Sorry!

  • @sunnymoon5262
    @sunnymoon5262 3 года назад

    How do i create a custom toogle button using this?

    • @ieatwebsites
      @ieatwebsites  3 года назад

      Create your own button and trigger the function on click. There must be information about this in the documentation.

  • @lillianluzinsky7820
    @lillianluzinsky7820 5 лет назад +1

    Are you able to change with image with the dark mode?

    • @larazegers797
      @larazegers797 4 года назад

      Lillian Luzinsky I’d suggest using a viewport to achieve this! :)

    • @PapaBear_Gaming
      @PapaBear_Gaming 4 года назад

      If you're asking about changing how the image appears in dark/light mode you should check out the 'brightness' feature in css.

  • @limonahmed3619
    @limonahmed3619 Год назад

    my icon isn't working :(

  • @The_totoro11
    @The_totoro11 3 года назад +1

    thank u

  • @probaemail3636
    @probaemail3636 4 года назад +1

    Oh, Thanks man!

  • @GolDVYT
    @GolDVYT 4 года назад

    On my page, my icon doesnt show up, I did everything as u did, any clue?

    • @ieatwebsites
      @ieatwebsites  4 года назад

      Is possible that your CSS is hiding it.

    • @GolDVYT
      @GolDVYT 4 года назад

      @@ieatwebsites ohhh I seeee

    • @Testicx
      @Testicx 3 года назад

      @@ieatwebsites How do you stop it from hiding it in CSS?

  • @alixeyoung7552
    @alixeyoung7552 5 лет назад +1

    Thank you so much
    is work awesome in my tow website

    • @ieatwebsites
      @ieatwebsites  5 лет назад

      You welcome!

    • @motoo_vlogs
      @motoo_vlogs 4 года назад

      Bhai meri bhi help kr de thoda easy way mai bta dee

  • @sumitmathur8596
    @sumitmathur8596 3 года назад +1

    It's an amazing man!

  • @mr.mikaeel6264
    @mr.mikaeel6264 4 года назад

    Sry noobquestion, let's say your article is responsive and loads in another html does this page automatically take the settings if you add that first line of code or do you need to link it in some other way?

    • @ieatwebsites
      @ieatwebsites  4 года назад

      Make sure the darkmode file is in that page too and it will take the settings.

    • @guyj5030
      @guyj5030 2 года назад

      I have the same problem , did u manage to fix it?

    • @mr.mikaeel6264
      @mr.mikaeel6264 2 года назад

      You can add it to every page you need i guess or run a script that links everything. Try any basics of a framework explanation and you'll probably come across a way to do that. Sorry i can not be more specific because it was 2 years ago so i dont remember the exact problem anymore.

    • @guyj5030
      @guyj5030 2 года назад

      @@mr.mikaeel6264 you are such a king for replaying man!! thanks! :)

    • @mr.mikaeel6264
      @mr.mikaeel6264 2 года назад

      @@guyj5030 np man, hope u fix it. good luck & have fun!

  • @mihirsomaiya7266
    @mihirsomaiya7266 4 года назад

    in my page label is not show, and I want to change label , anyone help me !!

    •  4 года назад

      Hey man! If you still want help with it, could you send on the code, so I can have a look at it?

  • @jojoyoustudio
    @jojoyoustudio 4 года назад

    Can you help me please? It isn't changing my text color.

    • @PritishMishra
      @PritishMishra 4 года назад

      SAME HERE, do you get any solution

    • @OmidElmiVlog
      @OmidElmiVlog 4 года назад

      ​@@PritishMishra I think with inline CSS doesn't work

    • @PritishMishra
      @PritishMishra 4 года назад +1

      @@OmidElmiVlog 🤔🤔 Okay Thanks bro... Will try !

  • @turquoise3060
    @turquoise3060 4 года назад

    when i re-open my website, this is giving error {
    ×
    ReferenceError: Darkmode is not defined
    ./pages/comp.js
    ./pages/comp.js:15
    12 | autoMatchOsTheme: true // default: true
    13 | }
    14 |
    > 15 | const darkmode = new Darkmode(options);
    | ^ 16 | darkmode.showWidget();
    }

  • @harshsinghal3857
    @harshsinghal3857 4 года назад +2

    Too good...

  • @muhammadjamil8108
    @muhammadjamil8108 4 года назад

    How to add in wordpress site without any plugin. Thnaks before.

  • @Z.Sk11
    @Z.Sk11 3 года назад +1

    Best

  • @closertube4482
    @closertube4482 3 года назад

    but how can I make it work for the whole pages of my site using single click

    • @ieatwebsites
      @ieatwebsites  3 года назад +1

      There’s an option to save a cookie. Is in the documentation.

    • @closertube4482
      @closertube4482 3 года назад

      @@ieatwebsites which documentation my bro

    • @ieatwebsites
      @ieatwebsites  3 года назад

      darkmodejs.learn.uno/

    • @closertube4482
      @closertube4482 3 года назад

      @@ieatwebsites it works only for a single page i.e where the code and library is added, so i'm saying how to apply this feature (dark mode) to all pages of my website

    • @ieatwebsites
      @ieatwebsites  3 года назад

      Make sure the js code loads on every page.

  • @talkgram_official
    @talkgram_official 3 года назад

    Thanks dude

  • @enes222
    @enes222 4 года назад +1

    thanks

  • @shanoormohammed4709
    @shanoormohammed4709 4 года назад

    It works to my web site..What about licence? is it free to use????

    • @ieatwebsites
      @ieatwebsites  4 года назад +1

      Make sure you go to their website and read about the license.

    • @shanoormohammed4709
      @shanoormohammed4709 4 года назад

      @@ieatwebsites Sure i will read the license.Can you please explain me what is : '🌓', ? how to change label to other symbol or emoji?

    • @gamercumcoder2496
      @gamercumcoder2496 3 года назад

      @@shanoormohammed4709 that's a moon's emoji, press win + .(period) key and search for moon's emoji.

  • @pratyaybanerjee8574
    @pratyaybanerjee8574 4 года назад

    Not a responsive one! The toggle button becomes inactive for mobile pages!

    • @v4niko
      @v4niko 4 года назад

      Yeas i have sam issues

  • @GolDVYT
    @GolDVYT 4 года назад

    How do you change the size of the button?

    • @ieatwebsites
      @ieatwebsites  4 года назад

      With CSS

    • @GolDVYT
      @GolDVYT 4 года назад

      @@ieatwebsites can you please explain how? I just want the image to appear bigger. Thanks

    • @Shhmon
      @Shhmon 4 года назад +1

      @@GolDVYT Im no pro, but I assume you just give the image a class/id, and change the width/height dimensions, some more things may need to be adjusted such as border-radius etc.
      So if you give the image a class and use the class like this:
      .btn-darkmode {
      width: 50px;
      height: 50px;
      border-radius: ?;
      }
      however if you are looking for a responsive button you may need to use % dimensions or vw dimensions (viewport).

  • @priyanshusharma6250
    @priyanshusharma6250 3 года назад

    How does it not affect the images?

    • @ieatwebsites
      @ieatwebsites  3 года назад

      You can use specific classes to not affect specific elements.

  • @vishalmirajkar.4017
    @vishalmirajkar.4017 3 года назад

    my blog proper be not work, I just solution me resoloved you

  • @nini-ic7is
    @nini-ic7is 3 года назад +1

    beautiful

  • @yoifmilk
    @yoifmilk 4 года назад

    idk how to code or anything so can someone just paste the script i need for a html dark mode toggle

  • @rangabharath4253
    @rangabharath4253 4 года назад

    awesome

  • @Hissecretobsession1
    @Hissecretobsession1 4 года назад

    Is this possible with shopify?!!

  • @RIGARR
    @RIGARR 4 года назад

    what... name is J...

  • @richasinha5599
    @richasinha5599 4 года назад

    Please check Browseric youtube channel..