-
Notifications
You must be signed in to change notification settings - Fork 7
/
home.11ty.tsx
55 lines (47 loc) · 1.11 KB
/
home.11ty.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { h } from 'preact';
import { IPage, IData } from '../shared/model/page.model';
import style from './home.module.scss';
/* -----------------------------------
*
* IProps
*
* -------------------------------- */
interface IProps extends IData {
permalink: string;
}
/* -----------------------------------
*
* Components
*
* -------------------------------- */
import { Form } from '@/modules/home/components/form';
/* -----------------------------------
*
* Page
*
* -------------------------------- */
function Page(this: IPage, { siteMeta }: IProps) {
return (
<main class={style.content}>
<p class={style.text}>{siteMeta.pageTitle}</p>
<a href="/articles/first-post" class={style.link}>
Go to the First post
</a>
<Form title="Hydrated Form" className={style.form} />
</main>
);
}
/* -----------------------------------
*
* Export
*
* -------------------------------- */
module.exports = {
render: Page,
data: () => ({
layout: 'default.11ty.js',
cssPath: 'home/home.11ty.css',
jsPath: 'home/home.entry.js',
permalink: 'index.html',
}),
};