mirror of
https://codeberg.org/pluja/kycnot.me
synced 2025-02-08 11:25:38 -05:00
✨ feat(attribute.html): add attribute template to display attribute details and services
This commit is contained in:
parent
ae8534a693
commit
89ba93f45c
45
src/web/templates/attribute.html
Normal file
45
src/web/templates/attribute.html
Normal file
@ -0,0 +1,45 @@
|
||||
<section class="pt-14">
|
||||
<div class="flex flex-col items-center justify-center space-x-4">
|
||||
<h1 class="text-2xl font-bold capitalize-first">{{.Attribute.Title}}</h1>
|
||||
{{if eq 0 .Attribute.Rating}}
|
||||
<span class="px-2 py-1 my-1 text-sm font-bold uppercase border rounded-full border-blue-600/40 bg-blue-600/20">
|
||||
info
|
||||
</span>
|
||||
{{end}}
|
||||
{{if eq 1 .Attribute.Rating}}
|
||||
<span class="px-2 py-1 my-1 text-sm font-bold uppercase border rounded-full border-green-600/40 bg-green-600/20">
|
||||
good feature
|
||||
</span>
|
||||
{{end}}
|
||||
{{if eq 2 .Attribute.Rating}}
|
||||
<span class="px-2 py-1 my-1 text-sm font-bold uppercase border rounded-full border-amber-600/40 bg-amber-600/20">
|
||||
warning
|
||||
</span>
|
||||
{{end}}
|
||||
{{if eq 3 .Attribute.Rating}}
|
||||
<span class="px-2 py-1 my-1 text-sm font-bold uppercase border rounded-full border-red-600/40 bg-red-600/20">
|
||||
caution
|
||||
</span>
|
||||
{{end}}
|
||||
<!-- Description -->
|
||||
<div class="flex items-center justify-center p-4">
|
||||
<p class="max-w-lg p-4 text-sm border rounded-lg md:text-md border-white/20 bg-gray-400/10">
|
||||
{{if ne .Attribute.Description ""}}
|
||||
{{.Attribute.Description}}
|
||||
{{else}}
|
||||
This {{.Attribute.Name}} does not have a description.
|
||||
{{end}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Services list -->
|
||||
<section class="flex flex-col items-center justify-center px-1 mt-6">
|
||||
<h2 class="text-lg font-bold uppercase">{{.Attribute.Title}} services:</h2>
|
||||
<div class="flex items-center justify-center max-w-6xl">
|
||||
{{range .Services}}
|
||||
{{template "components/service_card" .}}
|
||||
{{end}}
|
||||
</div>
|
||||
</section>
|
Loading…
x
Reference in New Issue
Block a user