From bd58a6fb53b618f6417737704aaeaf1473e8a92e Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Mon, 24 Apr 2023 11:57:47 -0300 Subject: [PATCH] stop autolinking on nip19 codes, add an icon afterwards. --- ext.svg | 1 + src/main/scala/Components.scala | 12 ++++++------ src/main/scala/Main.scala | 5 ++++- 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 ext.svg diff --git a/ext.svg b/ext.svg new file mode 100644 index 0000000..6e1a739 --- /dev/null +++ b/ext.svg @@ -0,0 +1 @@ + diff --git a/src/main/scala/Components.scala b/src/main/scala/Components.scala index 1abf347..cea2ae1 100644 --- a/src/main/scala/Components.scala +++ b/src/main/scala/Components.scala @@ -232,12 +232,12 @@ object Components { ): Resource[IO, HtmlDivElement[IO]] = div( span(cls := "font-bold", key + " "), - span( - Styles.mono, - a( - href := "nostr:" + code, - code - ) + span(Styles.mono, cls := "break-all", code), + a( + href := "nostr:" + code, + external ) ) + + private val external = img(cls := "inline w-4 ml-2", src := "ext.svg") } diff --git a/src/main/scala/Main.scala b/src/main/scala/Main.scala index 84953c8..c62a932 100644 --- a/src/main/scala/Main.scala +++ b/src/main/scala/Main.scala @@ -27,7 +27,10 @@ object Main extends IOWebApp { cls := "inline-block w-8 mr-2", src := "/favicon.ico" ), - "nostr army knife" + a( + href := "https://github.com/fiatjaf/nostr-army-knife", + "nostr army knife" + ) ), div( cls := "flex my-3",