in ,

ColinEspinas / darken, Hacker News

ColinEspinas / darken, Hacker News


                    

        

Codacy BadgeCodacy BadgeIssue BadgeIssue BadgeLicence BadgeIssue Badge

Licence Badge🌑Darkmode made easyDemo badge

**********************

Licence Badge************ (Getting Started) ************************

  • ************************** UsageLicence Badge************ BasicIssue Badge
  • **************************** (Options ****************
  • **************************** APICodacy Badge
  • ******************************** Contributing
  • ******************************** (License********************************
  • ********************************** (Contact
  • ************************************ Acknowledgment********************************Codacy Badge************

    Issue Badge (****************************************** ******************************

    Just use this snippet to include darken to your code:

    script

    (src) ************************************************=(********************************  (https://unpkg.com/darken) ********************************************

    ************************ (************************************************> (script) **************************************************
    (********************************************** const
    darkmode
    =
    (new)   (darken)  ();
    (************************************************ (script>

    (************************************************ () **********************

    Demo badgeUsing NPM

    Install darken with npm:Demo badge

    And import it in your code:

    (import) (darken) (from************ (******************************** (') ************************************************ (darken) ********************************************** ''; const
    darkmode
    =
    (new)   (darken)  ();  (**********************************

    ************************************************Usage(Basic) ********************************************

    Here is a basic usage of darken:Demo badge

    (********************************************** id=
    "
    darkmode-button” (**********************************src=
    "
    path / to / darken  (************************************************ (********************************> (script)
    (********************************************** const
    darkmode
    =
    (new)   (darken)  ({class:"darkmode-active"
    ,variables:{(**********************************************
    - primary-color"
    :  ["#000000","#fafafa"],(**********************************************
    - background-color"
    :  ["#fafafa","#000000"] },toggle:"# darkmode-button"(************************************************,
    });
    (************************************************ (script>

    You can either use a class and / or CSS variables to customize your styles.Demo badge

    **************************************************Options

    (const) (defaultOptions)={ container

    Issue Badge******************************

    (Type:) ****************************************************** (String) *********************************************************

    ****************************

    toggleIssue Badge

    (Type:) ****************************************************** (String) *********************************************************

    ********************************

    (Type:) ****************************************************** (String) *********************************************************

    **************************

    ****************************

    variables

    The Keys of the object are the variables names, the value are arrays where the 1th index is the value the variable will take in lightmode and the 2nd index the value the variable will take in darkmode.Demo badge

    (variables) :
    {  (**********************************************
    - name-of-the-variable” (********************************** (********************************:  ["lightmode value","darkmode value"],  (**********************************************
    - background-color"
    :  ["white","black"], }

    ************************************************************Issue Badge**************************API

    The (darken) ******************************************************** (class is the entry point to the library.)

    (const) (darkmode)=(******************************** (new) ************************************************ (darken) ************************************************ (options); (************************************************ (************************************************************************************************Issue Badge**********************toggle ()

    (Return:) ******************************************************* (none) ********************************************************

    ************************Issue Badgeon ()

    (Return:) ******************************************************* (none) ********************************************************

    Contributing

    Any help and contribution is always welcome, feel free to submit issues and / or contribute to the project.Fork the Project

  • Create your Feature or Fix Branch (Codacy Badge************************************************ git checkout -b feature / feature-name (or) ********************************************************** git checkout -b fix / fix-name)
  • Commit your ChangesIssue Badge************************************** git commit - m 'Add some feature or fix'
  • Push to the Branch (
  • ************************************ git push origin feature / feature-name or git push origin fix / fix-name

  • Open a Pull Request******************Licence Badge**************************************************

    darken is distributed under the MIT License. See (LICENSE) ********************************************************** for more information.Demo badge

    ********************************************************************Licence BadgeContact

    Colin Espinas - Website- ([email protected])Licence Badge

    Project link:https://github.com/ ColinEspinas / darkenIssue Badge

    Issue BadgeLicence Badge************ (microbundler)
  • Codacy Badge********************************************************************    (********************************************************************************Read MoreCodacy Badge************************************************************************