Skip to content
This repository was archived by the owner on Nov 25, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions dark.css

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
rel="stylesheet"
href="https://unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.css"
/>
<link
type="text/css"
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
/>
<link
type="text/css"
rel="stylesheet"
href="light.css"
id="theme"
/>

<!-- Load polyfills to support older browsers -->
<script src="https://polyfill.io/v3/polyfill.min.js?features=es2015%2CIntersectionObserver"></script>
Expand All @@ -34,12 +45,15 @@
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script src="date.format.js"></script>

<script async type='text/javascript' src='script.js'></script>

<title>Leetcode Ranking</title>
</head>
<body>
<div id="app" class="px-5 py-3">
<b-navbar toggleable="lg" type="dark" variant="info" class="mb-2">
<b-navbar-brand href="#">Leetcode contest ranking searcher</b-navbar-brand>
<button type="button" class="btn btn-secondary"><i class="fas fa-moon" id="switch"> Change theme</i></button>
</b-navbar>
<a class="github-button" href="https://github.com/chiehmin" data-size="large" data-show-count="true" aria-label="Follow @chiehmin on GitHub">Follow @chiehmin</a>
<a class="github-button" href="https://github.com/chiehmin/leetcode-ranking-search" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star chiehmin/leetcode-ranking-search on GitHub">Star</a>
Expand Down
Empty file added light.css
Empty file.
7 changes: 7 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
document.getElementById('switch').onclick = function () {
if (document.getElementById('theme').href.includes("dark.css")) {
document.getElementById('theme').href = "light.css";
} else {
document.getElementById('theme').href = "dark.css";
}
};