npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@bkbaalkrshna/switch-theme

v0.1.3

Published

Easily handle themes in your website

Downloads

1

Readme

switch-theme-js

Easily switch themes in your website

GitHub stars GitHub forks GitHub issues GitHub repo size Lines of code Contributor Covenant

Features

  • Themes switch without page reload
  • Many more features coming

Live demo

See live demo

Click on "Dark theme" refresh the page, you see the page is default now set to dark theme.

Contributing

You can find the contributing guidelines here

FAQs

These are the frequently asked questions:

1. What happens actually

This is a basic JS code, that stores the theme name in a cookie that stays for 10 days and adds the theme name to the class list of the body.

2. How to design a theme?

You need to know CSS for that.

  1. Think of a cool theme name
  2. To select the theme in CSS, use .theme_name where theme_name is your theme name
  3. To add a button for user to switch the theme, use the html a tag e.g. <a href="javascript:switchTheme('dark', 'white');">Dark theme</a>
  4. Add onload="getTheme();" to your body tag
  5. Add <script async defer src="https://cdn.jsdelivr.net/gh/PuneetGopinath/switch-theme-js@main/src/switch.js"></script> in the head tag.
  6. That's all, test it out in your website, or submit a bug report for us to Analyse it.

3. Example html file

The index.html file shows an example.

Supporters

👏 A big thank you goes to all the supporters of this project!

You prove that the switch-theme-js Action has some value for you!

Stargazers

Stargazers for @PuneetGopinath/switch-theme-js

Contributors

Thanks to all contributors again!

GitHub Contributors Image