mirror of
https://github.com/aljazceru/njump.git
synced 2026-02-01 20:24:28 +01:00
Rearrange template headers
This commit is contained in:
@@ -252,6 +252,8 @@ iframe {
|
||||
top: 2rem;
|
||||
align-self: flex-start;
|
||||
flex-basis: 25%;
|
||||
max-width: 25%;
|
||||
word-wrap: break-word;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
@media (max-width: 580px) {
|
||||
|
||||
@@ -293,6 +293,8 @@ iframe {
|
||||
top: 2rem;
|
||||
align-self: flex-start;
|
||||
flex-basis: 25%;
|
||||
max-width: 25%;
|
||||
word-wrap: break-word;
|
||||
margin-top: 2rem;
|
||||
@media (max-width: 580px) {
|
||||
display: flex;
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
<head>
|
||||
{{if eq .type "profile"}}
|
||||
<title>Nostr Public Key {{.npub}}</title>
|
||||
<meta property="og:site_name" content="{{.npub | escapeString}}" />
|
||||
<meta property="og:title" content="{{.title | escapeString}}" />
|
||||
<link rel="canonical" href="https://nostr.com/{{.npub | escapeString }}" />
|
||||
<link rel="sitemap" type="application/xml" title="Sitemap for {{.npub | escapeString}}"
|
||||
href="/{{.npub | escapeString}}.xml">
|
||||
{{ if .metadata.Picture }}
|
||||
<meta property="og:image" content="{{.metadata.Picture | escapeString}}" />
|
||||
<meta
|
||||
property="twitter:image"
|
||||
content="{{.proxy}}{{.metadata.Picture | escapeString}}"
|
||||
/>
|
||||
{{end}} {{ if .metadata.About }}
|
||||
<meta
|
||||
property="og:description"
|
||||
content="{{.metadata.About | escapeString}}"
|
||||
/>
|
||||
{{end}}
|
||||
<meta property="twitter:card" content="summary" />
|
||||
{{end}}
|
||||
<!----------->
|
||||
{{ if eq .type "note" }}
|
||||
<title>Nostr Event {{.nevent}}</title>
|
||||
<meta property="og:site_name" content="{{.authorLong | escapeString}}" />
|
||||
<meta property="og:title" content="{{.title | escapeString}}" />
|
||||
<meta name="twitter:title" content="{{.twitterTitle | escapeString}}" />
|
||||
<link rel="canonical" href="https://nostr.com/{{.nevent | escapeString }}" />
|
||||
<!---->
|
||||
{{ if .textImageURL }}
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:site" content="@nostrprotocol" />
|
||||
<meta property="og:image" content="{{.textImageURL | escapeString}}" />
|
||||
<meta name="twitter:image" content="{{.textImageURL | escapeString}}" />
|
||||
{{ else }}
|
||||
<!---->
|
||||
<meta property="twitter:card" content="summary" />
|
||||
{{ if .image }}
|
||||
<meta property="og:image" content="{{.image | escapeString}}" />
|
||||
<meta name="twitter:image" content="{{.proxy}}{{.image | escapeString}}" />
|
||||
{{end}} {{ if .video }}
|
||||
<meta property="og:video" content="{{.video | escapeString}}" />
|
||||
<meta property="og:video:secure_url" content="{{.video | escapeString}}" />
|
||||
<meta
|
||||
property="og:video:type"
|
||||
content="video/{{.videoType | escapeString}}"
|
||||
/>
|
||||
{{end}}
|
||||
<!---->
|
||||
{{end}}
|
||||
<meta property="og:description" content="{{.description | escapeString}}" />
|
||||
<meta name="twitter:description" content="{{.description | escapeString}}" />
|
||||
{{end}}
|
||||
<!----------->
|
||||
{{ if eq .type "address" }}
|
||||
<title>Nostr Address {{.naddr | escapeString }}</title>
|
||||
{{end}}
|
||||
<!----------->
|
||||
{{ if eq .type "relay" }}
|
||||
<title>Nostr Relay {{.hostname}}</title>
|
||||
<link rel="sitemap" type="application/xml" title="Sitemap for {{.hostname | escapeString}}"
|
||||
href="/{{.hostname | escapeString}}.xml">
|
||||
{{end}}
|
||||
<!----------->
|
||||
{{ if eq .type "other" }}
|
||||
<title>Nostr Event {{.kindID}} - {{.kindDescription | escapeString }}</title>
|
||||
{{end}}
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="/njump/static/styles.css?v=20230606b" />
|
||||
</head>
|
||||
2
templates/head_common.html
Normal file
2
templates/head_common.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="/njump/static/styles.css?v=20230606b" />
|
||||
@@ -1,7 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="theme--default">
|
||||
<meta charset="UTF-8" />
|
||||
{{template "head.html" .}}
|
||||
<head>
|
||||
|
||||
<title>Nostr Event {{.nevent}}</title>
|
||||
<meta property="og:title" content="Nostr Event {{.nevent | escapeString}} by {{.metadata.Name | escapeString}}" />
|
||||
<meta name="twitter:title" content="Nostr Event {{.nevent | escapeString}} by {{.metadata.Name | escapeString}}" />
|
||||
<meta property="og:site_name" content="{{.metadata.Name | escapeString}} nostr homepage" />
|
||||
{{ if .textImageURL }}
|
||||
<meta property="og:image" content="{{.textImageURL | escapeString}}" />
|
||||
<meta property="twitter:image" content="{{.proxy}}{{.textImageURL | escapeString}}" />
|
||||
{{ else }}
|
||||
<!---->
|
||||
<meta property="twitter:card" content="summary" />
|
||||
{{ if .image }}
|
||||
<meta property="og:image" content="{{.image | escapeString}}" />
|
||||
<meta name="twitter:image" content="{{.proxy}}{{.image | escapeString}}" />
|
||||
{{end}} {{ if .video }}
|
||||
<meta property="og:video" content="{{.video | escapeString}}" />
|
||||
<meta property="og:video:secure_url" content="{{.video | escapeString}}" />
|
||||
<meta property="og:video:type" content="video/{{.videoType | escapeString}}" />
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{ if .description }}
|
||||
<meta property="og:description" content="{{.description | escapeString}}" />
|
||||
<meta name="twitter:description" content="{{.description | escapeString}}" />
|
||||
{{end}}
|
||||
|
||||
<link rel="canonical" href="https://nostr.com/{{.nevent | escapeString }}" />
|
||||
|
||||
{{template "head_common.html" }}
|
||||
</head>
|
||||
|
||||
<body class="note">
|
||||
{{template "top.html" .}}
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="theme--default">
|
||||
<meta charset="UTF-8" />
|
||||
{{template "head.html" .}}
|
||||
<head>
|
||||
{{ if eq .type "address" }}
|
||||
<title>Nostr Address {{.naddr | escapeString }}</title>
|
||||
{{end}}
|
||||
{{ if eq .type "other" }}
|
||||
<title>Nostr Event {{.kindID}} - {{.kindDescription | escapeString }}</title>
|
||||
{{end}}
|
||||
|
||||
{{template "head_common.html" }}
|
||||
</head>
|
||||
|
||||
<body class="other">
|
||||
{{template "top.html" .}}
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="theme--default">
|
||||
<meta charset="UTF-8" />
|
||||
{{template "head.html" .}}
|
||||
<head>
|
||||
<title>{{.metadata.Name | escapeString}} on nostr - {{.npub}}</title>
|
||||
<meta property="og:title" content="{{.metadata.Name | escapeString}} on nostr - {{.npub | escapeString}}" />
|
||||
<meta name="twitter:title" content="{{.metadata.Name | escapeString}} on nostr - {{.npub | escapeString}}" />
|
||||
<meta property="og:site_name" content="{{.metadata.Name | escapeString}} nostr homepage" />
|
||||
{{ if .metadata.Picture }}
|
||||
<meta property="og:image" content="{{.metadata.Picture | escapeString}}" />
|
||||
<meta property="twitter:image" content="{{.proxy}}{{.metadata.Picture | escapeString}}" />
|
||||
{{end}}
|
||||
{{ if .metadata.About }}
|
||||
<meta property="og:description" content="{{.metadata.About | escapeString}}" />
|
||||
<meta name="twitter:description" content="{{.metadata.About | escapeString}}" />
|
||||
{{end}}
|
||||
|
||||
<link rel="canonical" href="https://nostr.com/{{.npub | escapeString }}" />
|
||||
<link rel="sitemap" type="application/xml" title="Sitemap for {{.npub | escapeString}}" href="/{{.npub | escapeString}}.xml">
|
||||
|
||||
{{template "head_common.html" }}
|
||||
</head>
|
||||
|
||||
<body class="profile">
|
||||
{{template "top.html" .}}
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="theme--default">
|
||||
<meta charset="UTF-8" />
|
||||
{{template "head.html" .}}
|
||||
<head>
|
||||
<title>Nostr Relay {{.hostname | escapeString}}</title>
|
||||
<meta property="og:title" content="{{.info.Name | escapeString}} - A nostr relay" />
|
||||
<meta name="twitter:title" content="{{.info.Name | escapeString}} - A nostr relay" />
|
||||
<meta property="og:site_name" content="{{.hostname | escapeString}} nostr relay homepage" />
|
||||
{{ if .info.Icon }}
|
||||
<meta property="og:image" content="{{.info.Icon | escapeString}}" />
|
||||
<meta property="twitter:image" content="{{.proxy}}{{.info.Icon | escapeString}}" />
|
||||
{{end}}
|
||||
{{ if .info.Description }}
|
||||
<meta property="og:description" content="{{.info.Description | escapeString}}" />
|
||||
<meta name="twitter:description" content="{{.info.Description | escapeString}}" />
|
||||
{{end}}
|
||||
|
||||
<link rel="sitemap" type="application/xml" title="Sitemap for {{.hostname | escapeString}}" href="/{{.hostname | escapeString}}.xml">
|
||||
|
||||
{{template "head_common.html" }}
|
||||
</head>
|
||||
|
||||
<body class="profile">
|
||||
{{template "top.html" .}}
|
||||
|
||||
Reference in New Issue
Block a user