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("/css", http.FileServer(http.FS(static.CSS)))
|
||||||
|
mux.Mount("/img", http.FileServer(http.FS(static.Img)))
|
||||||
|
|
||||||
mux.Route("/", func(r chi.Router) {
|
mux.Route("/", func(r chi.Router) {
|
||||||
r.Use(store.Middleware)
|
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
|
//go:embed templates
|
||||||
templates embed.FS
|
templates embed.FS
|
||||||
Templates = template.Must(template.ParseFS(templates, "templates/*"))
|
Templates = template.Must(template.ParseFS(templates, "templates/*"))
|
||||||
|
|
||||||
|
//go:embed img
|
||||||
|
Img embed.FS
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,26 +1,27 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Invitea</title>
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1>Invitea</h1>
|
<h1><a href="/"><img src="/img/invitea.png" alt="invitea logo" width="60"/></a> Invitea</h1>
|
||||||
<p>
|
<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>.
|
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>
|
</p>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
{{ if .isAdmin }}
|
{{ if .isAdmin }}
|
||||||
<p>
|
<p>
|
||||||
Hello, {{ .username }}. <a href="./auth/logout">Log Out</a>
|
Hello, {{ .username }}. <a href="./auth/logout">Log Out</a>
|
||||||
</p>
|
</p>
|
||||||
{{ template "admin.tmpl" . }}
|
{{ template "admin.tmpl" . }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<p>
|
<p>
|
||||||
For non-admins there isn't much to do here. <a href="./auth/login">Log In</a>
|
For non-admins there isn't much to do here. <a href="./auth/login">Log In</a>
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1,11 +1,12 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Invitea</title>
|
<title>Invitea</title>
|
||||||
|
<link rel="icon" href="/img/invitea-full.png" type="image/png">
|
||||||
<link rel="stylesheet" href="/css/simple.css">
|
<link rel="stylesheet" href="/css/simple.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1>Invitea</h1>
|
<h1><a href="/"><img src="/img/invitea.png" alt="invitea logo" width="60"/></a> Invitea</h1>
|
||||||
<p>
|
<p>
|
||||||
Invite Code: <code>{{ .invite.Code }}</code>
|
Invite Code: <code>{{ .invite.Code }}</code>
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in New Issue