83 lines
4.9 KiB
HTML
83 lines
4.9 KiB
HTML
{{ template "header.html" . }}
|
|
|
|
<div class="bg-gray-100 dark:bg-gray-800 py-8">
|
|
<form action="/cart" method="POST">
|
|
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
<div class="flex flex-col md:flex-row -mx-4">
|
|
<div class="md:flex-1 px-4">
|
|
<div class="rounded-lg bg-gray-300 dark:bg-gray-700 mb-4">
|
|
<img class="w-full h-full object-cover" src="/{{ .data.shopItem.Image}}" alt="Product Image">
|
|
</div>
|
|
<div class="flex -mx-2 mb-4">
|
|
<div class="w-1/3 px-2">
|
|
<button type="button" class="w-full bg-blue-900 dark:bg-gray-600 text-white py-2 px-4 rounded-lg font-bold hover:bg-gray-800 dark:hover:bg-gray-700"><a href="/{{ .data.shopItem.Pdf }}">View</a></button>
|
|
</div>
|
|
{{ if .loggedIn }}
|
|
<input type="hidden" id="{{ .data.shopItem.ID}}" name="ShopItemId" value="{{ .data.shopItem.ID }}">
|
|
<div class="w-1/3 px-2">
|
|
<button type="submit" class="w-full bg-gray-900 dark:bg-gray-600 text-white py-2 px-4 rounded-lg font-bold hover:bg-gray-800 dark:hover:bg-gray-700">Add to Cart</button>
|
|
</div>
|
|
|
|
<div class="w-1/3 px-2">
|
|
<button type="button" class="w-full bg-blue-900 dark:bg-gray-600 text-white py-2 px-4 rounded-lg font-bold hover:bg-gray-800 dark:hover:bg-gray-700"><a href="{{ .data.shopItem.ID }}/edit">Edit</a></button>
|
|
</div>
|
|
|
|
<div class="w-1/3 px-2">
|
|
<button type="button" class="w-full bg-red-900 dark:bg-red-600 text-white py-2 px-4 rounded-lg font-bold hover:bg-gray-800 dark:hover:bg-gray-700"><a href="{{ .data.shopItem.ID }}/delete">Delete</a></button>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
<div class="md:flex-1 px-4">
|
|
<h2 class="text-2xl font-bold text-gray-800 dark:text-white mb-2">{{ .data.shopItem.Name }}</h2>
|
|
<p class="text-gray-600 dark:text-gray-300 text-sm mb-4">
|
|
{{ .data.shopItem.Abstract }}
|
|
</p>
|
|
|
|
{{ if .loggedIn }}
|
|
<div class="flex mb-4">
|
|
<label for="ItemVariantId" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"></label>
|
|
<select name="ItemVariantId" id="ItemVariantId" required class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
|
<option selected value="">Choose a variant</option>
|
|
{{ range .data.shopItem.Variants }}
|
|
<option value="{{ .ID }}">{{ .Name }} - {{ .Price }}€</option>
|
|
{{ end }}
|
|
</select>
|
|
</div>
|
|
{{ end }}
|
|
|
|
<div class="flex mb-4">
|
|
<div class="mr-4">
|
|
<span class="font-bold text-gray-700 dark:text-gray-300">Tags:</span>
|
|
<p class="mt-1 text-sm text-gray-500">
|
|
{{ range .data.shopItem.Tags }}
|
|
<a href="/tags/{{ .ID }}"><span class="bg-{{ .Color }}-100 text-{{ .Color }}-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-{{ .Color }}-900 dark:text-{{ .Color }}-300">{{ .Name }}</span></a>
|
|
{{ end }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<!--
|
|
<div class="mb-4">
|
|
<span class="font-bold text-gray-700 dark:text-gray-300">Select Size:</span>
|
|
<div class="flex items-center mt-2">
|
|
<button class="bg-gray-300 dark:bg-gray-700 text-gray-700 dark:text-white py-2 px-4 rounded-full font-bold mr-2 hover:bg-gray-400 dark:hover:bg-gray-600">Black/White</button>
|
|
<button class="bg-gray-300 dark:bg-gray-700 text-gray-700 dark:text-white py-2 px-4 rounded-full font-bold mr-2 hover:bg-gray-400 dark:hover:bg-gray-600">Colored</button>
|
|
<button class="bg-gray-300 dark:bg-gray-700 text-gray-700 dark:text-white py-2 px-4 rounded-full font-bold mr-2 hover:bg-gray-400 dark:hover:bg-gray-600">Colored Covering Page</button>
|
|
</div>
|
|
</div>
|
|
-->
|
|
<div>
|
|
<span class="font-bold text-gray-700 dark:text-gray-300">Product Description:</span>
|
|
<p class="text-gray-600 dark:text-gray-300 text-sm mt-2">
|
|
{{ .data.shopItem.Description }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
|
|
{{ template "footer.html" . }}
|