From 4b29dfa85dd04fdc3e1e39f6ee6be79647357cd9 Mon Sep 17 00:00:00 2001 From: swag Date: Sat, 20 May 2023 01:54:12 -0400 Subject: [PATCH] Moar CSS for forms --- assets/css/post_text.css | 20 ++++++++++++++++++++ templates/thread/create.html.ep | 10 +++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/assets/css/post_text.css b/assets/css/post_text.css index 4c9da88..95c3853 100644 --- a/assets/css/post_text.css +++ b/assets/css/post_text.css @@ -89,6 +89,26 @@ pre > code { padding: 0.5em 1em; } +.form-body { + background-color: var(--light-warm-gray); + border: outset var(--light-warm-gray); + padding: 0.5em 1em; + display: flex; + flex-flow: column wrap; + gap: 1em; +} + +.form-field { + display: flex; + flex-flow: column wrap; +} + +.form-button { + border: outset var(--light-blue); + background-color: var(--light-blue); + padding: 0.5em 0; +} + .field-with-info { border-style: solid; border-color: var(--highlight-green); diff --git a/templates/thread/create.html.ep b/templates/thread/create.html.ep index ecc20b0..36c0e08 100644 --- a/templates/thread/create.html.ep +++ b/templates/thread/create.html.ep @@ -1,8 +1,8 @@ % layout 'default'; % title 'New Thread';

<%= title %>

-
-
+ +
<%= label_for author => 'Author' %> <%= text_field author => session->{'author'}, ( id => 'author', @@ -14,7 +14,7 @@

Invalid author: 1 to 63 characters please.

<% } =%>
-
+
<%= label_for title => 'Title' %> <%= text_field title => ( id => 'title', @@ -27,7 +27,7 @@

Invalid title: 1 to 127 characters please.

<% } =%>
-
+
<%= label_for body => 'Text' %> <%= text_area body => ( id => 'body', @@ -40,5 +40,5 @@

Invalid text: Up to 4,000 characters only.

<% } =%>
- <%= submit_button 'Post', class => 'field__submit' %> + <%= submit_button 'Post', class => 'form-button' %>