Skip to content

Commit

Permalink
darkmode works
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishim12 committed Dec 26, 2024
1 parent 1a7f79e commit dd5b961
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
17 changes: 0 additions & 17 deletions ubyssey/static_src/src/images/darkmode.svg

This file was deleted.

19 changes: 17 additions & 2 deletions ubyssey/static_src/src/js/components/Events/calendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
// import ReactDOM from 'react-dom';
import Throbber from '../../../images/throbber.svg';
import axios from 'axios';
import DarkmodeToggle from '../../../images/darkmode.svg';

const BP_DESKTOP_SIZE = 1199;

Expand Down Expand Up @@ -247,7 +246,23 @@ export function QueryEventsCalendar() {
aria-label="auto"
aria-live="polite"
>
<DarkmodeToggle />
<svg class="sun-and-moon" aria-hidden="true" width="1.75em" height="1.75em" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask{{id}}">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask{{id}})" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</div>
<h1 class="title">Events around campus</h1>
Expand Down

0 comments on commit dd5b961

Please sign in to comment.