Initial commit

This commit is contained in:
2023-09-18 00:26:42 +01:00
commit 1fd025e6d6
17 changed files with 458 additions and 0 deletions

15
views/404.html Normal file
View File

@@ -0,0 +1,15 @@
{{ define "mainbody" }}
<div class="page404">
<div>
<h1>
404
</h1>
<h2>
Page Not found
</h2>
<div class="description">
The page you were looking for does not exist
</div>
</div>
</div>
{{ end }}

6
views/500.html Normal file
View File

@@ -0,0 +1,6 @@
{{ define "head" }}
<title>
Error Page
</title>
{{ end }}
{{ define "body" }}Heyyyyyy Err {{ end }}

19
views/html.html Normal file
View File

@@ -0,0 +1,19 @@
{{ if .Full }}
<body>
{{ block "body" . }}
{{ block "header.html" . }} {{end}}
<div class="app">
{{ block "mainbody" . }} {{end}}
</div>
{{end}}
</body>
{{ else }}
{{if .App }}
<div class="app">
{{ block "mainbody" . }} {{end}}
</div>
{{ else }}
{{ block "mainbody" . }} {{end}}
{{end}}
{{end}}

6
views/index.html Normal file
View File

@@ -0,0 +1,6 @@
{{ define "title"}} Home : AI Stuff {{ end }}
{{ define "mainbody" }}
hey bitches
{{ end }}

26
views/layout.html Normal file
View File

@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
{{ block "header" . }}
<title>
{{ block "title" . }}
Ai stuff
{{ end }}
</title>
{{ end }}
<link rel="stylesheet" href="/styles/main.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=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
{{ block "other_imports" . }} {{end}}
</head>
<body>
<script src="https://unpkg.com/htmx.org@1.9.5"></script>
{{ block "body" . }}
{{ block "header.html" . }} {{end}}
<div class="app">
{{ block "mainbody" . }} {{end}}
</div>
{{end}}
</body>
</html>

15
views/login.html Normal file
View File

@@ -0,0 +1,15 @@
{{ define "title"}} Home : AI Stuff {{ end }}
{{ define "mainbody" }}
<form>
<div>
<label for="email">Email</label>
<input name="email" required />
</div>
<div>
<label for="password">Password</label>
<input name="password" required type="password" />
</div>
</form>
{{ end }}

View File

@@ -0,0 +1,10 @@
<nav>
<ul>
<div class="expand"></div>
<li>
<a hx-get="/login" hx-headers='{"REQUEST-TYPE": "html"}' hx-push-url="true" hx-swap="outerHTML" hx-target=".app">
Login
</a>
</li>
</ul>
</nav>

57
views/styles/main.css Normal file
View File

@@ -0,0 +1,57 @@
* {
box-sizing: border-box;
font-family: 'Roboto', sans-serif;
}
body {
margin: 0;
padding: 0;
}
/* Nav bar */
nav {
background: #ececec;
margin: 0;
box-shadow: 0 0 8px 1px #888888ef;
height: 60px;
}
nav ul {
display: flex;
margin: 0;
padding: 20px 40px;
}
nav ul li {
list-style: none;
}
nav ul .expand {
flex-grow: 1
}
nav ul li a {
text-decoration: none;
color: black;
}
/* 404 page */
.page404 {
display: grid;
place-items: center;
height: calc(100vh - 60px);
text-align: center;
}
.page404 h1 {
font-size: 10em;
margin: 0;
}
.page404 h2 {
font-size: 5em;
margin: 0;
margin-bottom: 0.3em;
}
.page404 div.description {
font-size: 1.5em;
}