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.
 
 
 
 
 

81 lines
2.2 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">
<script src="/js/code.js"></script>
<script src="/js/jzed.js"></script>
<title>Go Web Dev Starter Kit</title>
<script>
$boot(async () => {
let auth = await GetJson('/api/authcheck');
let opt = $switch('is-authed-switch', auth.is_authed);
if(opt) {
$replace_with($id('login-logout'), opt);
}
});
</script>
</head>
<body id="top" data-testid="{{.PageId}}">
<header>
<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>
<div id="login-logout">
<template id='is-authed-switch'>
<a x-when="true" href="/api/logout">Logout</a>
<a x-when="false" href="/login">Login</a>
</template>
</div>
</nav>
</header>
<main>
<block class="w-full lg:max-w-4xl !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>