feat: post list and edition redirect

This commit is contained in:
Florian Sylvain
2024-05-17 16:38:41 +02:00
parent 24eefb743b
commit 900ad3e8b8
2062 changed files with 7238 additions and 24 deletions
@@ -3,7 +3,6 @@
<head>
<title>GoCMS | Create post</title>
{{.Head}}
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<style>
form {
max-width: 24rem;
@@ -17,8 +16,10 @@
<p>Create a new post</p>
<form action="create" method="post" class="d-flex align-items-center flex-column gap-3" id="createPostForm">
<div class="form-floating w-100">
<input type="text" class="form-control" id="name" name="name" placeholder="Chose the post name">
<label for="name">Name</label>
<input type="text" class="form-control {{ if .PageError.IsError }} is-invalid {{ end }}" id="name"
name="name" placeholder="Chose the post name" value="{{ .Name }}">
<label for="name">Name</label>
<div class="invalid-feedback">{{ .PageError.Message }}</div>
</div>
<button id="createPostButton" class="btn btn-primary w-100" disabled type="submit">
<span class="createPostFormButtonLoading visually-hidden spinner-border spinner-border-sm"