mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 06:14:22 +01:00
replace SocialMediaPosting with Article on microdata.
This commit is contained in:
@@ -20,7 +20,7 @@ templ eventPageTemplate(
|
||||
<div class="mx-auto px-4 sm:flex sm:items-center sm:justify-center sm:px-0">
|
||||
<div
|
||||
itemscope
|
||||
itemtype="https://schema.org/SocialMediaPosting"
|
||||
itemtype="https://schema.org/Article"
|
||||
class="w-full max-w-screen-2xl justify-between gap-10 overflow-visible print:w-full sm:flex sm:w-11/12 sm:px-4 md:w-10/12 lg:w-9/12 lg:gap-48vw"
|
||||
>
|
||||
<div class="w-full break-words print:w-full sm:w-3/4">
|
||||
|
||||
@@ -150,7 +150,7 @@ templ profileTemplate(params ProfilePageParams) {
|
||||
for _, ee := range params.LastNotes {
|
||||
<div
|
||||
itemscope
|
||||
itemtype="https://schema.org/SocialMediaPosting"
|
||||
itemtype="https://schema.org/Article"
|
||||
class="my-8 block no-underline hover:-ml-6 hover:border-l-05rem hover:border-solid hover:border-l-gray-100 hover:pl-4 dark:hover:border-l-zinc-700"
|
||||
>
|
||||
<div class="hidden" itemprop="author" itemscope itemtype="https://schema.org/Person">
|
||||
|
||||
@@ -113,7 +113,7 @@ templ relayTemplate(params RelayPageParams) {
|
||||
for _, ee := range params.LastNotes {
|
||||
<div
|
||||
itemscope
|
||||
itemtype="https://schema.org/SocialMediaPosting"
|
||||
itemtype="https://schema.org/Article"
|
||||
class="my-8 block no-underline hover:-ml-6 hover:border-l-05rem hover:border-solid hover:border-l-gray-100 hover:pl-4 dark:hover:border-l-zinc-700"
|
||||
>
|
||||
<div class="-ml-2.5 mb-1.5 flex flex-row border-b-4 border-solid border-b-gray-100 pb-1 pl-2.5 dark:border-b-neutral-800">
|
||||
|
||||
2
utils.go
2
utils.go
@@ -243,7 +243,7 @@ func replaceNostrURLsWithHTMLTags(matcher *regexp.Regexp, input string) string {
|
||||
name, _ := getNameFromNip19(ctx, nip19)
|
||||
return fmt.Sprintf(`<span itemprop="mentions" itemscope itemtype="https://schema.org/Person"><a itemprop="url" href="/%s" class="bg-lavender dark:prose:text-neutral-50 dark:text-neutral-50 dark:bg-garnet px-1"><span>%s</span> (<span class="italic">%s</span>)</a></span>`, nip19, name, firstChars+"…"+lastChars)
|
||||
} else {
|
||||
return fmt.Sprintf(`<span itemprop="mentions" itemscope itemtype="https://schema.org/SocialMediaPosting"><a itemprop="url" href="/%s" class="bg-lavender dark:prose:text-neutral-50 dark:text-neutral-50 dark:bg-garnet px-1">%s</a></span>`, nip19, firstChars+"…"+lastChars)
|
||||
return fmt.Sprintf(`<span itemprop="mentions" itemscope itemtype="https://schema.org/Article"><a itemprop="url" href="/%s" class="bg-lavender dark:prose:text-neutral-50 dark:text-neutral-50 dark:bg-garnet px-1">%s</a></span>`, nip19, firstChars+"…"+lastChars)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user