aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-05-02 22:11:05 +0200
committerMateja <mail@matejamaric.com>2021-05-02 22:11:05 +0200
commitc4663dc58c4bbae758ac3766e6a801a3d7180b33 (patch)
tree91fb84516fa0534cd93efb5d52d2f8d63d9b0d00 /views
parent7483bb5da6b22b94045a309d2ece2ed80ce48dc2 (diff)
downloadnode-playground-c4663dc58c4bbae758ac3766e6a801a3d7180b33.tar.gz
node-playground-c4663dc58c4bbae758ac3766e6a801a3d7180b33.zip
Setting up html for pages and form body parser.
Diffstat (limited to 'views')
-rw-r--r--views/home.handlebars14
-rw-r--r--views/new-post.handlebars13
2 files changed, 25 insertions, 2 deletions
diff --git a/views/home.handlebars b/views/home.handlebars
index c280c9d..02f31de 100644
--- a/views/home.handlebars
+++ b/views/home.handlebars
@@ -1,3 +1,15 @@
<div class="container">
- <h1>{{ title }}</h1>
+ <h1 class="mt-2">Posts</h1>
+
+ <div class="card">
+ <div class="card-header">
+ Lorem ipsum dolor sit amet
+ </div>
+ <div class="card-body">
+ <div class="card-text">
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+ </div>
+ </div>
+ </div>
+
</div>
diff --git a/views/new-post.handlebars b/views/new-post.handlebars
index c280c9d..19984ee 100644
--- a/views/new-post.handlebars
+++ b/views/new-post.handlebars
@@ -1,3 +1,14 @@
<div class="container">
- <h1>{{ title }}</h1>
+ <h1 class="mt-2">{{ title }}</h1>
+ <form action="/new-post" method="post" accept-charset="utf-8">
+ <div class="mb-3">
+ <label for="post_title" class="form-label">Post title:</label>
+ <input name="title" type="text" class="form-control" id="post_title" required>
+ </div>
+ <div class="mb-3">
+ <label for="post_text" class="form-label">Post text:</label>
+ <textarea name="text" class="form-control" id="post_text" rows="3" required></textarea>
+ </div>
+ <button type="submit" class="btn">Submit</button>
+ </form>
</div>