summaryrefslogtreecommitdiff
path: root/index.templ
diff options
context:
space:
mode:
Diffstat (limited to 'index.templ')
-rw-r--r--index.templ16
1 files changed, 9 insertions, 7 deletions
diff --git a/index.templ b/index.templ
index 23c389a..6df889f 100644
--- a/index.templ
+++ b/index.templ
@@ -14,11 +14,16 @@ templ index(ps []Post, tz *time.Location) {
<script src="/static/htmx.min.js"></script>
<link rel="preload" href="/static/style.css" as="style"/>
<link rel="stylesheet" href="/static/style.css"/>
+ <link rel="preconnect" href="https://fonts.googleapis.com"/>
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
+ <link href="https://fonts.googleapis.com/css2?family=Jacquard+12&display=swap" rel="stylesheet"/>
</head>
<body>
<div id="container">
<div id="header">
- <a id="uploadlink" href="/upload"><h2>Tinygram</h2></a>
+ <a id="uploadlink" href="/upload">
+ <h1>Tinygram</h1>
+ </a>
</div>
<div id="posts">
@posts(ps, tz)
@@ -40,11 +45,7 @@ templ loginPage(csrfToken string) {
<link rel="stylesheet" href="/static/style.css"/>
</head>
<body>
- <form
- class="login"
- hx-encoding="multipart/form-data"
- hx-post="/login"
- >
+ <form class="login" hx-encoding="multipart/form-data" hx-post="/login">
<input type="password" name="password"/>
<input type="hidden" name="_csrf" value={ csrfToken }/>
<button>
@@ -103,7 +104,8 @@ templ posts(posts []Post, tz *time.Location) {
if len(posts) > 0 {
<div
style="min-height:1px"
- hx-get={ fmt.Sprintf("/posts?after=%v", url.QueryEscape(posts[len(posts)-1].CreatedAt.Format(time.RFC3339))) }
+ hx-get={ fmt.Sprintf("/posts?after=%v",
+ url.QueryEscape(posts[len(posts)-1].CreatedAt.Format(time.RFC3339))) }
hx-target="#posts"
hx-trigger="revealed"
hx-swap="beforeend"