feat: add root and public layouts with config-driven theming
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { db } from '$lib/server/db';
|
||||
import { sponsors } from '$lib/server/schema';
|
||||
import { eq, asc } from 'drizzle-orm';
|
||||
import type { LayoutServerLoad } from './$types';
|
||||
|
||||
export const load: LayoutServerLoad = async ({ parent }) => {
|
||||
const parentData = await parent();
|
||||
|
||||
const allSponsors = await db
|
||||
.select()
|
||||
.from(sponsors)
|
||||
.where(eq(sponsors.active, true))
|
||||
.orderBy(asc(sponsors.sortOrder));
|
||||
|
||||
return { ...parentData, sponsors: allSponsors };
|
||||
};
|
||||
Reference in New Issue
Block a user