LinkList/backend/templates/template.html

49 lines
1.6 KiB
HTML

<html>
<head>
<meta name="viewport" content="width=device-width"/>
<meta charSet="utf-8"/>
<title>@uwcsclub | LinkList</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Karla:wght@700&display=swap" rel="stylesheet">
<link href="index.out.css" rel="stylesheet">
<script>
const handleClick = function(name, url) {
fetch("api/clicks", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ name, url }),
})
return true;
}
</script>
</head>
<body>
<div id="__next">
<div class="text-s flex flex-col items-center w-full top-6 font-karla">
<img class="mb-3" src="images/csc-logo.png" alt="CSC Logo" width="100px" />
<h1 class="font-bold">@uwcsclub</h1>
<ul class="flex flex-col my-6 w-full">
{% for link in links_list %}
<li class="w-full flex justify-center">
<a
class="btn bg-gray-450 p-3 text-white font-karla font-bold text-center self-center my-1.5
hover:bg-white hover:text-black border-2 border-gray-800 transition duration-300 ease-in-out
w-11/12 sm:w-4/12 min-h-link"
href="{{ link['url'] }}"
target="_blank"
rel="noreferrer"
onclick="return handleClick(&quot;{{ link['name'] }}&quot;, &quot;{{ link['url'] }}&quot;)"
>
{{ link["name"] }}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</body>
</html>