mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 14:24:27 +01:00
Review clients design
This commit is contained in:
@@ -9,7 +9,6 @@ module.exports = {
|
|||||||
fontSize: {
|
fontSize: {
|
||||||
xs: '0.7rem',
|
xs: '0.7rem',
|
||||||
sm: '0.8rem',
|
sm: '0.8rem',
|
||||||
re: '0.9rem',
|
|
||||||
'2xl': ['1.5rem', '1.1rem'],
|
'2xl': ['1.5rem', '1.1rem'],
|
||||||
},
|
},
|
||||||
colors: {
|
colors: {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
toggle .hidden on <.client:not(:first-child) />"
|
toggle .hidden on <.client:not(:first-child) />"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="text-sm text-center mb-4 absolute top-0 right-0 sm:relative w-9 sm:w-auto h-9 sm:h-auto"
|
class="text-sm text-center mb-4 absolute top-0 right-0 sm:relative w-10 sm:w-auto h-10 sm:h-auto"
|
||||||
>
|
>
|
||||||
<span class="hidden sm:block">Open in</span>
|
<span class="hidden sm:block">Open in</span>
|
||||||
<span id="open" class="inline sm:hidden">
|
<span id="open" class="inline sm:hidden">
|
||||||
@@ -51,21 +51,19 @@
|
|||||||
get first in me
|
get first in me
|
||||||
then tell it
|
then tell it
|
||||||
remove .hidden
|
remove .hidden
|
||||||
add .rounded-t-lg .bg-strongpink .hover:bg-crimson to <a /> in you
|
|
||||||
remove .sm:rounded-lg
|
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{range .Clients}}
|
{{range .Clients}}
|
||||||
<div
|
<div
|
||||||
class="client | hidden sm:mb-3 sm:flex items-center"
|
class="client | hidden sm:mb-3 sm:flex items-center bg-zinc-700 first-of-type:bg-strongpink first-of-type:rounded-t-lg sm:rounded-lg sm:first-of-type:rounded-lg hover:bg-zinc-800 border-b first-of-type:border-0 sm:border-0 border-zinc-800"
|
||||||
_="on load get localStorage['nj:{{.ID}}'] or 0 then set @count to it then set @title to `used ${it} times`
|
_="on load get localStorage['nj:{{.ID}}'] or 0 then set @count to it then set @title to `used ${it} times`
|
||||||
on click increment localStorage['nj:{{.ID}}']"
|
on click increment localStorage['nj:{{.ID}}']"
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
class="block sm:inline basis-full text-left sm:text-center text-sm text-white bg-zinc-700 no-underline px-3 py-2 sm:py-1.5 sm:rounded-lg hover:bg-gray-700"
|
class="block sm:inline basis-full leading-4 text-left sm:text-center text-[17px] text-white no-underline px-3 py-3 sm:py-1.5 sm:py-1.5 font-normal sm:font-light"
|
||||||
href="{{.URL}}"
|
href="{{.URL}}"
|
||||||
>
|
>
|
||||||
<span class="inline text-white hidden basis-1/5 ml-1.5">Open in</span>
|
<span class="inline text-white sm:hidden basis-1/5 ml-1.5">Open in</span>
|
||||||
{{.Name}}
|
{{.Name}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
6
utils.go
6
utils.go
@@ -126,7 +126,7 @@ type ClientReference struct {
|
|||||||
func generateClientList(code string, event *nostr.Event) []ClientReference {
|
func generateClientList(code string, event *nostr.Event) []ClientReference {
|
||||||
if event.Kind == 1 || event.Kind == 6 {
|
if event.Kind == 1 || event.Kind == 6 {
|
||||||
return []ClientReference{
|
return []ClientReference{
|
||||||
{ID: "native", Name: "your native client", URL: "nostr:" + code},
|
{ID: "native", Name: "Your native client", URL: "nostr:" + code},
|
||||||
{ID: "snort", Name: "Snort", URL: "https://Snort.social/e/" + code},
|
{ID: "snort", Name: "Snort", URL: "https://Snort.social/e/" + code},
|
||||||
{ID: "nostrudel", Name: "Nostrudel", URL: "https://nostrudel.ninja/#/n/" + code},
|
{ID: "nostrudel", Name: "Nostrudel", URL: "https://nostrudel.ninja/#/n/" + code},
|
||||||
{ID: "satellite", Name: "Satellite", URL: "https://satellite.earth/thread/" + event.ID},
|
{ID: "satellite", Name: "Satellite", URL: "https://satellite.earth/thread/" + event.ID},
|
||||||
@@ -138,7 +138,7 @@ func generateClientList(code string, event *nostr.Event) []ClientReference {
|
|||||||
}
|
}
|
||||||
} else if event.Kind == 0 {
|
} else if event.Kind == 0 {
|
||||||
return []ClientReference{
|
return []ClientReference{
|
||||||
{ID: "native", Name: "your native client", URL: "nostr:" + code},
|
{ID: "native", Name: "Your native client", URL: "nostr:" + code},
|
||||||
{ID: "nosta", Name: "Nosta", URL: "https://nosta.me/" + code},
|
{ID: "nosta", Name: "Nosta", URL: "https://nosta.me/" + code},
|
||||||
{ID: "snort", Name: "Snort", URL: "https://snort.social/p/" + code},
|
{ID: "snort", Name: "Snort", URL: "https://snort.social/p/" + code},
|
||||||
{ID: "satellite", Name: "Satellite", URL: "https://satellite.earth/@" + code},
|
{ID: "satellite", Name: "Satellite", URL: "https://satellite.earth/@" + code},
|
||||||
@@ -150,7 +150,7 @@ func generateClientList(code string, event *nostr.Event) []ClientReference {
|
|||||||
}
|
}
|
||||||
} else if event.Kind == 30023 || event.Kind == 30024 {
|
} else if event.Kind == 30023 || event.Kind == 30024 {
|
||||||
return []ClientReference{
|
return []ClientReference{
|
||||||
{ID: "native", Name: "your native client", URL: "nostr:" + code},
|
{ID: "native", Name: "Your native client", URL: "nostr:" + code},
|
||||||
{ID: "yakihonne", Name: "YakiHonne", URL: "https://yakihonne.com/article/" + code},
|
{ID: "yakihonne", Name: "YakiHonne", URL: "https://yakihonne.com/article/" + code},
|
||||||
{ID: "habla", Name: "Habla", URL: "https://habla.news/a/" + code},
|
{ID: "habla", Name: "Habla", URL: "https://habla.news/a/" + code},
|
||||||
{ID: "highlighter", Name: "Highlighter", URL: "https://highlighter.com/a/" + code},
|
{ID: "highlighter", Name: "Highlighter", URL: "https://highlighter.com/a/" + code},
|
||||||
|
|||||||
Reference in New Issue
Block a user