2024-09-07 17:18:20 +02:00
|
|
|
<div class="grid grid-cox:wls-1 overflow-hidden rounded-xl grid-cols-2 gap-4">
|
2024-08-22 23:11:23 +02:00
|
|
|
|
2024-09-07 17:18:20 +02:00
|
|
|
{{range .About}}
|
|
|
|
<button onclick="document.getElementById('{{.Id}}').showModal()"
|
|
|
|
class="card posts-item bg-base-100 border-[2px] border-base-300 hover:bg-base-300 shadow-xl cursor-pointer justify-center items-center py-8">
|
|
|
|
<span class="w-12 h-12">
|
|
|
|
{{icon .Icon}}
|
|
|
|
</span>
|
|
|
|
{{.Id}}
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<dialog id="{{.Id}}" class="modal">
|
|
|
|
<div class="modal-box">
|
|
|
|
{{if (ne .Value "")}}
|
|
|
|
<div class="join w-full">
|
|
|
|
<input id="{{.Id}}" tabindex="-1" value="{{.Value}}" class="input input-bordered join-item w-full">
|
|
|
|
<button onclick="copyToClipBoard('{{.Id}}')" class="btn join-item">Copy</button>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
<a href="{{safeurl .Url}}" class='w-full btn {{if (ne .Value "")}}mt-2{{end}}'>Open</a>
|
2024-08-22 23:11:23 +02:00
|
|
|
</div>
|
2024-09-07 17:18:20 +02:00
|
|
|
<form method="dialog" class="modal-backdrop">
|
|
|
|
<button>close</button>
|
|
|
|
</form>
|
|
|
|
</dialog>
|
|
|
|
{{end}}
|
|
|
|
|
2024-08-22 23:11:23 +02:00
|
|
|
</div>
|
2024-09-07 17:18:20 +02:00
|
|
|
|
|
|
|
<script>
|
|
|
|
function copyToClipBoard(id) {
|
|
|
|
const input = document.querySelector('input#' + id)
|
|
|
|
input.select();
|
|
|
|
document.execCommand('copy');
|
|
|
|
}
|
|
|
|
</script>
|