🔧 fix(attribute.html): remove commented out code for attribute title to improve code readability and maintainability

🎨 style(attribute.html): refactor attribute rating display to use emoji icons for better visual representation
This commit is contained in:
pluja 2023-10-31 09:40:14 +01:00
parent aed76f0db3
commit c1a40fc3e5

View File

@ -1,33 +1,35 @@
<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 items-center justify-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 -->
<div class="p-4 m-4
{{if eq 0 .Attribute.Rating}} border rounded-lg border-blue-600/40 bg-blue-600/20 {{end}}
{{if eq 1 .Attribute.Rating}} border rounded-lg border-green-600/40 bg-green-600/20 {{end}}
{{if eq 2 .Attribute.Rating}} border rounded-lg border-yellow-600/40 bg-yellow-600/20 {{end}}
{{if eq 3 .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">
{{if eq 0 .Attribute.Rating}} {{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}} {{end}}
{{if eq 1 .Attribute.Rating}} {{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}} {{end}}
{{if eq 2 .Attribute.Rating}} {{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}} {{end}}
{{if eq 3 .Attribute.Rating}} {{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}} {{end}}
<!-- Description --> {{.Attribute.Title}}
<div class="flex items-center justify-center p-4"> </h3>
<p class="max-w-lg p-4 text-sm border rounded-lg md:text-md border-white/20 bg-gray-400/10">
<p class="max-w-lg">
{{if ne .Attribute.Description ""}} {{if ne .Attribute.Description ""}}
{{.Attribute.Description}} {{.Attribute.Description}}
{{else}} {{else}}
This {{.Attribute.Name}} does not have a description. {{.Attribute.Name}} does not have a description.
{{end}} {{end}}
</p> </p>
</div> </div>