Commit 02e718bb authored by Eldon Dagdag's avatar Eldon Dagdag

Implemented basic CSS styling to existing pages

parent bfcb336e
Pipeline #3047 failed with stages
...@@ -10,13 +10,17 @@ ...@@ -10,13 +10,17 @@
<h3>Biography: {{ object.bio }}</h3> <h3>Biography: {{ object.bio }}</h3>
<h2>Books by {{ object.first_name }} {{ object.last_name }} I love:</h2> <h2>Books by {{ object.first_name }} {{ object.last_name }} I love:</h2>
<ul>
{% for book in object.books.all %} {% for book in object.books.all %}
<li><a href={{ book.get_absolute_url }}>{{ book.title }}</a></li> <li><a href={{ book.get_absolute_url }}>{{ book.title }}</a></li>
{% endfor %} {% endfor %}
</body> </ul>
<br> <br>
<a href="/bookshelf/home/">Home</a> <div class="container space-evenly">
<a href="/bookshelf/books/">Books</a> <a href="/bookshelf/home/">Home</a>
<a href="/bookshelf/authors/">Authors</a> <a href="/bookshelf/books/">Books</a>
<a href="/bookshelf/authors/">Authors</a>
</div>
</body>
</html> </html>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<html> <html>
<h1>Eldon's Favorite Authors:</h1> <h1>Eldon's Favorite Authors:</h1>
<body> <body>
<ul>
{% for object in object_list %} {% for object in object_list %}
<li> <li>
<a href="{{ object.get_absolute_url }}"> <a href="{{ object.get_absolute_url }}">
...@@ -12,9 +13,12 @@ ...@@ -12,9 +13,12 @@
</a> </a>
</li> </li>
{% endfor %} {% endfor %}
</ul>
</body> </body>
<br> <br>
<a href="/bookshelf/home/">Home</a> <div class="container space-evenly">
<a href="/bookshelf/books/">Books</a> <a href="/bookshelf/home/">Home</a>
<a href="/bookshelf/books/">Books</a>
</div>
</html> </html>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -12,8 +12,10 @@ ...@@ -12,8 +12,10 @@
<h3>"{{ object.blurb }}"</h3> <h3>"{{ object.blurb }}"</h3>
</body> </body>
<br> <br>
<a href="/bookshelf/home/">Home</a> <div class="container space-evenly">
<a href="/bookshelf/books/">Books</a> <a href="/bookshelf/home/">Home</a>
<a href="/bookshelf/authors/">Authors</a> <a href="/bookshelf/books/">Books</a>
<a href="/bookshelf/authors/">Authors</a>
</div>
</html> </html>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<html> <html>
<h1>Eldon's Favorite Books:</h1> <h1>Eldon's Favorite Books:</h1>
<body> <body>
<ul>
{% for object in object_list %} {% for object in object_list %}
<li> <li>
<a href="{{ object.get_absolute_url }}"> <a href="{{ object.get_absolute_url }}">
...@@ -12,9 +13,12 @@ ...@@ -12,9 +13,12 @@
</a> </a>
</li> </li>
{% endfor %} {% endfor %}
</ul>
</body> </body>
<br> <br>
<a href="/bookshelf/home/">Home</a> <div class="container space-evenly">
<a href="/bookshelf/authors/">Authors</a> <a href="/bookshelf/home/">Home</a>
<a href="/bookshelf/authors/">Authors</a>
</div>
</html> </html>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
<h1>Welcome to Eldon's Database of Favorite Books and Authors!</h1> <h1>Welcome to Eldon's Database of Favorite Books and Authors!</h1>
<h3>Vibes only here.</h3> <h3>Vibes only here.</h3>
<br> <br>
<a href="/bookshelf/books/">Books</a> <div class="container space-evenly">
<a href="/bookshelf/authors/">Authors</a> <a href="/bookshelf/books/">Books</a>
<a href="/bookshelf/authors/">Authors</a>
</div>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -123,6 +123,7 @@ USE_TZ = True ...@@ -123,6 +123,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/3.2/howto/static-files/ # https://docs.djangoproject.com/en/3.2/howto/static-files/
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
# Default primary key field type # Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
......
h1 {
color: rgb(23, 101, 139);
}
h3 {
text-align: center;
}
body {
text-align: center;
}
.container {
display: flex;
}
.container.container.space-evenly {
justify-content: space-evenly;
}
ul {
display: inline-block;
text-align: left;
}
\ No newline at end of file
{% load static %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <link rel="stylesheet" href="{% static 'styling.css' %}">
<meta name="viewport" content="width-device-width,initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>{% block title %}{% endblock %}</title> <title>{% block title %}{% endblock %}</title>
{% block styles %}{% endblock %} {% block styles %}{% endblock %}
</head> </head>
......
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