+3
-1
.gitignore
+3
-1
.gitignore
+226
pages/auth_templ.go
+226
pages/auth_templ.go
···
1
+
// Code generated by templ - DO NOT EDIT.
2
+
3
+
// templ: version: v0.2.747
4
+
package pages
5
+
6
+
//lint:file-ignore SA4006 This context is only used if a nested component is present.
7
+
8
+
import "github.com/a-h/templ"
9
+
import templruntime "github.com/a-h/templ/runtime"
10
+
11
+
import "strings"
12
+
13
+
import "go.hacdias.com/indielib/indieauth"
14
+
15
+
func Auth(req *indieauth.AuthenticationRequest, app *indieauth.ApplicationMetadata) templ.Component {
16
+
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
17
+
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
18
+
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
19
+
if !templ_7745c5c3_IsBuffer {
20
+
defer func() {
21
+
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
22
+
if templ_7745c5c3_Err == nil {
23
+
templ_7745c5c3_Err = templ_7745c5c3_BufErr
24
+
}
25
+
}()
26
+
}
27
+
ctx = templ.InitializeContext(ctx)
28
+
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
29
+
if templ_7745c5c3_Var1 == nil {
30
+
templ_7745c5c3_Var1 = templ.NopComponent
31
+
}
32
+
ctx = templ.ClearChildren(ctx)
33
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html><head><title>Authorization | Micropub and IndieAuth Server Demo</title></head><body><h1>IndieAuth Server Demo: Authorization</h1><p>You received an authorization request from ")
34
+
if templ_7745c5c3_Err != nil {
35
+
return templ_7745c5c3_Err
36
+
}
37
+
if app != nil {
38
+
if len(app.Logo) > 0 {
39
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<img style=\"width: 1em; vertical-align: middle\" src=\"")
40
+
if templ_7745c5c3_Err != nil {
41
+
return templ_7745c5c3_Err
42
+
}
43
+
var templ_7745c5c3_Var2 string
44
+
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(app.Logo)
45
+
if templ_7745c5c3_Err != nil {
46
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/auth.templ`, Line: 21, Col: 72}
47
+
}
48
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
49
+
if templ_7745c5c3_Err != nil {
50
+
return templ_7745c5c3_Err
51
+
}
52
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
53
+
if templ_7745c5c3_Err != nil {
54
+
return templ_7745c5c3_Err
55
+
}
56
+
}
57
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <strong>")
58
+
if templ_7745c5c3_Err != nil {
59
+
return templ_7745c5c3_Err
60
+
}
61
+
var templ_7745c5c3_Var3 string
62
+
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(app.Name)
63
+
if templ_7745c5c3_Err != nil {
64
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/auth.templ`, Line: 24, Col: 26}
65
+
}
66
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
67
+
if templ_7745c5c3_Err != nil {
68
+
return templ_7745c5c3_Err
69
+
}
70
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</strong> by ")
71
+
if templ_7745c5c3_Err != nil {
72
+
return templ_7745c5c3_Err
73
+
}
74
+
var templ_7745c5c3_Var4 string
75
+
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(app.Author)
76
+
if templ_7745c5c3_Err != nil {
77
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/auth.templ`, Line: 24, Col: 53}
78
+
}
79
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
80
+
if templ_7745c5c3_Err != nil {
81
+
return templ_7745c5c3_Err
82
+
}
83
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(":")
84
+
if templ_7745c5c3_Err != nil {
85
+
return templ_7745c5c3_Err
86
+
}
87
+
} else {
88
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("the following client:")
89
+
if templ_7745c5c3_Err != nil {
90
+
return templ_7745c5c3_Err
91
+
}
92
+
}
93
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><ul><li><strong>Redirect:</strong> <code>")
94
+
if templ_7745c5c3_Err != nil {
95
+
return templ_7745c5c3_Err
96
+
}
97
+
var templ_7745c5c3_Var5 string
98
+
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(req.ClientID)
99
+
if templ_7745c5c3_Err != nil {
100
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/auth.templ`, Line: 31, Col: 57}
101
+
}
102
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
103
+
if templ_7745c5c3_Err != nil {
104
+
return templ_7745c5c3_Err
105
+
}
106
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</code></li><li><strong>Client:</strong> <code>")
107
+
if templ_7745c5c3_Err != nil {
108
+
return templ_7745c5c3_Err
109
+
}
110
+
var templ_7745c5c3_Var6 string
111
+
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(req.RedirectURI)
112
+
if templ_7745c5c3_Err != nil {
113
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/auth.templ`, Line: 32, Col: 58}
114
+
}
115
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
116
+
if templ_7745c5c3_Err != nil {
117
+
return templ_7745c5c3_Err
118
+
}
119
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</code></li></ul><p>For the following scopes: ")
120
+
if templ_7745c5c3_Err != nil {
121
+
return templ_7745c5c3_Err
122
+
}
123
+
for _, scope := range req.Scopes {
124
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<code>")
125
+
if templ_7745c5c3_Err != nil {
126
+
return templ_7745c5c3_Err
127
+
}
128
+
var templ_7745c5c3_Var7 string
129
+
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(scope)
130
+
if templ_7745c5c3_Err != nil {
131
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/auth.templ`, Line: 37, Col: 21}
132
+
}
133
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
134
+
if templ_7745c5c3_Err != nil {
135
+
return templ_7745c5c3_Err
136
+
}
137
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</code> ")
138
+
if templ_7745c5c3_Err != nil {
139
+
return templ_7745c5c3_Err
140
+
}
141
+
}
142
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(".</p><form method=\"post\" action=\"/authorization/accept\"><input type=\"hidden\" name=\"response_type\" value=\"code\"> <input type=\"hidden\" name=\"scope\" value=\"")
143
+
if templ_7745c5c3_Err != nil {
144
+
return templ_7745c5c3_Err
145
+
}
146
+
var templ_7745c5c3_Var8 string
147
+
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(req.Scopes, " "))
148
+
if templ_7745c5c3_Err != nil {
149
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/auth.templ`, Line: 43, Col: 77}
150
+
}
151
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
152
+
if templ_7745c5c3_Err != nil {
153
+
return templ_7745c5c3_Err
154
+
}
155
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"> <input type=\"hidden\" name=\"redirect_uri\" value=\"")
156
+
if templ_7745c5c3_Err != nil {
157
+
return templ_7745c5c3_Err
158
+
}
159
+
var templ_7745c5c3_Var9 string
160
+
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(req.RedirectURI)
161
+
if templ_7745c5c3_Err != nil {
162
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/auth.templ`, Line: 44, Col: 70}
163
+
}
164
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
165
+
if templ_7745c5c3_Err != nil {
166
+
return templ_7745c5c3_Err
167
+
}
168
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"> <input type=\"hidden\" name=\"client_id\" value=\"")
169
+
if templ_7745c5c3_Err != nil {
170
+
return templ_7745c5c3_Err
171
+
}
172
+
var templ_7745c5c3_Var10 string
173
+
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(req.ClientID)
174
+
if templ_7745c5c3_Err != nil {
175
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/auth.templ`, Line: 45, Col: 64}
176
+
}
177
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
178
+
if templ_7745c5c3_Err != nil {
179
+
return templ_7745c5c3_Err
180
+
}
181
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"> <input type=\"hidden\" name=\"state\" value=\"")
182
+
if templ_7745c5c3_Err != nil {
183
+
return templ_7745c5c3_Err
184
+
}
185
+
var templ_7745c5c3_Var11 string
186
+
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(req.State)
187
+
if templ_7745c5c3_Err != nil {
188
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/auth.templ`, Line: 46, Col: 57}
189
+
}
190
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
191
+
if templ_7745c5c3_Err != nil {
192
+
return templ_7745c5c3_Err
193
+
}
194
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"> <input type=\"hidden\" name=\"code_challenge\" value=\"")
195
+
if templ_7745c5c3_Err != nil {
196
+
return templ_7745c5c3_Err
197
+
}
198
+
var templ_7745c5c3_Var12 string
199
+
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(req.CodeChallenge)
200
+
if templ_7745c5c3_Err != nil {
201
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/auth.templ`, Line: 47, Col: 74}
202
+
}
203
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
204
+
if templ_7745c5c3_Err != nil {
205
+
return templ_7745c5c3_Err
206
+
}
207
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"> <input type=\"hidden\" name=\"code_challenge_method\" value=\"")
208
+
if templ_7745c5c3_Err != nil {
209
+
return templ_7745c5c3_Err
210
+
}
211
+
var templ_7745c5c3_Var13 string
212
+
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(req.CodeChallengeMethod)
213
+
if templ_7745c5c3_Err != nil {
214
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/auth.templ`, Line: 48, Col: 87}
215
+
}
216
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
217
+
if templ_7745c5c3_Err != nil {
218
+
return templ_7745c5c3_Err
219
+
}
220
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><p>In a production server, this page could be behind some sort of authentication mechanism, such as username and password, PassKey, etc.</p><button id=\"submit\">Authorize</button></form></body></html>")
221
+
if templ_7745c5c3_Err != nil {
222
+
return templ_7745c5c3_Err
223
+
}
224
+
return templ_7745c5c3_Err
225
+
})
226
+
}
+96
pages/home_templ.go
+96
pages/home_templ.go
···
1
+
// Code generated by templ - DO NOT EDIT.
2
+
3
+
// templ: version: v0.2.747
4
+
package pages
5
+
6
+
//lint:file-ignore SA4006 This context is only used if a nested component is present.
7
+
8
+
import "github.com/a-h/templ"
9
+
import templruntime "github.com/a-h/templ/runtime"
10
+
11
+
import "github.com/puregarlic/space/types"
12
+
import "fmt"
13
+
14
+
func Home(profileUrl string, posts []*types.Post) templ.Component {
15
+
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
16
+
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
17
+
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
18
+
if !templ_7745c5c3_IsBuffer {
19
+
defer func() {
20
+
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
21
+
if templ_7745c5c3_Err == nil {
22
+
templ_7745c5c3_Err = templ_7745c5c3_BufErr
23
+
}
24
+
}()
25
+
}
26
+
ctx = templ.InitializeContext(ctx)
27
+
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
28
+
if templ_7745c5c3_Var1 == nil {
29
+
templ_7745c5c3_Var1 = templ.NopComponent
30
+
}
31
+
ctx = templ.ClearChildren(ctx)
32
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html><head><title>Micropub and IndieAuth Server Demo</title><link rel=\"authorization_endpoint\" href=\"/authorization\"><link rel=\"token_endpoint\" href=\"/token\"><link rel=\"micropub\" href=\"/micropub\"></head><body><h1>Micropub and IndieAuth Server Demo</h1><p>Sign in on a website that supports IndieAuth. Use <code>")
33
+
if templ_7745c5c3_Err != nil {
34
+
return templ_7745c5c3_Err
35
+
}
36
+
var templ_7745c5c3_Var2 string
37
+
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(profileUrl)
38
+
if templ_7745c5c3_Err != nil {
39
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/home.templ`, Line: 20, Col: 77}
40
+
}
41
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
42
+
if templ_7745c5c3_Err != nil {
43
+
return templ_7745c5c3_Err
44
+
}
45
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</code> as your domain.</p><h2>Posts</h2><p>You can create posts using a Micropub client.</p><ul>")
46
+
if templ_7745c5c3_Err != nil {
47
+
return templ_7745c5c3_Err
48
+
}
49
+
for _, post := range posts {
50
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li><a href=\"")
51
+
if templ_7745c5c3_Err != nil {
52
+
return templ_7745c5c3_Err
53
+
}
54
+
var templ_7745c5c3_Var3 templ.SafeURL = templ.URL("/posts/" + post.ID)
55
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var3)))
56
+
if templ_7745c5c3_Err != nil {
57
+
return templ_7745c5c3_Err
58
+
}
59
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
60
+
if templ_7745c5c3_Err != nil {
61
+
return templ_7745c5c3_Err
62
+
}
63
+
var templ_7745c5c3_Var4 string
64
+
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(post.ID)
65
+
if templ_7745c5c3_Err != nil {
66
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/home.templ`, Line: 27, Col: 64}
67
+
}
68
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
69
+
if templ_7745c5c3_Err != nil {
70
+
return templ_7745c5c3_Err
71
+
}
72
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a> - ")
73
+
if templ_7745c5c3_Err != nil {
74
+
return templ_7745c5c3_Err
75
+
}
76
+
var templ_7745c5c3_Var5 string
77
+
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(post.Properties["content"]))
78
+
if templ_7745c5c3_Err != nil {
79
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/home.templ`, Line: 27, Col: 113}
80
+
}
81
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
82
+
if templ_7745c5c3_Err != nil {
83
+
return templ_7745c5c3_Err
84
+
}
85
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</li>")
86
+
if templ_7745c5c3_Err != nil {
87
+
return templ_7745c5c3_Err
88
+
}
89
+
}
90
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</ul></body></html>")
91
+
if templ_7745c5c3_Err != nil {
92
+
return templ_7745c5c3_Err
93
+
}
94
+
return templ_7745c5c3_Err
95
+
})
96
+
}
+131
pages/post_templ.go
+131
pages/post_templ.go
···
1
+
// Code generated by templ - DO NOT EDIT.
2
+
3
+
// templ: version: v0.2.747
4
+
package pages
5
+
6
+
//lint:file-ignore SA4006 This context is only used if a nested component is present.
7
+
8
+
import "github.com/a-h/templ"
9
+
import templruntime "github.com/a-h/templ/runtime"
10
+
11
+
import "github.com/puregarlic/space/types"
12
+
import "fmt"
13
+
import "encoding/json"
14
+
import "reflect"
15
+
16
+
func printProperty(post *types.Post, name string) string {
17
+
if val, ok := post.Properties[name]; ok {
18
+
tp := reflect.TypeOf(val)
19
+
switch tp.Kind() {
20
+
default:
21
+
return fmt.Sprint(val)
22
+
case reflect.Slice:
23
+
str := ""
24
+
for _, v := range val {
25
+
str = str + fmt.Sprint(v)
26
+
}
27
+
28
+
return str
29
+
}
30
+
31
+
}
32
+
33
+
return "<no name provided>"
34
+
}
35
+
36
+
func printPost(post *types.Post) string {
37
+
out, err := json.Marshal(post)
38
+
39
+
if err != nil {
40
+
panic(err)
41
+
}
42
+
43
+
return fmt.Sprint(string(out))
44
+
}
45
+
46
+
func Post(post *types.Post) templ.Component {
47
+
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
48
+
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
49
+
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
50
+
if !templ_7745c5c3_IsBuffer {
51
+
defer func() {
52
+
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
53
+
if templ_7745c5c3_Err == nil {
54
+
templ_7745c5c3_Err = templ_7745c5c3_BufErr
55
+
}
56
+
}()
57
+
}
58
+
ctx = templ.InitializeContext(ctx)
59
+
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
60
+
if templ_7745c5c3_Var1 == nil {
61
+
templ_7745c5c3_Var1 = templ.NopComponent
62
+
}
63
+
ctx = templ.ClearChildren(ctx)
64
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html><head><title>Post | Micropub and IndieAuth Server Demo</title></head><body>")
65
+
if templ_7745c5c3_Err != nil {
66
+
return templ_7745c5c3_Err
67
+
}
68
+
var templ_7745c5c3_Var2 = []any{post.Type}
69
+
templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var2...)
70
+
if templ_7745c5c3_Err != nil {
71
+
return templ_7745c5c3_Err
72
+
}
73
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"")
74
+
if templ_7745c5c3_Err != nil {
75
+
return templ_7745c5c3_Err
76
+
}
77
+
var templ_7745c5c3_Var3 string
78
+
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
79
+
if templ_7745c5c3_Err != nil {
80
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/post.templ`, Line: 1, Col: 0}
81
+
}
82
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
83
+
if templ_7745c5c3_Err != nil {
84
+
return templ_7745c5c3_Err
85
+
}
86
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><h1 class=\"p-name\">")
87
+
if templ_7745c5c3_Err != nil {
88
+
return templ_7745c5c3_Err
89
+
}
90
+
var templ_7745c5c3_Var4 string
91
+
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(printProperty(post, "name"))
92
+
if templ_7745c5c3_Err != nil {
93
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/post.templ`, Line: 46, Col: 56}
94
+
}
95
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
96
+
if templ_7745c5c3_Err != nil {
97
+
return templ_7745c5c3_Err
98
+
}
99
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1><p class=\"p-content\">")
100
+
if templ_7745c5c3_Err != nil {
101
+
return templ_7745c5c3_Err
102
+
}
103
+
var templ_7745c5c3_Var5 string
104
+
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(printProperty(post, "content"))
105
+
if templ_7745c5c3_Err != nil {
106
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/post.templ`, Line: 47, Col: 61}
107
+
}
108
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
109
+
if templ_7745c5c3_Err != nil {
110
+
return templ_7745c5c3_Err
111
+
}
112
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><h3>Stored Microformats</h3><code><pre>")
113
+
if templ_7745c5c3_Err != nil {
114
+
return templ_7745c5c3_Err
115
+
}
116
+
var templ_7745c5c3_Var6 string
117
+
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(printPost(post))
118
+
if templ_7745c5c3_Err != nil {
119
+
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pages/post.templ`, Line: 51, Col: 32}
120
+
}
121
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
122
+
if templ_7745c5c3_Err != nil {
123
+
return templ_7745c5c3_Err
124
+
}
125
+
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</pre></code></div></body></html>")
126
+
if templ_7745c5c3_Err != nil {
127
+
return templ_7745c5c3_Err
128
+
}
129
+
return templ_7745c5c3_Err
130
+
})
131
+
}