feat: add images

Signed-off-by: jolheiser <john.olheiser@gmail.com>
main
jolheiser 2023-03-04 00:29:56 -06:00
parent d17d17f641
commit 36a3521a7e
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
6 changed files with 22 additions and 16 deletions

View File

@ -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

View File

@ -12,4 +12,7 @@ var (
//go:embed templates
templates embed.FS
Templates = template.Must(template.ParseFS(templates, "templates/*"))
//go:embed img
Img embed.FS
)

View File

@ -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>

View File

@ -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>