Merge commit
This commit is contained in:
commit
f2a70888e3
24 changed files with 989 additions and 654 deletions
|
|
@ -1,9 +1,20 @@
|
|||
import content from "$lib/data/content/competitive.html?raw"
|
||||
import {getCompetitiveExams} from "$lib/data/info"
|
||||
import type { PageServerLoad } from './$types'
|
||||
import type {CalendarEvent} from '$lib/components/CalendarEvent'
|
||||
export const load: PageServerLoad = async () => {
|
||||
const exams = await getCompetitiveExams()
|
||||
import type {Exam} from '$lib/components/Exam'
|
||||
|
||||
export const load: PageServerLoad = async ({fetch}) => {
|
||||
let content = ""
|
||||
let exams:Exam[] = []
|
||||
let res = await fetch("/api/content?page=competitive")
|
||||
if(res.ok){
|
||||
content = (await res.json()).content
|
||||
}
|
||||
|
||||
res = await fetch("/api/competitive")
|
||||
if(res.ok){
|
||||
exams = await res.json()
|
||||
}
|
||||
|
||||
const events:CalendarEvent[]=[]
|
||||
exams.forEach(({id,title,start})=>{
|
||||
const backgroundColor ="rgb(153 153 255 / 34%)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue