A small project that collects various nice things to get started with Go Web Development.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.3 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="author" content="Zed A. Shaw" />
<meta name="description" content="My Go learning project, which is a Twitch support thing." />
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="/style.css">
<!-- all alpine plugins come first to register into alpine:init event -->
<script defer src="/js/alpine-intersect.js"></script>
<!-- then alpine runs, triggers init, and tada you get no-build plugins -->
<script defer src="/js/alpine.js"></script>
<script src="/js/code.js"></script>
<title>Go Web Dev Starter Kit</title>
</head>
<body id="top" data-testid="{{.PageId}}">
<header x-data="{auth: false}"
x-init="auth = await GetJson('/api/authcheck')">
<nav>
<a id="home" href="/">
<svg xmlns="http://www.w3.org/2000/svg"
width="2rem"
height="2rem"
viewBox="0 0 2rem 2rem">
<use href="/icons/home.svg#home" />
</svg>
</a>
<a id="register" href="/register/">
<svg xmlns="http://www.w3.org/2000/svg"
width="2rem"
height="2rem"
viewBox="0 0 2rem 2rem">
<use href="/icons/user-plus.svg#img" />
</svg>
</a>
<template x-if="auth.is_authed">
<a id="logout" href="/api/logout">Logout</a>
</template>
<template x-if="!auth.is_authed">
<a id="login" href="/login/">Login</a>
</template>
</nav>
</header>
<main>
<block class="w-full lg:max-w-4xl center-horizontal !p-1 sm:p-0">
{{embed}}
</block>
</main>
<footer class="sticky-bottom">
<nav>
<a href="/feed/">
<svg xmlns="http://www.w3.org/2000/svg"
width="2rem"
height="2rem"
viewBox="0 0 2rem 2rem">
<use href="/icons/home.svg#home" />
</svg>
</a>
<a href="#top">
<svg xmlns="http://www.w3.org/2000/svg"
width="2rem"
height="2rem"
viewBox="0 0 2rem 2rem">
<use href="/icons/arrow-big-up.svg#img" />
</svg>
</a>
</nav>
</footer>
</body>
</html>