Add mock data for sub pages

This commit is contained in:
schooltechx 2023-04-05 19:35:08 +07:00
parent 18382d7429
commit 320d11723f
16 changed files with 107 additions and 87 deletions

View file

@ -1,10 +1,9 @@
import type { PageServerLoad } from './$types'
import { error } from '@sveltejs/kit'
import {getQualifyExams} from "$lib/data/info"
import exams from "$lib/data/qualify-exam.json"
export const load: PageServerLoad = async ({params}) => {
const id = params.id+""
const exams = await getQualifyExams()
const post = exams.find((q)=>{
return q.id===id
})

View file

@ -1,15 +1,44 @@
<script lang="ts">
import ver from "$lib/ver.json"
import type { PageData } from './$types'
export let data: PageData;
</script>
<section class="items-start h-screen flex max-h-1000-px pt-12 bg-blueGray-100">
<div class="container mx-auto items-start flex flex-wrap px-4">
<h2 class="font-semibold text-2xl text-blueGray-600 mb-4">
การสอบคัดเลือก {data.id}
</h2>
<section>
<div class="p-one parallax-inner">
<h2>การสอบคัดเลือก</h2>
</div>
</section>
<section class="pb-40 relative bg-blueGray-100">
<div class="container mx-auto justify-center flex flex-wrap">
<div class=" bg-blueGray-100 -mt-6 px-5 top-0 bottom-auto absolute z-40 rounded-md" >
<div class="text-sm breadcrumbs">
<ul>
<li class="text-pink-500 hover:text-pink-700 ">
<a href="/" >
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" /></svg>
</a>
</li>
<li>
<span class="breadTaxt">{data.title}</span>
</li>
</ul>
</div>
</div>
</div>
<div class="container mx-auto items-start flex flex-wrap px-4 pt-11">
<div class="card bg-white shadow-xl w-full p-8">
<div>
{@html data.detail}
</div>
<div></div>
{#if data.docUrl}
<div><a href={data.docUrl} >เอกสาร</a></div>
{/if}
</div>
</div>
</section>