Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V10 #102

Draft
wants to merge 76 commits into
base: master
Choose a base branch
from
Draft

V10 #102

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
541a3b0
initial commit
insberr Nov 14, 2022
915410c
cool
insberr Nov 14, 2022
b031846
custom state library?? wow!!!!
webmsgr Nov 17, 2022
4d22f5f
fix
webmsgr Nov 17, 2022
3fcedf8
gitpody
webmsgr Nov 17, 2022
5321e2e
re add schedule script
webmsgr Nov 17, 2022
720606b
theme switchers and stuff
webmsgr Nov 17, 2022
d2323b7
gamer
webmsgr Nov 17, 2022
59e8df0
gamer
webmsgr Nov 17, 2022
0f7e627
remove schedule scripte
webmsgr Nov 17, 2022
1d8fc64
fix schedule script
webmsgr Nov 17, 2022
6ffe80c
copy the router over
webmsgr Nov 17, 2022
5e7b141
create some skelleton scs files
webmsgr Nov 17, 2022
22d2f0e
piss
webmsgr Nov 18, 2022
bc94b76
version
insberr Nov 18, 2022
3aa32f8
it works
webmsgr Nov 18, 2022
f24cd0b
eslint
webmsgr Nov 18, 2022
d551aa6
get autoupdating schedules working
webmsgr Nov 18, 2022
1146a4c
add note about using SCS
webmsgr Nov 18, 2022
7fdade4
fix type error
webmsgr Nov 18, 2022
c18d9de
add parcel core
webmsgr Nov 18, 2022
130af48
remove computed theme message
webmsgr Nov 18, 2022
e2c2a37
30 second fetch
webmsgr Nov 18, 2022
4d11eb8
add exec to preview
webmsgr Nov 18, 2022
0340159
work
webmsgr Nov 18, 2022
a972359
beta yarn is cringe
webmsgr Nov 18, 2022
97802af
work momnent
webmsgr Nov 19, 2022
11d151e
pushing
insberr Nov 20, 2022
9e3e774
added bottom nav bar but chores
insberr Nov 20, 2022
40d4324
done for the night. probably need to fix scs some
insberr Nov 21, 2022
98da61e
oof
insberr Nov 21, 2022
05f71de
started work on studentvue api rewrite sorta
insberr Nov 21, 2022
fcb1e57
updated icons and router
insberr Nov 26, 2022
94c494d
updated schedule script
insberr Nov 27, 2022
a317998
updated scs, its broken lol lol lol
insberr Nov 27, 2022
f776a91
Rust Backend, React frontend (#99)
webmsgr Dec 12, 2022
8f92926
add some vite plugins
webmsgr Dec 13, 2022
b87062d
pushing
insberr Dec 17, 2022
1203d54
i tried to fix vite itsn ot working so /shrug
insberr Dec 19, 2022
f792699
fixed lets go
insberr Dec 20, 2022
3f0d200
bay chada
insberr Dec 20, 2022
8c1a7f6
why am I even still woring on this code
insberr Dec 21, 2022
1e98de5
settings page no crash
insberr Dec 26, 2022
8c473c4
changes
insberr Dec 26, 2022
0b789af
Delete CFPAGES.yml
webmsgr Jan 11, 2023
39ff4e9
Switch to Svelte (#101)
webmsgr Jan 19, 2023
75b245d
mmm styling
webmsgr Jan 19, 2023
7c3aa24
stuff
webmsgr Jan 19, 2023
3e2e366
code and stuff
webmsgr Jan 19, 2023
e89ab7c
worknstuff
webmsgr Jan 20, 2023
843c268
better defaults and some transitions
webmsgr Jan 20, 2023
e77808c
add progress bar and countdown
webmsgr Jan 20, 2023
bdc99f3
move some stuff around
webmsgr Jan 20, 2023
1eb9cdb
schedule page???
webmsgr Jan 20, 2023
6c3e70c
bit better on the thingy
webmsgr Jan 20, 2023
af897ce
i hate mobile
webmsgr Jan 20, 2023
7e0231f
color
webmsgr Jan 21, 2023
24b0a36
gamef
webmsgr Jan 21, 2023
181168e
formatting
webmsgr Jan 22, 2023
c7120a2
staff list updator
webmsgr Jan 22, 2023
0ecc4e1
use title-case and also add some acronym uppercasing, thanks regex
webmsgr Jan 23, 2023
4f12bf9
begin work on lunches
webmsgr Jan 23, 2023
ae05907
terms, date, dropdown, and more!
webmsgr Jan 26, 2023
ec2f53d
fix cross term failing to work
webmsgr Jan 26, 2023
eadbc4b
stuff:tm:
webmsgr Jan 26, 2023
efc201e
lunches!!
webmsgr Jan 27, 2023
7eef53f
lunch detection
webmsgr Jan 27, 2023
ef5a858
lucnh
webmsgr Jan 27, 2023
9f8f8dc
Read comments.
insberr Jan 30, 2023
d2713c7
ical info, pls read
insberr Jan 30, 2023
3cb510c
add events, and ical loader
webmsgr Jan 31, 2023
960b821
remove roboto
webmsgr Feb 1, 2023
eebe2df
Create README.md
webmsgr Feb 1, 2023
7d7100c
Fixed a lot of style things
insberr Mar 23, 2023
9279ce8
Updated events sort of
insberr Mar 23, 2023
d1f947c
spelling mistakes are bad, sources say
webmsgr Mar 23, 2023
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
Prev Previous commit
Next Next commit
add progress bar and countdown
  • Loading branch information
webmsgr committed Jan 20, 2023
commit e77808cf41f0bf16630e5c37404a12d87f42c445
23 changes: 23 additions & 0 deletions src/lib/components/Countdown.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script type="ts">
import { formatDuration, intervalToDuration } from 'date-fns';
import { onMount } from 'svelte';

let now = new Date();
onMount(() => {
let x = setInterval(() => {
now = new Date();
}, 100);
return () => {
clearInterval(x);
};
});
export let destDate: Date;
$: message = formatDuration(
intervalToDuration({
start: now,
end: destDate,
})
);
</script>

<div>{message}</div>
37 changes: 37 additions & 0 deletions src/lib/components/DateBar.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<script type="ts">
import { onMount } from 'svelte';
import { tweened } from 'svelte/motion';

function mapBetween(currentNum: number, min: number, max: number): number {
let minAllowed = 0;
let maxAllowed = 100;
return (
((maxAllowed - minAllowed) * (currentNum - min)) / (max - min) +
minAllowed
);
}
export let destDate: Date;
export let startDate: Date;
let progress = tweened(0, { duration: 100 });
let now = new Date();
onMount(() => {
let x = setInterval(() => {
now = new Date();
}, 100);
return () => {
clearInterval(x);
};
});
$: progress.set(
mapBetween(now.getTime(), startDate.getTime(), destDate.getTime())
);
</script>

<div>
<span>{$progress.toFixed(2)}%</span>
<progress
class="progress progress-success w-1/2"
value={$progress}
max={100}
/>
</div>
32 changes: 20 additions & 12 deletions src/lib/components/ScheduleRow.svelte
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<script type="ts">
import type { DisplayCL } from '$types';
import autoAnimate from '@formkit/auto-animate';
import { endOfDecade, format, isAfter, parse } from 'date-fns';
import { format, isAfter, parse } from 'date-fns';
import { onMount } from 'svelte';
import { slide } from 'svelte/transition';
import Fa from 'svelte-fa';
import Countdown from './Countdown.svelte';
import {
faCircle,
faMinus,
faPlus,
faSun,
} from '@fortawesome/free-solid-svg-icons';
import DateBar from './DateBar.svelte';
let hide = true;
export let displayDate: Date;
export let cls: DisplayCL;
Expand Down Expand Up @@ -55,17 +57,23 @@
<div class="px-2" />
</div>
{#if !hide}
<div transition:slide|local class="bottom block">
{#if isNow}
<!-- During class -->
{cls.name} ends in 420 minutes, 69000 seconds
{:else if isAfter(currentDate, endTime)}
<!-- After Class -->
Class Ended
{:else}
<!-- Before Class -->
{cls.name} begins in 420 minutes, 69000 seconds
{/if}
<div transition:slide|local class="bottom flex flex-col">
<div>Details about class, grades, and other stuff here</div>
<div>
{#if isAfter(currentDate, endTime)}
Class Ended
{:else}
{cls.name}
{isNow ? 'ends' : 'begins'} in <Countdown
destDate={isNow ? endTime : startTime}
/>
{/if}
</div>
<div>
{#if isNow}
<DateBar startDate={startTime} destDate={endTime} />
{/if}
</div>
</div>
{/if}
</div>