Commit 6149869f authored by Ysabella Panghulan's avatar Ysabella Panghulan

edited list style

parent 87f113eb
{%extends 'base.html'%} {%extends 'base.html'%}
{% block stylesheets %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'stylesheets/list.css' %}">
{% endblock %}
{% block title %} My Favorite Authors {% endblock %} {% block title %} My Favorite Authors {% endblock %}
{% block header %} {% block header %}
...@@ -10,19 +13,17 @@ ...@@ -10,19 +13,17 @@
<div class="authors-content"> <div class="authors-content">
{% block content %} {% block content %}
<div class="list"> <div class="list">
<ul> <ol>
{% for object in object_list %} {% for object in object_list %}
<li> <li>
<a href="{{ object.get_absolute_url }}">{{ object }}</a> <a href="{{ object.get_absolute_url }}">{{ object }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ol>
</div> </div>
<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>
</ul>
</div> </div>
{% endblock %} {% endblock %}
</div> </div>
......
{%extends 'base.html'%} {%extends 'base.html'%}
{% block stylesheets %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'stylesheets/list.css' %}">
{% endblock %}
{% block title %} My Favorite Books {% endblock %} {% block title %} My Favorite Books {% endblock %}
...@@ -10,20 +15,18 @@ ...@@ -10,20 +15,18 @@
<div class="books-content"> <div class="books-content">
{% block content %} {% block content %}
<div class="list"> <div class="list">
<ul> <ol>
{% for object in object_list %} {% for object in object_list %}
<li> <li>
<a href="{{ object.get_absolute_url }}">{{ object.title }}</a> <a href="{{ object.get_absolute_url }}">{{ object.title }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ol>
</div> </div>
<div class="links"> <div class="links">
<ul> <a href="/home/" class="btn-primary">Home</a>
<li><a href="/home/">Home</a></li> <a href="/authors/" class="btn-secondary">Authors</a>
<li><a href="/authors/">Authors</a></li> </div>
</ul>
</div>
{% endblock %} {% endblock %}
</div> </div>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
{% block content %} {% block content %}
<p> Personally, I used to be more interested in movies and series than reading books. Reading books always felt like a chore to me, and I struggled to find books that kept me engaged and interested. However, over time, I discovered the world of self-help books and found myself drawn to the practical advice and guidance they offered. These books helped me learn new skills, gain new perspectives, and develop a better understanding of myself and the world around me. My favorite books include: Ikigai: The Japanese Secret to a Long and Happy Life and The Subtle Art of Not Giving a F*ck. </p> <p> Personally, I used to be more interested in movies and series than reading books. Reading books always felt like a chore to me, and I struggled to find books that kept me engaged and interested. However, over time, I discovered the world of self-help books and found myself drawn to the practical advice and guidance they offered. These books helped me learn new skills, gain new perspectives, and develop a better understanding of myself and the world around me. My favorite books include: Ikigai: The Japanese Secret to a Long and Happy Life and The Subtle Art of Not Giving a F*ck. </p>
<div class="links"> <div class="links">
<a href="/books/" class="btn-primary">Books</a> <a href="/books/" class="btn-primary">Books</a>
<a href="/authors/" class="btn-secondary">Authors</a> <a href="/authors/" class="btn-secondary">Authors</a>
</div> </div>
{% endblock %} {% endblock %}
</div> </div>
......
body {
padding: 0.5rem;
}
.container { .container {
font-family: Verdana, Geneva, Tahoma, sans-serif; font-family: Verdana, Geneva, Tahoma, sans-serif;
} }
...@@ -13,6 +10,7 @@ header { ...@@ -13,6 +10,7 @@ header {
h2 { h2 {
font-size: large; font-size: large;
} }
.btn-primary { .btn-primary {
width: max-content; width: max-content;
display: inline-block; display: inline-block;
...@@ -46,10 +44,14 @@ h2 { ...@@ -46,10 +44,14 @@ h2 {
} }
a { a {
text-decoration: none; text-decoration: none;
}
a:visited {
text-decoration: none;
} }
.links { .links {
display: flex; display: flex;
margin-top: 5rem; margin-top: 5rem;
margin-right: auto; margin-right: auto;
......
body{
background-image: url('../assets/list_bg.png');
}
.list {
border-radius: 0.5rem;
}
h2 {
padding-left: 2.5rem;
padding-bottom: 1rem;
font-size: xx-large;
border-bottom: 1px solid white;
}
ol {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
column-gap: 1rem;
row-gap: 1rem;
padding: 0;
width: 80%;
margin-right: auto;
margin-left: auto;
counter-reset: my-counter;
list-style-type: none;
}
ol li::before {
content: counter(my-counter);
counter-increment: my-counter;
content: counter(my-counter, decimal-leading-zero) '\A''\A';
white-space: pre;
font-size: large;
color:#7448F6;
}
li {
padding: 0.80rem;
cursor: pointer;
transition: all 400ms ease;
text-align: center;
}
a {
color: inherit;
text-decoration: none;
}
li:hover {
background-color: #E9E3FE;
color: #7448F6;
border-color: transparent;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
transform: translateY(-5px);
}
.book {
display: flex;
margin-right: auto;
margin-left: auto;
}
@media only screen and (max-width: 780px) {
ol {
display: grid;
grid-template-columns: 1fr;
}
}
\ No newline at end of file
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
{% endblock %} {% endblock %}
</header> </header>
<main> <main>
{% block body %} {% block body %}
{% block content %} {% block content %}
{% endblock %}
{% endblock %} {% endblock %}
{% endblock %}
</main> </main>
</div> </div>
</body> </body>
......
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