ui improvements

This commit is contained in:
pluja 2024-02-13 10:41:49 +01:00
parent b02cb1502a
commit ecf7c38911
4 changed files with 156 additions and 130 deletions

View File

@ -1,14 +1,13 @@
<section class="pt-14"> <section class="pt-14">
<div class="flex flex-col items-center justify-center space-x-4"> <div class="flex flex-col justify-center items-center space-x-4">
<!--<h1 class="text-2xl font-bold capitalize-first">{{.Attribute.Title}}</h1>--> <!--<h1 class="text-2xl font-bold capitalize-first">{{.Attribute.Title}}</h1>-->
<!-- Description --> <!-- Description -->
<div class="p-4 m-4 <div class="p-4 m-4 {{if eq "info" .Attribute.Rating}} border rounded-lg border-blue-600/40 bg-blue-600/20
{{if eq " info" .Attribute.Rating}} border rounded-lg border-blue-600/40 bg-blue-600/20 {{end}} {{end}} {{if eq "good" .Attribute.Rating}} border rounded-lg border-green-600/40 bg-green-600/20 {{end}}
{{if eq "good" .Attribute.Rating}} border rounded-lg border-green-600/40 bg-green-600/20 {{end}} {{if {{if eq "warn" .Attribute.Rating}} border rounded-lg border-yellow-600/40 bg-yellow-600/20 {{end}} {{if
eq "warn" .Attribute.Rating}} border rounded-lg border-yellow-600/40 bg-yellow-600/20 {{end}} {{if eq "bad" eq "bad" .Attribute.Rating}} border rounded-lg border-red-600/40 bg-red-600/20 {{end}} ">
.Attribute.Rating}} border rounded-lg border-red-600/40 bg-red-600/20 {{end}} ">
<h3 class=" mb-3 text-lg font-bold uppercase border-b md:text-xl border-b-white/20"> <h3 class="mb-3 text-lg font-bold uppercase border-b md:text-xl border-b-white/20">
{{if eq "info" .Attribute.Rating}} {{if eq "info" .Attribute.Rating}}
🔵 🔵
{{end}} {{end}}
@ -36,9 +35,9 @@
</section> </section>
<!-- Services list --> <!-- Services list -->
<section class="flex flex-col items-center justify-center px-1 mx-2 mt-6"> <section class="flex flex-col justify-center items-center px-1 mx-2 mt-6">
<h2 class="text-lg font-bold uppercase text-center">Services with this point:</h2> <h2 class="text-lg font-bold text-center uppercase">Services with this point:</h2>
<div class="grid max-w-6xl grid-cols-1 gap-3 mt-2 md:grid-cols-2 lg:grid-cols-3 mx-auto"> <div class="grid grid-cols-1 gap-3 mx-auto mt-2 max-w-6xl md:grid-cols-2 lg:grid-cols-3">
{{range .Services}} {{range .Services}}
{{partial "partials/service_card" .}} {{partial "partials/service_card" .}}
{{end}} {{end}}

View File

