parent
d17d17f641
commit
36a3521a7e
|
@ -67,6 +67,7 @@ func New(cfg Config) *chi.Mux {
|
|||
})
|
||||
|
||||
mux.Mount("/css", http.FileServer(http.FS(static.CSS)))
|
||||
mux.Mount("/img", http.FileServer(http.FS(static.Img)))
|
||||
|
||||
mux.Route("/", func(r chi.Router) {
|
||||
r.Use(store.Middleware)
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
|
@ -12,4 +12,7 @@ var (
|
|||
//go:embed templates
|
||||
templates embed.FS
|
||||
Templates = template.Must(template.ParseFS(templates, "templates/*"))
|
||||
|
||||
//go:embed img
|
||||
Img embed.FS
|
||||
)
|
||||
|
|
|
@ -1,26 +1,27 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Invitea</title>
|
||||
<link rel="stylesheet" href="./css/simple.css">
|
||||
<link rel="icon" href="/img/invitea-full.png" type="image/png">
|
||||
<link rel="stylesheet" href="/css/simple.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Invitea</h1>
|
||||
<p>
|
||||
Welcome to the home page of <a href="https://git.jojodev.com/jolheiser/invitea">Invitea</a>, an invite link generator for <a href="https://gitea.io">Gitea</a>.
|
||||
</p>
|
||||
<h1><a href="/"><img src="/img/invitea.png" alt="invitea logo" width="60"/></a> Invitea</h1>
|
||||
<p>
|
||||
Welcome to the home page of <a href="https://git.jojodev.com/jolheiser/invitea">Invitea</a>, an invite link generator for <a href="https://gitea.io">Gitea</a>.
|
||||
</p>
|
||||
</header>
|
||||
<main>
|
||||
{{ if .isAdmin }}
|
||||
<p>
|
||||
Hello, {{ .username }}. <a href="./auth/logout">Log Out</a>
|
||||
</p>
|
||||
{{ template "admin.tmpl" . }}
|
||||
{{ else }}
|
||||
<p>
|
||||
For non-admins there isn't much to do here. <a href="./auth/login">Log In</a>
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ if .isAdmin }}
|
||||
<p>
|
||||
Hello, {{ .username }}. <a href="./auth/logout">Log Out</a>
|
||||
</p>
|
||||
{{ template "admin.tmpl" . }}
|
||||
{{ else }}
|
||||
<p>
|
||||
For non-admins there isn't much to do here. <a href="./auth/login">Log In</a>
|
||||
</p>
|
||||
{{ end }}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
|
@ -1,11 +1,12 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Invitea</title>
|
||||
<link rel="icon" href="/img/invitea-full.png" type="image/png">
|
||||
<link rel="stylesheet" href="/css/simple.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Invitea</h1>
|
||||
<h1><a href="/"><img src="/img/invitea.png" alt="invitea logo" width="60"/></a> Invitea</h1>
|
||||
<p>
|
||||
Invite Code: <code>{{ .invite.Code }}</code>
|
||||
</p>
|
||||
|
|
Loading…
Reference in New Issue