-
Notifications
You must be signed in to change notification settings - Fork 27
/
pages.go
74 lines (63 loc) · 1.41 KB
/
pages.go
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//go:generate npm install tailwindcss
//go:generate npx tailwind -i node_modules/tailwindcss/tailwind.css -o tailwind-bundle.min.css --minify
//go:generate go run -mod=mod github.com/a-h/templ/cmd/templ@latest generate
package main
import (
_ "embed"
"html/template"
"github.com/a-h/templ"
"github.com/nbd-wtf/go-nostr/sdk"
)
type TemplateID int
const (
Note TemplateID = iota
Profile
LongForm
TelegramInstantView
FileMetadata
LiveEvent
LiveEventMessage
CalendarEvent
WikiEvent
Other
)
type OpenGraphParams struct {
SingleTitle string
// x (we will always render just the singletitle if we have that)
Superscript string
Subscript string
BigImage string
// x (we will always render just the bigimage if we have that)
Video string
VideoType string
Image string
ProxiedImage string
// this is the main text we should always have
Text string
}
type DetailsParams struct {
HideDetails bool
CreatedAt string
EventJSON template.HTML
Metadata sdk.ProfileMetadata
Nevent string
Nprofile string
SeenOn []string
Kind int
KindNIP string
KindDescription string
Extra templ.Component
}
type HeadParams struct {
IsHome bool
IsAbout bool
IsProfile bool
NaddrNaked string
NeventNaked string
Oembed string
}
type BaseEventPageParams struct {
Event EnhancedEvent
Style Style
Alt string
}