Commit ed5ebb70 authored by Javi Ng's avatar Javi Ng

finished navigation bar, created CSS stylesheet

parent aaa111b1
......@@ -3,11 +3,11 @@
{% block content %}
<h1>{{ object }}</h1>
<h2>{{ object.age }}</h2>
{{ object.nationalism }} <br>
{{ object.bio }} <br> <br>
<h2>{{ object.age }} years old</h2>
<b>Nationality:</b> {{ object.nationality }} <br>
<b>Biography:</b> {{ object.bio }} <br> <br>
Books by {{ object }} I love:
<b>Books by {{ object }} I love:</b>
<ul>
{% for book in object.booklist.all %}
<li>
......@@ -19,3 +19,9 @@
</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 %}
\ No newline at end of file
......@@ -14,3 +14,8 @@
</ul>
{% endblock %}
{% block table %}
<td><a href = '../home'>Home</a></td>
<td><a href = '../books'>Books</a></td>
{% endblock %}
\ No newline at end of file
......@@ -8,9 +8,15 @@
{{ object.author }}
</a>
</h2>
{{ object.publisher }} <br>
Published {{ object.year_published}} <br> <br>
ISBN {{ object.ISBN }} <br> <br>
{{ object.blurb }} <br>
<b>Publisher: </b>{{ object.publisher }} <br>
<b>Published </b>{{ object.year_published}} <br> <br>
<b>ISBN</b> {{ object.ISBN }} <br> <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 %}
\ No newline at end of file
......@@ -14,3 +14,8 @@
</ul>
{% endblock %}
{% block table %}
<td><a href = '../home'>Home</a></td>
<td><a href = '../authors'>Authors</a></td>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block content %}
<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.
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 %}
\ No newline at end of file
......@@ -122,6 +122,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/3.2/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
# Default primary key field type
# 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">
{% load static %}
<head>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href=" {% static '/style.css' %} ">
<title>{% block title %}My Favorite Books and Authors{% endblock %}</title>
{% block styles %}{% endblock %}
</head>
<body>
<div id="content">
{% block content %}{% endblock %}
</div>
{% block scripts %}{% endblock %}
<br>
<table> <tr>
{% block table %}{% endblock %}
</table> </tr>
</body>
</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