all repos — auth-boilerplate @ 52392195bbed8dbcca7e080b528a7b8c798682af

A simple Go web-app boilerplate.

templates/example.html (view raw)

 1<!DOCTYPE html>
 2<html lang="en">
 3
 4<head>
 5    <meta charset="UTF-8">
 6    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 7    <title>Protected page</title>
 8    <link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
 9    <link rel="stylesheet" href="/static/style.css">
10</head>
11
12<body>
13    <h1>Welcome, {{.User.Username}}!</h1> 
14    <p>This page is only accessible by users who have logged in.</p>
15    <a href="/logout">Logout</a>
16</body>
17
18</html>