Commit 8d282b65 authored by Ysabella Panghulan's avatar Ysabella Panghulan

edited book details style

parent 6149869f
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
<div class="list"> <div class="list">
<ol> <ol>
{% for object in object_list %} {% for object in object_list %}
<li> <a href="{{ object.get_absolute_url }}">
<a href="{{ object.get_absolute_url }}">{{ object }}</a> <li>{{ object }}</li>
</li> </a>
{% endfor %} {% endfor %}
</ol> </ol>
</div> </div>
......
{%extends 'base.html'%} {%extends 'base.html'%}
{% block stylesheets %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'stylesheets/book_details.css' %}">
{% endblock %}
{% block title %} {{ object.title }} {% endblock %} {% block title %} {{ object.title }} {% endblock %}
...@@ -9,16 +13,17 @@ ...@@ -9,16 +13,17 @@
{% block body %} {% block body %}
<div class="books-content"> <div class="books-content">
{% block content %} {% block content %}
<a href="{{ object.author.get_absolute_url }}">{{ object.author }}</a> <a href="{{ object.author.get_absolute_url }}" class="author">{{ object.author }}</a>
<h3>{{ object.publisher }}</h3> <div class="author-details">
<h3>{{ object.ISBN }}</h3> <h3><span class="label">Publisher</span><br> {{ object.publisher }}</h3>
<h3><span class="label">Year Published</span><br>{{ object.year_published }}</h3>
<h3><span class="label">ISBN</span><br>{{ object.ISBN }}</h3>
</div>
<p>{{ object.blurb }}</p> <p>{{ object.blurb }}</p>
<div class="links"> <div class="links">
<ul> <a href="/home/" class="btn-primary">Home</a>
<li><a href="/home/">Home</a></li> <a href="/books/" class="btn-secondary">Books</a>
<li><a href="/books/">Books</a></li> <a href="/authors/" class="btn-primary">Authors</a>
<li><a href="/authors/">Authors</a></li>
</ul>
</div> </div>
{% endblock %} {% endblock %}
</div> </div>
......
...@@ -17,9 +17,10 @@ ...@@ -17,9 +17,10 @@
<div class="list"> <div class="list">
<ol> <ol>
{% for object in object_list %} {% for object in object_list %}
<li> <a href="{{ object.get_absolute_url }}">
<a href="{{ object.get_absolute_url }}">{{ object.title }}</a> <li> {{ object.title }} </li>
</li> </a>
{% endfor %} {% endfor %}
</ol> </ol>
</div> </div>
......
body {
padding: 3.5rem;
}
h2 {
text-transform: uppercase;
font-size: 30px;
}
.author {
display: block;
text-align: center;
color: black;
}
.author-details {
margin-top: 1.5rem;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
background-color: #b39aff;
border-radius: 0.4rem;
}
h3 {
font-size: medium;
display: block;
text-align: center;
}
@media only screen and (max-width: 760px) {
h3 {
font-size: small;
padding: 0.2rem;
}
}
\ 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