Files
njump/wiki_event.templ

47 lines
1.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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,
) {
@wikiInnerBlock(params)
}
} else {
@eventPageTemplate(
"Wiki - "+params.WikiEvent.Title,
params.OpenGraphParams,
params.HeadParams,
params.Clients,
params.Details,
params.Event,
) {
@wikiInnerBlock(params)
}
}
}