Feat(UI): Light / dark mode themes and toggle utility added.
This commit is contained in:
18
index.html
18
index.html
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="en" data-theme="light" data-hash="home">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -16,7 +16,7 @@
|
||||
GitHub Contributions Calendar (light mode default)
|
||||
- Statistics under calendar do not work.
|
||||
-->
|
||||
<link rel="stylesheet" href="https://unpkg.com/github-calendar@latest/dist/github-calendar-responsive.css" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/github-calendar@latest/dist/github-calendar-responsive.css" />
|
||||
<!--
|
||||
GitHub Contributions Calendar (dark mode default)
|
||||
- Statistics under calendar do not work.
|
||||
@@ -38,6 +38,14 @@
|
||||
<li><a href="#experience">Experience</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
<li><div id="google_translate_element"></div></li>
|
||||
<li>
|
||||
<!-- <div id="theme-switch"></div> -->
|
||||
<button class="theme-switch" aria-label="Toggle Dark Mode">
|
||||
<img src="content/images/dark-mode-icon.webp" alt="Dark Mode" class="theme-icon dark-mode-icon">
|
||||
<!-- Added with JavaScript
|
||||
<img src="content/images/light-mode-icon.webp" alt="Light Mode" class="theme-icon light-mode-icon"> -->
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -248,12 +256,15 @@
|
||||
<script>
|
||||
// Basic implementation
|
||||
// e - statistics are all 0
|
||||
// GitHubCalendar(".github-calendar", "Teddy-1024");
|
||||
GitHubCalendar(".github-calendar", "Teddy-1024");
|
||||
|
||||
// Or with responsive option enabled:
|
||||
// e - statistics are all 0
|
||||
// GitHubCalendar(".github-calendar", "Teddy-1024", { responsive: true });
|
||||
|
||||
/*
|
||||
// Or with proxy option enabled:
|
||||
// e - statistics are all 0
|
||||
GitHubCalendar(".github-calendar", "Teddy-1024", {
|
||||
responsive: true,
|
||||
proxy: function(username) {
|
||||
@@ -261,6 +272,7 @@
|
||||
.then(response => response.text());
|
||||
}
|
||||
});
|
||||
*/
|
||||
</script>
|
||||
<!--
|
||||
GitHub Contributions Calendar (dark mode default)
|
||||
|
||||
Reference in New Issue
Block a user