Skip to content
yahia elbnna edited this page Feb 9, 2024 · 1 revision

GMODE

What is Gmode?

Gmode is a Javascript library that works to make your website have dark & light modes. That’s the main purpose, but that doesn’t mean it’s just make your website black or white. You can make your own colors and style. To make the meaning clear, we can say it gives your website 2 themes that you have designed yourself with CSS, and GMODE works to enable each theme when the user chooses to toggle between them.

How Gmode works?

Gmode takes from you as a programmer some data like [The element the user will click to toggle between the themes, Light mode data set, Dark mode data set,…ETC] and then it’s starting to do 2 actions:

  1. When the website loads, Gmode will check if the user chose a theme on the last visit to the website and return this theme automatically.
  2. When the user clicks on the element that the developer set previously, Gmode will start to set up the theme with the set of data the programmer set previously.

How to use Gmode.

Clone this wiki locally