Applied bootstrap styling to all webpages.

parent 7ebb52dd
**/.env
\ No newline at end of file
**/.env
db.sqlite3
**/**__pycache__
\ No newline at end of file
......@@ -2,22 +2,42 @@
{% load static %}
{% block title %}{{object.first_name}} {{object.last_name}}{% endblock %}
{% block content %}
<h1>{{ object.first_name }} {{ object.last_name }}</h1>
<h2>Age: {{object.age}} </h2>
<h2>Nationality: {{object.nationality}} </h2>
<h2>Bio: {{object.bio}} </h2>
<h2>Books by {{object.first_name}} {{object.last_name}} I love:</h2>
<ul>
{% for book in object.books.all %}
<li>
<a href="{{ book.get_absolute_url }}"> {{book.title}}</a>
</li>
{% endfor %}
</ul>
<a href="/bookshelf/home/">Home</a>
<a href="/bookshelf/books/">Books</a>
<a href="/bookshelf/authors/">Authors</a>
<div class="text-center">
<div class="container-fluid p-5 bg-dark text-white">
<h1 style=font-size:80px>{{ object.first_name }} {{ object.last_name }}</h1>
<br>
<div class="row">
<div class="col-6">
<h5>Age: {{ object.age }}</h5>
</div>
<div class="col-6">
<h5>Nationality: {{ object.nationality }}</h5>
</div>
</div>
</div>
<div class="container p-3">
<p><b>Biography:</b><br><br>
{{object.bio }}
</p>
</div>
<div class="container-fluid p-4 bg-dark text-white">
<h2>Books by {{object.first_name}} {{object.last_name}} I love:</h2>
<br>
{% for book in object.books.all %}
<a href="{{ book.get_absolute_url }}" class="link-light">
{{ book.title }}</a>
<br>
{% endfor %}
</div>
<br>
<button type="button" class="btn btn-dark">
<a href="/bookshelf/home/" class="link-light">Home</a>
</button>
<button type="button" class="btn btn-dark">
<a href="/bookshelf/books/" class="link-light">Books</a>
</button>
<button type="button" class="btn btn-dark">
<a href="/bookshelf/authors/" class="link-light">Authors</a>
</button>
</div>
{% endblock %}
\ No newline at end of file
......@@ -2,14 +2,22 @@
{% load static %}
{% block title %}My Favorite Authors{% endblock %}
{% block content %}
<h2>Neil's Favorite Authors</h2>
<ul>
<div class="text-center">
<div class="container-fluid p-5 bg-dark text-white">
<img src="{% static 'author_cat.gif'%}" class="img-fluid">
<h1>Neil's Favorite Authors</h1>
</div>
<br>
{% for object in object_list %}
<li>
<a href="{{ object.get_absolute_url }}">{{ object.first_name }} {{ object.last_name }}</a>
</li>
<a href="{{ object.get_absolute_url }}" class="link-dark">
{{ object.first_name }} {{ object.last_name }}</a>
<br>
{% endfor %}
</ul>
<a href="/bookshelf/home/">Home</a>
<a href="/bookshelf/books/">Books</a>
<br>
<button type="button" class="btn btn-dark">
<a href="/bookshelf/home/" class="link-light">Home</a>
</button>
<button type="button" class="btn btn-dark">
<a href="/bookshelf/books/" class="link-light">Books</a>
</button>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %}This is the book details page{% endblock %}
{% block title %}{{ object.title }}{% endblock %}
{% block content %}
<h1>{{object.title}}</h1>
<h2>Author: <a href="{{ object.author.get_absolute_url }}"> {{object.author.first_name}} {{object.author.last_name}}</a> </h2>
<h2>Publisher: {{object.publisher}} </h2>
<h2>Year Published: {{object.year_published}} </h2>
<h2>ISBN: {{object.ISBN}} </h2>
<h2>Blurb: {{object.blurb}} </h2>
<a href="/bookshelf/home/">Home</a>
<a href="/bookshelf/books/">Books</a>
<a href="/bookshelf/authors/">Authors</a>
<div class="text-center">
<div class="container-fluid p-5 bg-dark text-white">
<h1 style=font-size:100px>{{ object.title }}</h1>
<br>
<div class="row">
<div class="col-4">
<h5>Author:
<a href="{{ object.author.get_absolute_url }}" class="link-light">
{{object.author.first_name}} {{object.author.last_name}}
</a>
</h5>
</div>
<div class="col-4">
<h5>Publisher: {{ object.publisher }}</h5>
</div>
<div class="col-4">
<h5>Year Published: {{ object.year_published }}</h5>
</div>
</div>
</div>
<div class="container p-3">
<p><b>ISBN:</b> {{ object.ISBN }}<br><br>
<b>Blurb:</b> {{ object.blurb }}
</p>
</div>
<button type="button" class="btn btn-dark">
<a href="/bookshelf/home/" class="link-light">Home</a>
</button>
<button type="button" class="btn btn-dark">
<a href="/bookshelf/books/" class="link-light">Books</a>
</button>
<button type="button" class="btn btn-dark">
<a href="/bookshelf/authors/" class="link-light">Authors</a>
</button>
</div>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %}This is the authors page{% endblock %}
{% block title %}My Favorite Books{% endblock %}
{% block content %}
<h1>Books Object List</h1>
<br><br>
<ul>
<div class="text-center">
<div class="container-fluid p-5 bg-dark text-white">
<img src="{% static 'book_cat.gif'%}" class="img-fluid" width="400" height="500">
<h1>Neil's Favorite Books</h1>
</div>
<br>
{% for object in object_list %}
<li>
<a href="{{ object.get_absolute_url }}">{{ object.title }}</a>
</li>
<a href="{{ object.get_absolute_url }}" class="link-dark">{{ object.title }}</a>
<br>
{% endfor %}
</ul>
<a href="/bookshelf/home/">Home</a>
<a href="/bookshelf/authors/">Authors</a>
<br>
<button type="button" class="btn btn-dark">
<a href="/bookshelf/home/" class="link-light">Home</a>
</button>
<button type="button" class="btn btn-dark">
<a href="/bookshelf/authors/" class="link-light">Authors</a>
</button>
</div>
{% endblock %}
\ No newline at end of file
......@@ -2,11 +2,26 @@
{% load static %}
{% block title %}My Favorite Books & Authors{% endblock %}
{% block content %}
<h1>Welcome to Neil's Database of Favorite Books and Authors</h1>
<p> My go-to authors and books are generally those that ara already famous or well-known. <br>
While it might seem that I'm a trendchaser, I'd like to think that I just don't want to <br>
be disappointed. While I do enjoy the calmness that comes with reading, I still prioritize <br>
making every second of it worthwhile.</p>
<a href="/bookshelf/books/">Books</a>
<a href="/bookshelf/authors/">Authors</a>
<div class="text-center">
<div class="container-fluid p-5 bg-dark text-white">
<h1>Welcome to Neil's Database of Favorite Books and Authors</h1>
</div>
<div class="container p-3">
<br>
<img src="{% static 'home_gif.gif'%}" class="img-fluid">
<p>
My go-to authors and books are generally those that are already famous or well-known.
While it might seem that I'm a trendchaser, I'd like to think that I just don't want to
be disappointed. While I do enjoy the calmness that comes with reading, I still prioritize
making every second of it worthwhile.
</p>
<br>
</div>
<button type="button" class="btn btn-dark">
<a href="/bookshelf/books/" class="link-light">Books</a>
</button>
<button type="button" class="btn btn-dark">
<a href="/bookshelf/authors/" class="link-light">Authors</a>
</button>
</div>
{% endblock %}
\ No newline at end of file
......@@ -41,7 +41,8 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'bookshelf'
'bookshelf',
'django_bootstrap5',
]
MIDDLEWARE = [
......
<html lang="en">
<head>
{% load django_bootstrap5 %}
{% bootstrap_css %}
{% bootstrap_javascript %}
<link rel="stylesheet" href="style.css">
<title>{% block title %}My Favorite Books & Authors{% endblock %}</title>
{% block styles %}{% endblock %}
</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