Commit f95cb2df authored by Javi Ng's avatar Javi Ng

finalized templates, added css for all input fields

parent 8128bc67
{% extends 'base.html' %} {% extends 'base.html' %}
{% block title %} Add New Author {% endblock %} {% block title %} Add New Author {% endblock %}
{% block content %} {% block content %}
<form method="POST"> <form method="POST">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }}
{% for field in form %}
{{field.label}}: {{ field }} <br> <br>
{% endfor %}
<button type="submit">Submit</button> <button type="submit">Submit</button>
</form> </form>
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
{% block content %} {% block content %}
<form method="POST"> <form method="POST">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }}
{% for field in form %}
{{field.label}}: {{ field }} <br> <br>
{% endfor %}
<button type="submit">Submit</button> <button type="submit">Submit</button>
</form> </form>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<b>Publisher: </b>{{ object.publisher }} <br> <b>Publisher: </b>{{ object.publisher }} <br>
<b>Published </b>{{ object.year_published}} <br> <br> <b>Published </b>{{ object.year_published}} <br> <br>
<b>ISBN</b> {{ object.ISBN }} <br> <br> <b>ISBN</b> {{ object.ISBN }} <br> <br>
<b>Blurb: </b>{{ object.blurb }} <br> <b>Blurb: </b>{{ object.blurb }} <br> <br>
<form action="./edit"> <form action="./edit">
<button type="submit">Edit Book</button> <button type="submit">Edit Book</button>
</form> </form>
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
{% block content %} {% block content %}
<form method="POST"> <form method="POST">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }}
{% for field in form %}
{{field.label}}: {{ field }} <br> <br>
{% endfor %}
<button type="submit">Submit</button> <button type="submit">Submit</button>
</form> </form>
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
{% block content %} {% block content %}
<form method="POST"> <form method="POST">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }}
{% for field in form %}
{{field.label}}: {{ field }} <br> <br>
{% endfor %}
<button type="submit">Submit</button> <button type="submit">Submit</button>
</form> </form>
......
...@@ -30,8 +30,8 @@ body { ...@@ -30,8 +30,8 @@ body {
background-repeat: no-repeat; background-repeat: no-repeat;
} }
/* */ /* button styling */
button { button[type=submit] {
transition-duration: 0.4s; transition-duration: 0.4s;
border: 2px solid black; border: 2px solid black;
padding: 8px 16px; padding: 8px 16px;
...@@ -39,6 +39,17 @@ button { ...@@ -39,6 +39,17 @@ button {
text-align: center; text-align: center;
} }
button:hover { button[type=submit]:hover {
background-color: #B99436; background-color: #B99436;
}
/* fields styling */
input[type=text], input[type=number], select, textarea {
border: 2px solid rgb(96, 87, 26);
border-radius: 4px;
background-color: rgb(238, 216, 73)
}
input[type=text]:focus, input[type=number]:focus, select:focus, textarea:focus {
background-color: rgb(185, 162, 9)
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment