diff --git a/.gitignore b/.gitignore index 26069bb..4a942e4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ node_modules/ static/tailwind-bundle.min.css yarn.lock package-lock.json +*_templ.go diff --git a/archive.templ b/archive.templ new file mode 100644 index 0000000..aafc5da --- /dev/null +++ b/archive.templ @@ -0,0 +1,43 @@ +package main + +templ archiveTemplate(params ArchivePageParams) { + + + +
+
+
+
+}
diff --git a/embedded_profile.templ b/embedded_profile.templ
new file mode 100644
index 0000000..6a2c7aa
--- /dev/null
+++ b/embedded_profile.templ
@@ -0,0 +1,126 @@
+package main
+
+templ embeddedProfileTemplate(params EmbeddedProfileParams) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/error.templ b/error.templ
new file mode 100644
index 0000000..0f3f40b
--- /dev/null
+++ b/error.templ
@@ -0,0 +1,35 @@
+package main
+
+templ errorTemplate(params ErrorPageParams) {
+
+
+
+
+
+ njump is a HTTP
+
+ Nostr
+
+ gateway that allows you to browse profiles, notes and relays; it is
+ an easy way to preview a resource and then open it with your
+ preferred client. The typical use of njump is to share a
+ resource outside the Nostr world, where the
+ nostr: schema is not (yet) working.
+
+ njump currently lives under { params.Host }, you can reach it
+ appending a Nostr
+
+ NIP-19
+
+ entity (npub, nevent, naddr,
+ etc) after the domain:
+
+ { params.Host }/<nip-19-entity>
+ .
+
+ For example, here's + + a user profile + , + + a note + + and a + + long blog post + + . +
++ There are several reasons to choose njump when sharing Nostr + content outside of Nostr: +
++ Pages by njump are extremely lightweight and fast to load + because there isn't any client side javascript involved; they are + minimalistic with the right attention to typography, focusing the + content without unnecessary details. Furthermore they are cached, so + when sharing a page you can expect the other part will load it + without any glitch in a fraction of second: the perfect tool to + onboard new users! +
++ njump renders everything on the server-side, so it is able to + generate useful rich previews that work on Telegram, Discord, + Twitter and other places. +
++ When opening the URL directly in a browser, visitors will find + referenced content like images, video and links to referenced Nostr + events displayed in a simple but effective way. It shows the note + parent, allowing the visitor to follow it up and it has custom CSS for + printing or exporting to PDF. +
+
+ njump is not interested capturing users at all, on the
+ contrary it invites them to "jump" to the Nostr resource by picking
+ from a list of web clients or with a nostr: prefix for native
+ clients. It even remembers the most used one for each visitor and
+ puts it on the top for fast clicking or tap.
+
+ NIP-89 + support coming! +
++ This is crucial: njump pages are static so search engines can + index them, this means that njump can help others to discover + great content on Nostr, jump in and join us! njump is the + only nostr resource that has this explicit goal, if you care that a + good note can be found online use njump to share it, this way + you also help Nostr flourish. +
++ Now you can share your own profile with a pretty + + NIP-05 + + inspired permalink: + + { params.Host }/<nip-05> + + , for example: + https://{ params.Host }/nvk.org + or + + https://{ params.Host }/mike@mikedilger.com + + . +
++ A profile shows the basic metadata infos, the used "outbox" relays + and the last notes. +
+
+ Now you can quickly and effortlessly share Nostr notes on Twitter
+ and Telegram, and maybe on many other "social platforms": just drop
+ a link, and njump will render the note text using the preview image
+ as a canvas, to maximize the sharing experience and utility.
+
+ On Telegram we have also the Instant View to access long content
+ in-app!
+
+ You can have a view of the last content posted to a relay using + + { params.Host }/r/<relay-host> + + , for example: + + https://{ params.Host }/r/nostr.wine + +
++ Some basic infos ( + + NIP-11 + + ) are available; We hope operators will start to make them more + personal and informative so users can have a way to evaluate if/when + to join a relay. +
++ You know, we are all programmers, including our moms, so for every + njump page you can toggle the "Show more details" switch and + inspect the full event JSON. Without installing other tools (like + nak) + this is probably the fastest way to access that. +
+
-
-
diff --git a/templates/embedded_profile.html b/templates/embedded_profile.html
deleted file mode 100644
index f88a607..0000000
--- a/templates/embedded_profile.html
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/templates/error.html b/templates/error.html
deleted file mode 100644
index 12b44e3..0000000
--- a/templates/error.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
- njump is a HTTP
- Nostr
- gateway that allows you to browse profiles, notes and relays; it is
- an easy way to preview a resource and then open it with your
- preferred client. The typical use of njump is to share a
- resource outside the Nostr world, where the
- nostr: schema is not (yet) working.
-
- njump currently lives under {{ .Host }}, you can reach it
- appending a Nostr
- NIP-19
- entity (npub, nevent, naddr,
- etc) after the domain:
- {{ .Host }}/<nip-19-entity>.
-
- For example, here's - a user profile, - a note - and a - long blog post. -
- -- There are several reasons to choose njump when sharing Nostr - content outside of Nostr: -
- -- Pages by njump are extremely lightweight and fast to load - because there isn't any client side javascript involved; they are - minimalistic with the right attention to typography, focusing the - content without unnecessary details. Furthermore they are cached, so - when sharing a page you can expect the other part will load it - without any glitch in a fraction of second: the perfect tool to - onboard new users! -
- -- njump renders everything on the server-side, so it is able to - generate useful rich previews that work on Telegram, Discord, - Twitter and other places. -
-- When opening the URL directly in a browser, visitors will find - referenced content like images, video and links to referenced Nostr - events displayed in a simple but effective way. It shows the note - parent, allowing the visitor to follow it up and it has custom CSS - for printing or exporting to PDF. -
- -
- njump is not interested capturing users at all, on the
- contrary it invites them to "jump" to the Nostr resource by picking
- from a list of web clients or with a nostr: for native
- clients. It even remembers the most used one for each visitor and
- puts it on the top for fast clicking or tap.
-
- NIP-89 - support coming! -
- -- This is crucial: njump pages are static so search engines can - index them, this means that njump can help others to discover - great content on Nostr, jump in and join us! njump is the - only nostr resource that has this explicit goal, if you care that a - good note can be found online use njump to share it, this way - you also help Nostr flourish. -
- -- Now you can share your own profile with a pretty - NIP-05 - inspired permalink: - {{ .Host }}/<nip-5>, for example: - https://{{ .Host }}/nvk.org - or - https://{{ .Host }}/mike@mikedilger.com. -
-- A profile shows the basic metadata infos, the used "outbox" relays - and the last notes. -
- -
- Now you can quickly and effortlessly share Nostr notes on Twitter
- and Telegram, and maybe on many other "social platforms": just drop
- a link, and njump will render the note text using the preview image
- as a canvas, to maximize the sharing experience and utility.
- On Telegram we have also the Instant View to access long content
- in-app!
-
- You can have a view of the last content posted to a relay using - {{ .Host }}/r/<relay-host>, for example: - https://{{ .Host }}/r/nostr.wine -
-- Some basic infos (NIP-11) are available; We hope operators will start to make them more - personal and informative so users can have a way to evaluate if/when - to join a relay. -
- -- You know, we are all programmers, including our moms, so for every - njump page you can toggle the "Show more details" switch and - inspect the full event JSON. Without installing other tools (like - nak) - this is probably the fastest way to access that. -
-