@ -1,17 +1,19 @@
<a target="_blank" href="{{.Announcement.Link}}" <div class="flex justify-center items-center mt-4 w-full">
class="flex items-center justify-center max-w-sm p-2 mx-auto space-x-2 border rounded-lg bg-black/30 border-lime-900"> <a target="_blank" href="{{.Announcement.Link}}"
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-lime-600" viewBox="0 0 24 24" stroke-width="1.5" class="flex justify-center items-center p-2 mx-auto space-x-2 max-w-sm rounded-lg border border-lime-900 bg-black/30">
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-lime-600" viewBox="0 0 24 24" stroke-width="1.5"
<path stroke="none" d="M0 0h24v24H0z" fill="none" /> stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="9" /> <path stroke="none" d="M0 0h24v24H0z" fill="none" />
<line x1="12" y1="8" x2="12.01" y2="8" /> <circle cx="12" cy="12" r="9" />
<polyline points="11 12 12 12 12 16 13 16" /> <line x1="12" y1="8" x2="12.01" y2="8" />
</svg> <polyline points="11 12 12 12 12 16 13 16" />
<div class="flex flex-col items-center justify-center text-center"> </svg>
<span class="font-bold">{{.Announcement.Title}}</span> <div class="flex flex-col justify-center items-center text-center">
<span class="text-xs lowercase">{{.Announcement.Body}}</span> <span class="font-bold">{{.Announcement.Title}}</span>
</div> <span class="text-xs lowercase">{{.Announcement.Body}}</span>
</a> </div>
</a>
</div>
<main class="py-4 text-lime-500"> <main class="py-4 text-lime-500">
@ -24,44 +26,44 @@
<!-- End Filters --> <!-- End Filters -->
<form action="/"> <form action="/">
<input type="hidden" name="t" id="t" value="{{.Filters.Type}}" /> <input type="hidden" name="t" id="t" value="{{.Filters.Type}}" />
<div class="flex items-center justify-center mt-4"> <div class="flex justify-center items-center mt-4">
<input <input
class="text-xs bg-transparent border rounded-lg border-lime-500/60 text-lime-500 placeholder-white/30" class="text-xs text-lime-500 bg-transparent rounded-lg border border-lime-500/60 placeholder-white/30"
placeholder="Search anything..." value="{{.Filters.Query}}" type="text" name="q" id="q"> placeholder="Search anything..." value="{{.Filters.Query}}" type="text" name="q" id="q">
</div> </div>
<div class="flex items-center justify-center pt-2.5 space-x-2"> <div class="flex justify-center items-center pt-2.5 space-x-2">
<span class="flex flex-col items-center justify-center"> <span class="flex flex-col justify-center items-center">
<label class="text-xs uppercase" for="btc">btc</label> <label class="text-xs uppercase" for="btc">btc</label>
<input <input
class="bg-transparent rounded-full outline-none appearance-none focus:ring-0 border-lime-500/60 text-lime-500" class="text-lime-500 bg-transparent rounded-full appearance-none outline-none focus:ring-0 border-lime-500/60"
type="checkbox" {{if eq "on" .Filters.Btc}}checked{{end}} name="btc" id="btc"> type="checkbox" {{if eq "on" .Filters.Btc}}checked{{end}} name="btc" id="btc">
</span> </span>
<span class="flex flex-col items-center justify-center"> <span class="flex flex-col justify-center items-center">
<label class="text-xs uppercase" for="xmr">xmr</label> <label class="text-xs uppercase" for="xmr">xmr</label>
<input <input
class="bg-transparent rounded-full outline-none appearance-none focus:ring-0 border-lime-500/60 text-lime-500" class="text-lime-500 bg-transparent rounded-full appearance-none outline-none focus:ring-0 border-lime-500/60"
type="checkbox" {{if eq "on" .Filters.Xmr}}checked{{end}} name="xmr" id="xmr"> type="checkbox" {{if eq "on" .Filters.Xmr}}checked{{end}} name="xmr" id="xmr">
</span> </span>
<span class="flex flex-col items-center justify-center"> <span class="flex flex-col justify-center items-center">
<label class="text-xs uppercase" for="ln">ln</label> <label class="text-xs uppercase" for="ln">ln</label>
<input <input
class="bg-transparent rounded-full outline-none appearance-none focus:ring-0 border-lime-500/60 text-lime-500" class="text-lime-500 bg-transparent rounded-full appearance-none outline-none focus:ring-0 border-lime-500/60"
type="checkbox" {{if eq "on" .Filters.Ln}}checked{{end}} name="ln" id="ln"> type="checkbox" {{if eq "on" .Filters.Ln}}checked{{end}} name="ln" id="ln">
</span> </span>
<span class="flex flex-col items-center justify-center"> <span class="flex flex-col justify-center items-center">
<label class="text-xs uppercase" for="fiat">fiat</label> <label class="text-xs uppercase" for="fiat">fiat</label>
<input <input
class="bg-transparent rounded-full outline-none appearance-none focus:ring-0 border-lime-500/60 text-lime-500" class="text-lime-500 bg-transparent rounded-full appearance-none outline-none focus:ring-0 border-lime-500/60"
type="checkbox" {{if eq "on" .Filters.Fiat}}checked{{end}} name="fiat" id="fiat"> type="checkbox" {{if eq "on" .Filters.Fiat}}checked{{end}} name="fiat" id="fiat">
</span> </span>
<span class="flex flex-col items-center justify-center"> <span class="flex flex-col justify-center items-center">
<label class="text-xs uppercase" for="cash">cash</label> <label class="text-xs uppercase" for="cash">cash</label>
<input <input
class="bg-transparent rounded-full outline-none appearance-none focus:ring-0 border-lime-500/60 text-lime-500" class="text-lime-500 bg-transparent rounded-full appearance-none outline-none focus:ring-0 border-lime-500/60"
type="checkbox" {{if eq "on" .Filters.Cash}}checked{{end}} name="cash" id="cash"> type="checkbox" {{if eq "on" .Filters.Cash}}checked{{end}} name="cash" id="cash">
</span> </span>
<button class="p-1 text-xs font-bold uppercase border rounded-lg bg-none border-lime-500/60" <button class="p-1 text-xs font-bold uppercase bg-none rounded-lg border border-lime-500/60"
type="submit">filter</button> type="submit">filter</button>
</div> </div>
</form> </form>
@ -72,11 +74,11 @@
class="p-1 {{if eq "" .Filters.Type}}border-b border-lime-500/60 text-lime-500{{end}} text-xs">All</span> class="p-1 {{if eq "" .Filters.Type}}border-b border-lime-500/60 text-lime-500{{end}} text-xs">All</span>
</a> </a>
<a href="/?t=exchange"> <a href="/?t=exchange">
<span class="p-1 {{if eq " exchange" .Filters.Type}}border-b border-lime-500/60 text-lime-500{{end}} <span class="p-1 {{if eq "exchange" .Filters.Type}}border-b border-lime-500/60 text-lime-500{{end}}
text-xs">Exchanges</span> text-xs">Exchanges</span>
</a> </a>
<a href="/?t=service"> <a href="/?t=service">
<span class="p-1 {{if eq " service" .Filters.Type}}border-b border-lime-500/60 text-lime-500{{end}} <span class="p-1 {{if eq "service" .Filters.Type}}border-b border-lime-500/60 text-lime-500{{end}}
text-xs">Services</span> text-xs">Services</span>
</a> </a>
</div> </div>
@ -84,8 +86,8 @@
</main> </main>
<!-- Services list --> <!-- Services list -->
<section class="flex items-center justify-center px-3 pb-12 mt-4"> <section class="flex justify-center items-center px-3 pb-12 mt-4">
<div class="grid max-w-6xl grid-cols-1 gap-3 md:grid-cols-3 lg:grid-cols-3"> <div class="grid grid-cols-1 gap-3 max-w-6xl md:grid-cols-3 lg:grid-cols-3">
{{range .Services}} {{range .Services}}
{{partial "partials/service_card" .}} {{partial "partials/service_card" .}}
{{end}} {{end}}

View File

@ -52,39 +52,40 @@
{{end}} {{end}}
<!-- Nav Bar --> <!-- Nav Bar -->
<nav class="bg-none"> <nav class="flex justify-center items-center w-full bg-none">
<div class="max-w-6xl px-4 mx-auto"> <div class="flex flex-col justify-between items-center px-4 w-full max-w-6xl md:flex-row">
<div class="flex justify-between"> <!-- Logo -->
<div class="flex flex-col items-center justify-center md:flex-row space-x-7"> <a href="/">
<!-- Logo --> <img src="/static/assets/logo_wide.svg" alt="Logo" class="pt-2 max-w-48 lg:max-w-48" />
<a href="/"> </a>
<img src="/static/assets/logo_wide.svg" alt="Logo" class="w-3/5 pt-2 mr-2 md:w-1/4" />
</a>
<!-- Primary Navbar items --> <!-- Primary Navbar items -->
<div class="flex items-center space-x-1 md:space-x-2"> <div class="[&>a]:inline [&>a]:text-xs">
<a <a
href="/" href="/"
class="px-1 py-1 text-xs font-semibold md:text-base {{if or (eq .Current "index") (eq .Current "")}} text-lime-500 border-lime-500 border-b-2 {{ else }} text-gray-500 hover:text-lime-500 {{ end }}" class="px-1 py-1 font-semibold md:text-base {{if or (eq .Current "index") (eq .Current "")}} text-lime-500 border-lime-500 border-b-2 {{ else }} text-gray-500 hover:text-lime-500 {{ end }}"
>Home</a >
> Home
<a </a>
href="/request/service"
class="px-1 py-1 text-xs text-gray-500 transition duration-300 md:text-base {{if or (eq .Current "request") (eq .Current "")}} text-lime-500 border-lime-500 border-b-2 {{ else }} text-gray-500 hover:text-lime-500 {{ end }}" <a
>Request</a href="/request/service"
> class="px-1 py-1 text-gray-500 transition duration-300 md:text-base {{if or (eq .Current "request") (eq .Current "")}} text-lime-500 border-lime-500 border-b-2 {{ else }} text-gray-500 hover:text-lime-500 {{ end }}"
<a >
href="/about" Request
class="px-1 py-1 text-xs text-gray-500 transition duration-300 md:text-base {{if or (eq .Current "about") (eq .Current "")}} text-lime-500 border-lime-500 border-b-2 {{ else }} text-gray-500 hover:text-lime-500 {{ end }}" </a>
>About</a <a
> href="/about"
<a class="px-1 py-1 text-gray-500 transition duration-300 md:text-base {{if or (eq .Current "about") (eq .Current "")}} text-lime-500 border-lime-500 border-b-2 {{ else }} text-gray-500 hover:text-lime-500 {{ end }}"
href="/about#support" >
class="px-1 py-1 text-xs text-gray-500 transition duration-300 md:text-base hover:text-lime-500" About
>Support</a </a>
> <a
</div> href="/about#support"
</div> class="px-1 py-1 text-gray-500 transition duration-300 md:text-base hover:text-lime-500"
>
Support
</a>
</div> </div>
</div> </div>
</nav> </nav>

