Applied bootstrap styling to all webpages.

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