Commit ed5ebb70 authored by Javi Ng's avatar Javi Ng

finished navigation bar, created CSS stylesheet

parent aaa111b1
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
{% block content %} {% block content %}
<h1>{{ object }}</h1> <h1>{{ object }}</h1>
<h2>{{ object.age }}</h2> <h2>{{ object.age }} years old</h2>
{{ object.nationalism }} <br> <b>Nationality:</b> {{ object.nationality }} <br>
{{ object.bio }} <br> <br> <b>Biography:</b> {{ object.bio }} <br> <br>
Books by {{ object }} I love: <b>Books by {{ object }} I love:</b>
<ul> <ul>
{% for book in object.booklist.all %} {% for book in object.booklist.all %}
<li> <li>
...@@ -18,4 +18,10 @@ ...@@ -18,4 +18,10 @@
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock %}
{% block table %}
<td><a href = '../../home'>Home</a></td>
<td><a href = '../../books'>Books</a></td>
<td><a href = '../../authors'>Authors</a></td>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -13,4 +13,9 @@ ...@@ -13,4 +13,9 @@
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock %}
{% block table %}
<td><a href = '../home'>Home</a></td>
<td><a href = '../books'>Books</a></td>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -8,9 +8,15 @@ ...@@ -8,9 +8,15 @@
{{ object.author }} {{ object.author }}
</a> </a>
</h2> </h2>
{{ object.publisher }} <br> <b>Publisher: </b>{{ object.publisher }} <br>
Published {{ object.year_published}} <br> <br> <b>Published </b>{{ object.year_published}} <br> <br>
ISBN {{ object.ISBN }} <br> <br> <b>ISBN</b> {{ object.ISBN }} <br> <br>
{{ object.blurb }} <br> <b>Blurb: </b>{{ object.blurb }} <br>
{% endblock %}
{% block table %}
<td><a href = '../../home'>Home</a></td>
<td><a href = '../../books'>Books</a></td>
<td><a href = '../../authors'>Authors</a></td>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -12,5 +12,10 @@ ...@@ -12,5 +12,10 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock %}
{% block table %}
<td><a href = '../home'>Home</a></td>
<td><a href = '../authors'>Authors</a></td>
{% endblock %} {% endblock %}
\ No newline at end of file
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %}
{% block content %} {% block content %}
<h1>Welcome to Javi's Database of Favorite Books and Authors!</h1> <h1>Welcome to Javi's Database of Favorite Books and Authors!</h1>
Admittedly, half of the books are dummy data or jokes and the other half are actual books I've read. Admittedly, half of the books are dummy data or jokes and the other half are actual books I've read.
I like to think that the jokes are also reflective of my personality though. I like to think that the jokes are also reflective of my personality though.
{% endblock %}
{% block table %}
<td><a href = '../books'>Books</a></td>
<td><a href = '../authors'>Authors</a></td>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -122,6 +122,7 @@ USE_TZ = True ...@@ -122,6 +122,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 {
font-family: 'Courier New';
}
table {
width: 100%;
background-color: bisque;
border: 2px solid;
}
td {
text-align: center;
padding: 5px;
border: 2px solid;
}
ul {
list-style-image: url('bulletpoint.png');
}
body {
background-image: url(background.png);
background-position: right bottom;
background-repeat: no-repeat;
}
\ No newline at end of file
<html lang="en"> <html lang="en">
{% load static %}
<head> <head>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href=" {% static '/style.css' %} ">
<title>{% block title %}My Favorite Books and Authors{% endblock %}</title> <title>{% block title %}My Favorite Books and Authors{% endblock %}</title>
{% block styles %}{% endblock %}
</head> </head>
<body> <body>
<div id="content"> <div id="content">
{% block content %}{% endblock %} {% block content %}{% endblock %}
</div> </div>
{% block scripts %}{% endblock %}
<br>
<table> <tr>
{% block table %}{% endblock %}
</table> </tr>
</body> </body>
</html> </html>
\ 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