Skip to content

Commit 6c4790b

Browse files
πŸ“ Updated readme
1 parent 03f394e commit 6c4790b

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

β€ŽREADME.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
1-
# bootstrap-theme-switch
2-
πŸŒ™ Simple theme toggler for Bootstrap v5.3
1+
# πŸŒ™ Theme Switch script for Bootstrap v5.3
2+
3+
> <kbd align="center"><img height="256px" src="https://cdn.jsdelivr.net/gh/danielsebesta/bootstrap-theme-switch@main/example.gif"><br>
4+
> <p>See the script in action, animations and everything else can be customized, you just need a basic knowledge of JavaScript.</p></kbd>
5+
6+
## Installation πŸ”§
7+
1. Start by putting the latest Bootstrap on your site.
8+
9+
2. Then add my script to the site. It should come at the end of the body, behind the Bootstrap script.<br>
10+
11+
```html
12+
<script src="https://cdn.jsdelivr.net/gh/danielsebesta/bootstrap-theme-switch@main/theme-switch.min.js" integrity="sha384-eHEyolGs5+4+fpMEEcNsT22uT/gvfdbYi7ILP66pDf3JIDHcinTASicxy7BS9RFC" crossorigin="anonymous"></script>
13+
```
14+
15+
3. Now put this button somewhere in your code to make it work.
16+
```html
17+
<button id="theme-toggler" class="btn btn-secondary">🌞</button>
18+
```
19+
20+
4. You're done! Now enjoy a simple dark theme switch.
21+
22+
<br><br><br>
23+
I created this script because I was very confused by the Bootstrap docs and wanted to make something very simple and functional for others right out of the box. There is also a version written directly by the Bootstrap team, which you can find in the source code of their Example pages.

0 commit comments

Comments
Β (0)