Started working on the frontend
- Added the new post frontend - Hooked up publishing of posts to the site publisher - Added an site exporter as a publishing target
This commit is contained in:
parent
a59008b3e8
commit
e77cac2fd5
40 changed files with 1427 additions and 84 deletions
20
views/_common/nav.html
Normal file
20
views/_common/nav.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#">Weiro</a>
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="#">Posts</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="d-flex" role="search">
|
||||
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"/>
|
||||
<button class="btn btn-outline-success" type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
14
views/layouts/main.html
Normal file
14
views/layouts/main.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/static/assets/main.css">
|
||||
</head>
|
||||
<body class="min-vh-100 d-flex flex-column">
|
||||
{{ template "_common/nav" . }}
|
||||
|
||||
{{ embed }}
|
||||
</body>
|
||||
</html>
|
||||
1
views/posts/index.html
Normal file
1
views/posts/index.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<h1>Posts go here</h1>
|
||||
14
views/posts/new.html
Normal file
14
views/posts/new.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<main class="flex-grow-1 position-relative">
|
||||
<form action="/sites/{{.site.ID}}/posts" method="post" class="container-fluid post-form p-2">
|
||||
<input type="hidden" name="guid" value="{{ .guid }}">
|
||||
<div class="mb-2">
|
||||
<input type="text" name="title" class="form-control" placeholder="Title">
|
||||
</div>
|
||||
<div>
|
||||
<textarea name="body" class="form-control" rows="3"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" class="btn btn-primary mt-2" value="Publish">
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
Loading…
Add table
Add a link
Reference in a new issue