Commit f20e3f0b authored by Julia Anishka's avatar Julia Anishka

applied basic CSS styling to new pages

parent 4f8b1371
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
<form method='POST'> <form method='POST'>
{% csrf_token %} {% csrf_token %}
{{ form }} {{ form }}
<input type='Submit' value='Add Author'> <div class='btns'>
<input type='Submit' value='Add Author' class='btn'>
</div>
</form> </form>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<form method='POST'> <form method='POST'>
{% csrf_token %} {% csrf_token %}
{{ form }} {{ form }}
<input type='Submit' value='Add Book'>
<div class='btns'>
<input type='Submit' value='Add Book' class='btn'>
</div>
</form> </form>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<h4> Age: {{ object.age }} </h4> <h4> Age: {{ object.age }} </h4>
<h4> Nationality: {{ object.nationality }} </h4> <h4> Nationality: {{ object.nationality }} </h4>
<h4> Biography: {{ object.bio }} </h4> <h4> Biography: {{ object.bio }} </h4>
<a href="{{ object.get_absolute_url }}edit" class="btn"> Edit Author </a>
<div> <div>
<h3> Books by {{ object }} I love: </h3> <h3> Books by {{ object }} I love: </h3>
</div> </div>
...@@ -25,7 +26,6 @@ ...@@ -25,7 +26,6 @@
{% endfor %} {% endfor %}
</ul> </ul>
<div class="btns"> <div class="btns">
<a href="{{ object.get_absolute_url }}edit" class="btn"> Edit Author </a>
<a href="/home/" class="btn"> Home </a> <a href="/home/" class="btn"> Home </a>
<a href="/books/" class="btn"> Books </a> <a href="/books/" class="btn"> Books </a>
<a href="/authors/" class="btn"> Authors </a> <a href="/authors/" class="btn"> Authors </a>
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
<h4> Year published: {{ object.year_published }} </h4> <h4> Year published: {{ object.year_published }} </h4>
<h4> ISBN: {{ object.ISBN }} </h4> <h4> ISBN: {{ object.ISBN }} </h4>
<p> Blurb: {{ object.blurb }} </p> <p> Blurb: {{ object.blurb }} </p>
<div class="btns">
<a href="{{ object.get_absolute_url }}edit" class="btn"> Edit Book </a> <a href="{{ object.get_absolute_url }}edit" class="btn"> Edit Book </a>
<div class="btns">
<a href="/home/" class="btn"> Home </a> <a href="/home/" class="btn"> Home </a>
<a href="/books/" class="btn"> Books </a> <a href="/books/" class="btn"> Books </a>
<a href="/authors/" class="btn"> Authors </a> <a href="/authors/" class="btn"> Authors </a>
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% block title %} Edit Author {% endblock %} {% block title %} Edit Author {% endblock %}
{% block header %}
<div class="title">
<h1> {{ object }} </h1>
</div>
{% endblock %}
{% block body %} {% block body %}
<div class="form">
<form method='POST'> <form method='POST'>
{% csrf_token %} {% csrf_token %}
{{ form }} {{ form }}
<input type='Submit' value='Save Changes'> <div class='btns'>
</form> <input type='Submit' value='Save Changes' class='btn'>
</div>
</form></div>
{% endblock %} {% endblock %}
\ No newline at end of file
{% extends 'base.html' %} {% extends 'base.html' %}
{% block title %} Edit Book {% endblock %} {% block title %} Edit Book {% endblock %}
{% block header %}
<div class="title">
<h1> {{ object.title }} </h1>
</div>
{% endblock %}
{% block body %} {% block body %}
<form method='POST'> <form method='POST'>
{% csrf_token %} {% csrf_token %}
{{ form }} {{ form }}
<input type='Submit' value='Save Changes'> <div class='btns'>
<input type='Submit' value='Save Changes' class='btn'>
</div>
</form> </form>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
<div class="btns"> <div class="btns">
<a href="/books/" class="btn"> Books </a> <a href="/books/" class="btn"> Books </a>
<a href="/authors/" class="btn"> Authors </a> <a href="/authors/" class="btn"> Authors </a>
</div>
<div class="btns">
<a href="books/add" class="btn"> Add Book </a> <a href="books/add" class="btn"> Add Book </a>
<a href="authors/add" class="btn"> Add Author </a> <a href="authors/add" class="btn"> Add Author </a>
</div> </div>
......
...@@ -37,3 +37,16 @@ body { ...@@ -37,3 +37,16 @@ body {
display: flex; display: flex;
text-align: center; text-align: center;
} }
form [type="text"],
form [type="number"],
form select,
form textarea {
padding: 10px;
border-radius: 8px;
display: block;
}
form label {
display: block;
}
\ 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