View File

@ -1,39 +1,59 @@
{{/* service_card.html */}} {{/* service_card.html */}}
<a href="/service/{{.Name}}" class="w-full max-w-md"> <a href="/service/{{.Name}}" class="w-full max-w-md">
<div <div
class="flex flex-col justify-between p-4 transition duration-500 bg-gray-700 border border-transparent rounded-lg shadow-lg backdrop-blur-md bg-opacity-30 hover:border-lime-600/70"> class="flex flex-col justify-between p-4 bg-gray-700 bg-opacity-30 rounded-lg border border-transparent shadow-lg backdrop-blur-md transition duration-500 hover:border-lime-600/70"
<div> >
<div class="flex items-center"> <div>
<img src="/api/g/picture/{{.ID}}" alt="{{.Name}} logo" class="w-12 h-12 mr-4 rounded-full bg-white/10"> <div class="flex items-center">
<div class="flex flex-col items-center justify-center"> <img
<div class="text-xl font-bold text-white"> src="/api/g/picture/{{.ID}}"
<div class="flex items-center justify-between"> alt="{{.Name}} logo"
<span class="flex items-center justify-center capitalize"> class="mr-4 w-12 h-12 rounded-full bg-white/10"
{{if .Verified}} />
<svg xmlns="http://www.w3.org/2000/svg" <div class="flex flex-col justify-center items-center">
class="w-5 h-5 mr-1 text-blue-400/80 discount-check-filled" width="24" height="24" <div class="text-xl font-bold text-white">
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" <div class="flex justify-between items-center">
stroke-linecap="round" stroke-linejoin="round"> <span class="flex justify-center items-center capitalize">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path> {{if .Verified}}
<path <svg
d="M12.01 2.011a3.2 3.2 0 0 1 2.113 .797l.154 .145l.698 .698a1.2 1.2 0 0 0 .71 .341l.135 .008h1a3.2 3.2 0 0 1 3.195 3.018l.005 .182v1c0 .27 .092 .533 .258 .743l.09 .1l.697 .698a3.2 3.2 0 0 1 .147 4.382l-.145 .154l-.698 .698a1.2 1.2 0 0 0 -.341 .71l-.008 .135v1a3.2 3.2 0 0 1 -3.018 3.195l-.182 .005h-1a1.2 1.2 0 0 0 -.743 .258l-.1 .09l-.698 .697a3.2 3.2 0 0 1 -4.382 .147l-.154 -.145l-.698 -.698a1.2 1.2 0 0 0 -.71 -.341l-.135 -.008h-1a3.2 3.2 0 0 1 -3.195 -3.018l-.005 -.182v-1a1.2 1.2 0 0 0 -.258 -.743l-.09 -.1l-.697 -.698a3.2 3.2 0 0 1 -.147 -4.382l.145 -.154l.698 -.698a1.2 1.2 0 0 0 .341 -.71l.008 -.135v-1l.005 -.182a3.2 3.2 0 0 1 3.013 -3.013l.182 -.005h1a1.2 1.2 0 0 0 .743 -.258l.1 -.09l.698 -.697a3.2 3.2 0 0 1 2.269 -.944zm3.697 7.282a1 1 0 0 0 -1.414 0l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.32 1.497l2 2l.094 .083a1 1 0 0 0 1.32 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z" xmlns="http://www.w3.org/2000/svg"
stroke-width="0" fill="currentColor"></path> class="mr-1 w-5 h-5 text-blue-400/80 discount-check-filled"
</svg> width="24"
{{end}} height="24"
{{.Name}} viewBox="0 0 24 24"
</span> 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.01 2.011a3.2 3.2 0 0 1 2.113 .797l.154 .145l.698 .698a1.2 1.2 0 0 0 .71 .341l.135 .008h1a3.2 3.2 0 0 1 3.195 3.018l.005 .182v1c0 .27 .092 .533 .258 .743l.09 .1l.697 .698a3.2 3.2 0 0 1 .147 4.382l-.145 .154l-.698 .698a1.2 1.2 0 0 0 -.341 .71l-.008 .135v1a3.2 3.2 0 0 1 -3.018 3.195l-.182 .005h-1a1.2 1.2 0 0 0 -.743 .258l-.1 .09l-.698 .697a3.2 3.2 0 0 1 -4.382 .147l-.154 -.145l-.698 -.698a1.2 1.2 0 0 0 -.71 -.341l-.135 -.008h-1a3.2 3.2 0 0 1 -3.195 -3.018l-.005 -.182v-1a1.2 1.2 0 0 0 -.258 -.743l-.09 -.1l-.697 -.698a3.2 3.2 0 0 1 -.147 -4.382l.145 -.154l.698 -.698a1.2 1.2 0 0 0 .341 -.71l.008 -.135v-1l.005 -.182a3.2 3.2 0 0 1 3.013 -3.013l.182 -.005h1a1.2 1.2 0 0 0 .743 -.258l.1 -.09l.698 -.697a3.2 3.2 0 0 1 2.269 -.944zm3.697 7.282a1 1 0 0 0 -1.414 0l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.32 1.497l2 2l.094 .083a1 1 0 0 0 1.32 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z"
stroke-width="0"
fill="currentColor"
></path>
</svg>
{{end}} {{.Name}}
</span>
{{if isNew .Created}} {{if isNew .Created}}
<span <span
class="px-2 py-1 text-xs font-bold uppercase border rounded border-white/30 bg-white/20 text-white/70"> class="px-2 py-1 text-xs font-bold uppercase rounded border border-white/30 bg-white/20 text-white/70"
✨ NEW >
</span> ✨ NEW
{{end}} </span>
<span class='px-2 py-1 text-xs font-bold uppercase border rounded {{end}}
{{if ge .Score 9}} <span
class="px-2 py-1 text-xs font-bold uppercase border rounded
{{if ge .Score 10}}
bg-green-900 border-green-800 bg-green-900 border-green-800
{{else if gt .Score 8}}
bg-green-800 border-green-700
{{else if gt .Score 7}} {{else if gt .Score 7}}
bg-lime-700 border-lime-600 bg-lime-900 border-lime-800
{{else if gt .Score 6}}
bg-lime-700/80 border-lime-600/80
{{else if gt .Score 5}} {{else if gt .Score 5}}
bg-yellow-800 border-yellow-700 bg-yellow-800 border-yellow-700
{{else if eq .Score 5}} {{else if eq .Score 5}}
@ -41,31 +61,35 @@
{{else}} {{else}}
bg-red-900 border-red-800 bg-red-900 border-red-800
{{end}} {{end}}
text-white/70'> text-white/70"
{{.Score}} >
</span> {{.Score}}
</div> </span>
<span class="block pr-1 mt-2 text-xs font-normal text-white/60 text-opacity-60">{{shortText
.Description | safe}}</span>
</div>
</div>
</div>
</div>
<div class="mt-4">
<div class="flex items-center justify-center text-xs">
{{if eq .Type "exchange"}}
<span
class="px-2 py-1 mr-1 text-xs font-bold uppercase border rounded text-white/70 bg-zinc-900 border-zinc-700">
{{.Type}}
</span>
{{else}}
<span
class="px-2 py-1 mr-1 text-xs font-bold uppercase border rounded text-white/70 bg-zinc-900 border-zinc-700">
{{.Category}}
</span>
{{end}}
{{partial "partials/service_icons" .}}
</div> </div>
<span
class="block pr-1 mt-2 text-xs font-normal text-opacity-60 text-white/60"
>{{shortText .Description | safe}}</span
>
</div>
</div> </div>
</div>
</div> </div>
</a> <div class="mt-4">
<div class="flex justify-center items-center text-xs">
{{if eq .Type "exchange"}}
<span
class="px-2 py-1 mr-1 text-xs font-bold uppercase rounded border text-white/70 bg-zinc-900 border-zinc-700"
>
{{.Type}}
</span>
{{else}}
<span
class="px-2 py-1 mr-1 text-xs font-bold uppercase rounded border text-white/70 bg-zinc-900 border-zinc-700"
>
{{.Category}}
</span>
{{end}} {{partial "partials/service_icons" .}}
</div>
</div>
</div>
</a>