-
Notifications
You must be signed in to change notification settings - Fork 24
/
wiki_event.templ
47 lines (45 loc) · 1.04 KB
/
wiki_event.templ
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
package main
type WikiPageParams struct {
BaseEventPageParams
OpenGraphParams
HeadParams
Details DetailsParams
PublishedAt string
Content string
WikiEvent Kind30818Metadata
Clients []ClientReference
}
templ wikiInnerBlock(params WikiPageParams) {
<h1 class="flex text-2xl items-center">
<div class="inline-block px-2 mr-2 text-base bg-strongpink text-white rounded-md">Wiki <span class="text-base">></span></div>
<div class="inline-block">{ params.WikiEvent.Title }</div>
</h1>
<!-- main content -->
<div dir="auto" class="leading-5" itemprop="articleBody">
@templ.Raw(params.Content)
</div>
}
templ wikiEventTemplate(params WikiPageParams, isEmbed bool) {
<!DOCTYPE html>
if isEmbed {
@embeddedPageTemplate(
params.Event,
params.NeventNaked,
isEmbed,
) {
@wikiInnerBlock(params)
}
} else {
@eventPageTemplate(
"Wiki - "+params.WikiEvent.Title,
params.OpenGraphParams,
params.HeadParams,
params.Clients,
params.Details,
params.Event,
isEmbed,
) {
@wikiInnerBlock(params)
}
}
}