Commit 511c3046 authored by Jayson Lim's avatar Jayson Lim

Finalized html templates following the specifications

parent 5bffd121
......@@ -2,26 +2,33 @@
{% load static %}
{% block content %}
<style>
h3 {
border-bottom: 2px solid black;
}
</style>
<h3>{{ object }}</h3>
<h1>{{ object }}</h1>
<ul>
<li><h3>{{ object.age }}</h3></li>
<li><h3>{{ object.nationality }}</h3></li>
<li><h3>{{ object.bio }}</h3></li>
</ul>
<p style="font-size: 20px">{{ object.age }}</p>
<p style="font-size: 20px">{{ object.nationality }}</p>
<p style="font-size: 20px">{{ object.bio }}</p>
<h1>Books by {{ object }} I love:</h1>
<ul>
{% for book in books %}
<li>
<h3>
<a href="{{ book.get_absolute_url }}">
<a href="{{ book.get_absolute_url }}" style="font-size: 20px">
{{ book.title }}
</a>
</h3>
</li>
{% endfor %}
</ul>
<div style="display: flex; justify-content: space-between;">
<a href="{% url 'bookshelf:home' %}">Home</a>
<a href="{% url 'bookshelf:books' %}">Books</a>
<a href="{% url 'bookshelf:authors' %}">Authors</a>
</div>
{% endblock %}
\ No newline at end of file
......@@ -2,17 +2,24 @@
{% load static %}
{% block content %}
<style>
h3 {
border-bottom: 2px solid black;
}
</style>
<h3>My Favourite Authors</h3>
<h1>Jayson's Favorite Authors:</h1>
<ul>
{% for object in object_list %}
<li>
<h3>
<a href="{{ object.get_absolute_url }}">
<a href="{{ object.get_absolute_url }}" style="font-size: 20px">
{{ object }}
</a>
</h3>
</a>
</li>
{% endfor %}
</ul>
<div style="display: flex; justify-content: space-between;">
<a href="{% url 'bookshelf:home' %}">Home</a>
<a href="{% url 'bookshelf:books' %}">Books</a>
</div>
{% endblock %}
\ No newline at end of file
......@@ -2,22 +2,22 @@
{% load static %}
{% block content %}
<style>
h3 {
border-bottom: 2px solid black;
}
</style>
<h3>{{ object.title }}</h3>
<h1>{{ object.title }}</h1>
<ul>
<li>
<h3>
<a href="{{ author.get_absolute_url }}">{{ author }}</a>
</h3>
</li>
<li><h3>{{ object.publisher }}</h3></li>
<li><h3>{{ object.year_published }}</h3></li>
<li><h3>{{ object.ISBN }}</h3></li>
<li><h3>{{ object.blurb }}</h3></li>
</ul>
<a href="{{ author.get_absolute_url }}" style="font-size: 24px">{{ author }}</a>
<p style="font-size: 20px">{{ object.publisher }}</p>
<p style="font-size: 20px">{{ object.year_published }}</p>
<p style="font-size: 20px">{{ object.ISBN }}</p>
<p style="font-size: 20px">{{ object.blurb }}</p>
<div style="display: flex; justify-content: space-between;">
<a href="{% url 'bookshelf:home' %}">Home</a>
<a href="{% url 'bookshelf:books' %}">Books</a>
<a href="{% url 'bookshelf:authors' %}">Authors</a>
</div>
{% endblock %}
\ No newline at end of file
......@@ -2,16 +2,19 @@
{% load static %}
{% block content %}
<h3>My Favourite Books</h3>
<style>
h3 {
border-bottom: 2px solid black;
}
</style>
<h3>My Favourite Books & Authors</h3>
<h1>Jayson's Favorite Books:</h1>
<ul>
{% for object in object_list %}
<li>
<h3>
<a href="{{ object.get_absolute_url }}">
{{ object.title }}
</a>
</h3>
<a href="{{ object.get_absolute_url }}" style="font-size: 20px">
{{ object.title }}
</a>
</li>
{% endfor %}
</ul>
......
......@@ -11,7 +11,7 @@
<h3>My Favourite Books & Authors</h3>
<h1>Welcome to Jayson's Database of Favorite Books and Authors!</h1>
<h2>Genres</h2>
<p>I absolutely love to read and I can't get enough of four genres in particular:
<p style="font-size: 20px">I absolutely love to read and I can't get enough of four genres in particular:
fiction, drama, thriller, and action-adventure. Fiction is just awesome because
it's so broad and diverse. I can explore all kinds of cool worlds and stories,
whether they're about love, sci-fi, or classic literature. Drama is another one
......@@ -20,7 +20,7 @@
whether they involve crime or psychological plot-twists. And lastly, I love diving
into worlds filled with action-adventure, from spy stories to crazy fantasy realms.</p>
<h2>Favorite Authors</h2>
<p>I enjoy the works of: George R.R. Martin, Robert Ludlum, J.K. Rowling, Dan Brown,
<p style="font-size: 20px">I enjoy the works of: George R.R. Martin, Robert Ludlum, J.K. Rowling, Dan Brown,
John Grisham, Tom Clancy, and J.R.R. Tolkien.</p>
<div style="display: flex; justify-content: space-between;">
<a href="{% url 'bookshelf:books' %}">Books</a>
......
......@@ -15,12 +15,6 @@ def home_view(request):
class BooksListView(ListView):
model = Books
template_name = 'bookshelf/books.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['home_url'] = reverse('bookshelf:home')
context['authors_url'] = reverse('bookshelf:authors')
return context
class AuthorsListView(ListView):
model = Author
......
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