diff --git a/calendar_event.templ b/calendar_event.templ index c76fc5a..1605642 100644 --- a/calendar_event.templ +++ b/calendar_event.templ @@ -13,9 +13,9 @@ func formatPartecipants(partecipants []nip52.Participant) string { for _, p := range partecipants { nreplace, _ := nip19.EncodePublicKey(p.PubKey) bytes := []byte(p.Role) - bytes[0] = byte(unicode.ToUpper(rune(bytes[0]))) - role := string(bytes) - nreplace = replaceNostrURLsWithHTMLTags(nostrNpubNprofileMatcher, "nostr:" + nreplace) + bytes[0] = byte(unicode.ToUpper(rune(bytes[0]))) + role := string(bytes) + nreplace = replaceNostrURLsWithHTMLTags(nostrNpubNprofileMatcher, "nostr:"+nreplace) if p.Role != "" { nreplace = nreplace + " as " + role } @@ -27,10 +27,9 @@ func formatPartecipants(partecipants []nip52.Participant) string { templ calendarEventTemplate(params CalendarPageParams) { @eventPageTemplate( - "Calendar Event: " + params.CalendarEvent.Title, + "Calendar Event: "+params.CalendarEvent.Title, params.OpenGraphParams, params.HeadParams, - params.Metadata, params.Clients, params.Details, params.Event, @@ -58,13 +57,13 @@ templ calendarEventTemplate(params CalendarPageParams) { if params.EndAtTime != "" { -
-
End date
-
-
{ params.EndAtDate }
-
{ params.EndAtTime } ({ params.TimeZone })
+
+
End date
+
+
{ params.EndAtDate }
+
{ params.EndAtTime } ({ params.TimeZone })
+
-
} } if params.CalendarEvent.Locations[0] != "" { @@ -76,7 +75,6 @@ templ calendarEventTemplate(params CalendarPageParams) {
} -
if len(params.CalendarEvent.Participants) != 0 {
@@ -85,11 +83,10 @@ templ calendarEventTemplate(params CalendarPageParams) {
} if params.CalendarEvent.Image != "" { - + } @templ.Raw(params.Content)
-
for _, v := range params.CalendarEvent.Hashtags { @@ -98,4 +95,4 @@ templ calendarEventTemplate(params CalendarPageParams) { }
} -} \ No newline at end of file +} diff --git a/common.templ b/common.templ index 9ca1ac0..c5d0a8f 100644 --- a/common.templ +++ b/common.templ @@ -1,5 +1,7 @@ package main +import "github.com/nbd-wtf/nostr-sdk" + var compileTimeTs string templ headCommonTemplate(params HeadParams) { @@ -37,7 +39,7 @@ on load get [navigator.userAgent.includes('Safari'), navigator.userAgent.include } -templ authorHeaderTemplate(metadata Metadata) { +templ authorHeaderTemplate(metadata sdk.ProfileMetadata) {