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">
<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>-->
<!-- Description -->
<div class="p-4 m-4
{{if eq " info" .Attribute.Rating}} border rounded-lg border-blue-600/40 bg-blue-600/20 {{end}}
{{if eq "good" .Attribute.Rating}} border rounded-lg border-green-600/40 bg-green-600/20 {{end}} {{if
eq "warn" .Attribute.Rating}} border rounded-lg border-yellow-600/40 bg-yellow-600/20 {{end}} {{if eq "bad"
.Attribute.Rating}} border rounded-lg border-red-600/40 bg-red-600/20 {{end}} ">
<div class="p-4 m-4 {{if eq "info" .Attribute.Rating}} border rounded-lg border-blue-600/40 bg-blue-600/20
{{end}} {{if eq "good" .Attribute.Rating}} border rounded-lg border-green-600/40 bg-green-600/20 {{end}}
{{if eq "warn" .Attribute.Rating}} border rounded-lg border-yellow-600/40 bg-yellow-600/20 {{end}} {{if
eq "bad" .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}}
🔵
{{end}}
@ -36,9 +35,9 @@
</section>
<!-- Services list -->
<section class="flex flex-col items-center justify-center px-1 mx-2 mt-6">
<h2 class="text-lg font-bold uppercase text-center">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">
<section class="flex flex-col justify-center items-center px-1 mx-2 mt-6">
<h2 class="text-lg font-bold text-center uppercase">Services with this point:</h2>
<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}}
{{partial "partials/service_card" .}}
{{end}}

View File

@ -1,17 +1,19 @@
<a target="_blank" href="{{.Announcement.Link}}"
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">
<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"
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<circle cx="12" cy="12" r="9" />
<line x1="12" y1="8" x2="12.01" y2="8" />
<polyline points="11 12 12 12 12 16 13 16" />
</svg>
<div class="flex flex-col items-center justify-center text-center">
<span class="font-bold">{{.Announcement.Title}}</span>
<span class="text-xs lowercase">{{.Announcement.Body}}</span>
</div>
</a>
<div class="flex justify-center items-center mt-4 w-full">
<a target="_blank" href="{{.Announcement.Link}}"
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">
<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"
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<circle cx="12" cy="12" r="9" />
<line x1="12" y1="8" x2="12.01" y2="8" />
<polyline points="11 12 12 12 12 16 13 16" />
</svg>
<div class="flex flex-col justify-center items-center text-center">
<span class="font-bold">{{.Announcement.Title}}</span>
<span class="text-xs lowercase">{{.Announcement.Body}}</span>
</div>
</a>
</div>
<main class="py-4 text-lime-500">
@ -24,44 +26,44 @@
<!-- End Filters -->
<form action="/">
<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
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">
</div>
<div class="flex items-center justify-center pt-2.5 space-x-2">
<span class="flex flex-col items-center justify-center">
<div class="flex justify-center items-center pt-2.5 space-x-2">
<span class="flex flex-col justify-center items-center">
<label class="text-xs uppercase" for="btc">btc</label>
<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">
</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>
<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">
</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>
<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">
</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>
<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">
</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>
<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">
</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>
</div>
</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>
</a>
<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>
</a>
<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>
</a>
</div>
@ -84,8 +86,8 @@
</main>
<!-- Services list -->
<section class="flex items-center justify-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">
<section class="flex justify-center items-center px-3 pb-12 mt-4">
<div class="grid grid-cols-1 gap-3 max-w-6xl md:grid-cols-3 lg:grid-cols-3">
{{range .Services}}
{{partial "partials/service_card" .}}
{{end}}

View File

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

View File

@ -1,39 +1,59 @@
{{/* service_card.html */}}
<a href="/service/{{.Name}}" class="w-full max-w-md">
<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">
<div>
<div class="flex items-center">
<img src="/api/g/picture/{{.ID}}" alt="{{.Name}} logo" class="w-12 h-12 mr-4 rounded-full bg-white/10">
<div class="flex flex-col items-center justify-center">
<div class="text-xl font-bold text-white">
<div class="flex items-center justify-between">
<span class="flex items-center justify-center capitalize">
{{if .Verified}}
<svg xmlns="http://www.w3.org/2000/svg"
class="w-5 h-5 mr-1 text-blue-400/80 discount-check-filled" 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.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>
<div
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">
<img
src="/api/g/picture/{{.ID}}"
alt="{{.Name}} logo"
class="mr-4 w-12 h-12 rounded-full bg-white/10"
/>
<div class="flex flex-col justify-center items-center">
<div class="text-xl font-bold text-white">
<div class="flex justify-between items-center">
<span class="flex justify-center items-center capitalize">
{{if .Verified}}
<svg
xmlns="http://www.w3.org/2000/svg"
class="mr-1 w-5 h-5 text-blue-400/80 discount-check-filled"
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.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}}
<span
class="px-2 py-1 text-xs font-bold uppercase border rounded border-white/30 bg-white/20 text-white/70">
✨ NEW
</span>
{{end}}
<span class='px-2 py-1 text-xs font-bold uppercase border rounded
{{if ge .Score 9}}
{{if isNew .Created}}
<span
class="px-2 py-1 text-xs font-bold uppercase rounded border border-white/30 bg-white/20 text-white/70"
>
✨ NEW
</span>
{{end}}
<span
class="px-2 py-1 text-xs font-bold uppercase border rounded
{{if ge .Score 10}}
bg-green-900 border-green-800
{{else if gt .Score 8}}
bg-green-800 border-green-700
{{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}}
bg-yellow-800 border-yellow-700
{{else if eq .Score 5}}
@ -41,31 +61,35 @@
{{else}}
bg-red-900 border-red-800
{{end}}
text-white/70'>
{{.Score}}
</span>
</div>
<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" .}}
text-white/70"
>
{{.Score}}
</span>
</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>
</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>