show notes and delisted status

This commit is contained in:
pluja 2024-05-07 23:04:31 +02:00
parent 897b2c148d
commit 470210b938
No known key found for this signature in database
2 changed files with 121 additions and 97 deletions

View File

@ -31,6 +31,7 @@ type Service struct {
Fiat bool `json:"fiat"`
Cash bool `json:"cash"`
Lightning bool `json:"lightning"`
Notes []string `json:"notes"`
}
type TosReview struct {

View File

@ -3,10 +3,9 @@
<link rel="stylesheet" href="/static/css/cactus.css" type="text/css">
</head>
<section class="p-2 mt-8 mb-2">
<section class="flex flex-col justify-center items-center p-2 my-4 mt-8 mb-2 space-y-4 font-bold text-md md:text-md">
<!-- Pending Approval Notice -->
{{if .Service.Pending}}
<div class="flex justify-center items-center my-4 font-bold text-md md:text-md">
<div class="flex justify-center items-center">
<a href="#" target="_blank" class="flex justify-center items-center px-2 py-1 m-1 space-x-2 text-center text-yellow-500 rounded border border-yellow-600 transition duration-300 bg-zinc-900 hover:border-yellow-600 hover:text-yellow-600">
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 text-yellow-600 tabler-alert" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
@ -18,9 +17,38 @@
<span>Pending approval</span>
</a>
</div>
{{end}}
<!-- Not Listed Notice -->
{{if and (not .Service.Pending) (not .Service.Listed)}}
<div class="flex justify-center items-center">
<a href="#" target="_blank"
class="flex justify-center items-center px-2 py-1 m-1 space-x-2 text-center text-yellow-500 rounded border border-yellow-600 transition duration-300 bg-zinc-900 hover:border-yellow-600 hover:text-yellow-600">
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 text-yellow-600 tabler-alert" width="24" height="24"
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<circle cx="12" cy="12" r="9"></circle>
<line x1="12" y1="8" x2="12" y2="12"></line>
<line x1="12" y1="16" x2="12.01" y2="16"></line>
</svg>
<span>DELISTED</span>
</a>
</div>
{{end}}
<!-- Display Service Notes -->
{{if not (eq (len .Service.Notes) 0)}}
{{range .Service.Notes}}
{{if ne . ""}}
<p class="p-4 max-w-lg text-sm rounded-lg border md:text-base border-yellow-400/20 bg-yellow-500/10">
{{.}}
</p>
{{end}}
{{end}}
{{end}}
<!-- Service Header -->
<div class="flex justify-center items-center space-x-4">
<img class="rounded-full size-10 md:size-14 bg-white/25" src="/api/g/picture/{{.Service.ID}}" alt="" />
@ -42,103 +70,102 @@
</div>
<!-- Links -->
<div class="flex justify-center items-center mt-4 text-sm font-bold md:text-md">
<div class="flex flex-wrap justify-center items-center space-x-2">
{{if ne (len .Service.Urls) 0}}
<div class="inline-flex">
<a href="{{randomElem .Service.Urls}}{{.Service.Referral}}" target="_blank"
class="flex justify-center items-center px-2 py-1 space-x-1 text-center text-gray-300
{{if ne .Service.Referral ""}}rounded-l{{else}}rounded{{end}}
border border-gray-600 transition duration-300 bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 tabler-world-www" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M19.5 7a9 9 0 0 0 -7.5 -4a8.991 8.991 0 0 0 -7.484 4"></path>
<path d="M11.5 3a16.989 16.989 0 0 0 -1.826 4"></path>
<path d="M12.5 3a16.989 16.989 0 0 1 1.828 4"></path>
<path d="M19.5 17a9 9 0 0 1 -7.5 4a8.991 8.991 0 0 1 -7.484 -4"></path>
<path d="M11.5 21a16.989 16.989 0 0 1 -1.826 -4"></path>
<path d="M12.5 21a16.989 16.989 0 0 0 1.828 -4"></path>
<path d="M2 10l1 4l1.5 -4l1.5 4l1 -4"></path>
<path d="M17 10l1 4l1.5 -4l1.5 4l1 -4"></path>
<path d="M9.5 10l1 4l1.5 -4l1.5 4l1 -4"></path>
</svg>
<span>Website</span>
</a>
{{if ne .Service.Referral ""}}
<a aria-label="No Referral" data-balloon-pos="up" href="{{randomElem .Service.Urls}}" class="flex justify-center items-center px-1 py-1 text-center text-gray-300 rounded-r border border-gray-600 transition duration-300 md:px-2 bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
<svg xmlns="http://www.w3.org/2000/svg" class="size-4 link-off" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M9 15l3 -3m2 -2l1 -1" />
<path d="M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464" />
<path d="M3 3l18 18" />
<path d="M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463" />
</svg>
</a>
{{end}}
</div>
{{end}}
{{if ne (len .Service.OnionUrls) 0}}
<div class="inline-flex">
<a href="{{randomElem .Service.OnionUrls}}{{.Service.Referral}}" target="_blank"
class="flex justify-center items-center px-2 py-1 space-x-1 text-center text-purple-600
{{if ne .Service.Referral ""}}rounded-l{{else}}rounded{{end}}
border border-purple-900 transition duration-300 bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 tabler-target" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
<path d="M12 12m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"></path>
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path>
</svg>
{{if eq (len .Service.Urls) 0}}
<span>Tor Only</span>
{{else}}
<span>Tor</span>
{{end}}
{{if ne .Service.Referral ""}}
<a aria-label="No Referral" data-balloon-pos="up" href="{{randomElem .Service.OnionUrls}}" class="flex justify-center items-center px-1 py-1 text-center text-purple-600 rounded-r border border-purple-900 transition duration-300 md:px-2 bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
<svg xmlns="http://www.w3.org/2000/svg" class="size-4 link-off" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M9 15l3 -3m2 -2l1 -1" />
<path d="M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464" />
<path d="M3 3l18 18" />
<path d="M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463" />
</svg>
</a>
{{end}}
</a>
</div>
{{end}}
{{if ne (len .Service.TosUrls) 0}}
<a href="{{index .Service.TosUrls 0}}" target="_blank" class="flex justify-center items-center px-2 py-1 m-1 space-x-2 text-center text-gray-300 rounded border border-gray-600 transition duration-300 bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 tabler-report-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<div class="flex flex-wrap justify-center items-center space-x-2">
{{if ne (len .Service.Urls) 0}}
<div class="inline-flex">
<a href="{{randomElem .Service.Urls}}{{.Service.Referral}}" target="_blank"
class="flex justify-center items-center px-2 py-1 space-x-1 text-center text-gray-300
{{if ne .Service.Referral ""}}rounded-l{{else}}rounded{{end}}
border border-gray-600 transition duration-300 bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 tabler-world-www" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M8 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h5.697"></path>
<path d="M18 12v-5a2 2 0 0 0 -2 -2h-2"></path>
<path d="M8 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"></path>
<path d="M8 11h4"></path>
<path d="M8 15h3"></path>
<path d="M16.5 17.5m-2.5 0a2.5 2.5 0 1 0 5 0a2.5 2.5 0 1 0 -5 0"></path>
<path d="M18.5 19.5l2.5 2.5"></path>
<path d="M19.5 7a9 9 0 0 0 -7.5 -4a8.991 8.991 0 0 0 -7.484 4"></path>
<path d="M11.5 3a16.989 16.989 0 0 0 -1.826 4"></path>
<path d="M12.5 3a16.989 16.989 0 0 1 1.828 4"></path>
<path d="M19.5 17a9 9 0 0 1 -7.5 4a8.991 8.991 0 0 1 -7.484 -4"></path>
<path d="M11.5 21a16.989 16.989 0 0 1 -1.826 -4"></path>
<path d="M12.5 21a16.989 16.989 0 0 0 1.828 -4"></path>
<path d="M2 10l1 4l1.5 -4l1.5 4l1 -4"></path>
<path d="M17 10l1 4l1.5 -4l1.5 4l1 -4"></path>
<path d="M9.5 10l1 4l1.5 -4l1.5 4l1 -4"></path>
</svg>
<span>ToS</span>
<span>Website</span>
</a>
{{end}}
<a aria-label="Discuss service" data-balloon-pos="up" href="#discuss" class="hidden justify-center items-center px-2 py-1 m-1 space-x-2 text-center text-sky-400 rounded border border-sky-700 transition duration-300 md:flex bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 messages" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
{{if ne .Service.Referral ""}}
<a aria-label="No Referral" data-balloon-pos="up" href="{{randomElem .Service.Urls}}" class="flex justify-center items-center px-1 py-1 text-center text-gray-300 rounded-r border border-gray-600 transition duration-300 md:px-2 bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
<svg xmlns="http://www.w3.org/2000/svg" class="size-4 link-off" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M9 15l3 -3m2 -2l1 -1" />
<path d="M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464" />
<path d="M3 3l18 18" />
<path d="M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463" />
</svg>
</a>
{{end}}
</div>
{{end}}
{{if ne (len .Service.OnionUrls) 0}}
<div class="inline-flex">
<a href="{{randomElem .Service.OnionUrls}}{{.Service.Referral}}" target="_blank"
class="flex justify-center items-center px-2 py-1 space-x-1 text-center text-purple-600
{{if ne .Service.Referral ""}}rounded-l{{else}}rounded{{end}}
border border-purple-900 transition duration-300 bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 tabler-target" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
<path d="M12 12m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"></path>
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path>
</svg>
{{if eq (len .Service.Urls) 0}}
<span>Tor Only</span>
{{else}}
<span>Tor</span>
{{end}}
{{if ne .Service.Referral ""}}
<a aria-label="No Referral" data-balloon-pos="up" href="{{randomElem .Service.OnionUrls}}" class="flex justify-center items-center px-1 py-1 text-center text-purple-600 rounded-r border border-purple-900 transition duration-300 md:px-2 bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
<svg xmlns="http://www.w3.org/2000/svg" class="size-4 link-off" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M9 15l3 -3m2 -2l1 -1" />
<path d="M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464" />
<path d="M3 3l18 18" />
<path d="M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463" />
</svg>
</a>
{{end}}
</a>
</div>
{{end}}
{{if ne (len .Service.TosUrls) 0}}
<a href="{{index .Service.TosUrls 0}}" target="_blank" class="flex justify-center items-center px-2 py-1 m-1 space-x-2 text-center text-gray-300 rounded border border-gray-600 transition duration-300 bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 tabler-report-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M21 14l-3 -3h-7a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1h9a1 1 0 0 1 1 1v10"></path>
<path d="M14 15v2a1 1 0 0 1 -1 1h-7l-3 3v-10a1 1 0 0 1 1 -1h2"></path>
<path d="M8 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h5.697"></path>
<path d="M18 12v-5a2 2 0 0 0 -2 -2h-2"></path>
<path d="M8 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"></path>
<path d="M8 11h4"></path>
<path d="M8 15h3"></path>
<path d="M16.5 17.5m-2.5 0a2.5 2.5 0 1 0 5 0a2.5 2.5 0 1 0 -5 0"></path>
<path d="M18.5 19.5l2.5 2.5"></path>
</svg>
<span>ToS</span>
</a>
</div>
{{end}}
<a aria-label="Discuss service" data-balloon-pos="up" href="#discuss" class="hidden justify-center items-center px-2 py-1 m-1 space-x-2 text-center text-sky-400 rounded border border-sky-700 transition duration-300 md:flex bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 messages" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M21 14l-3 -3h-7a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1h9a1 1 0 0 1 1 1v10"></path>
<path d="M14 15v2a1 1 0 0 1 -1 1h-7l-3 3v-10a1 1 0 0 1 1 -1h2"></path>
</svg>
</a>
</div>
<!-- Usage Guide Button -->
<!--<div class="flex flex-col justify-center items-center my-1 text-sm">
<a href="https://example.com" target="_blank" class="flex justify-center items-center px-2 py-1 m-1 space-x-2 max-w-xs text-center text-lime-400 rounded border border-lime-700 transition duration-300 bg-zinc-900 hover:border-lime-600 hover:text-lime-600">
@ -156,14 +183,10 @@
</div>-->
<!-- Icons -->
<div class="flex justify-center items-center mt-2 mb-4">
<a href="/about#icons" class="max-w-md text-xs"> {{partial "partials/service_icons" .Service}} </a>
</div>
<a href="/about#icons" class="max-w-md text-xs"> {{partial "partials/service_icons" .Service}} </a>
<!-- Description -->
<div class="flex justify-center items-center mt-4">
<p class="p-4 max-w-lg text-sm rounded-lg border md:text-base border-white/20 bg-gray-500/10">{{if ne .Service.Description ""}} {{.Service.Description | safe}} {{else}} This {{.Service.Type}} does not have a description. {{end}}</p>
</div>
<p class="p-4 max-w-lg text-sm rounded-lg border md:text-base border-white/20 bg-gray-500/10">{{if ne .Service.Description ""}} {{.Service.Description | safe}} {{else}} This {{.Service.Type}} does not have a description. {{end}}</p>
</section>
<!-- KYC Level -->