Commit 1e815aff authored by EJ Mejilla's avatar EJ Mejilla

Added a stylesheet

parent a91fcf1e
Pipeline #3092 failed with stages
......@@ -6,13 +6,13 @@
<div class="details">
<h1> {{ object.first_name }} {{object.last_name}} </h1>
<ul>
<li>{{ object.age }}</li>
<li>{{ object.nationality }}</li>
<li>Age: {{ object.age }}</li>
<li>Nationality: {{ object.nationality }}</li>
<li>{{ object.bio }}</li>
</ul>
</div>
<div class="details">
<div>
<h2>Books by {{object.first_name}} {{object.last_name}} I love:</h2>
<ul>
{% for books in author.books_set.all %}
......
......@@ -6,10 +6,10 @@
<div class="details">
<h1>{{ object.title }}</h1>
<ul>
<li><a href="{{ object.author.get_absolute_url }}">{{object.author}}</a></li>
<li>{{ object.publisher }}</li>
<li>{{ object.year_published }}</li>
<li>{{ object.ISBN }}</li>
<li><a href="{{ object.author.get_absolute_url }}">Author: {{object.author}}</a></li>
<li>Publisher: {{ object.publisher }}</li>
<li>Year Published: {{ object.year_published }}</li>
<li>ISBN-13: {{ object.ISBN }}</li>
<li>{{ object.blurb }}</li>
</ul>
</div>
......
......@@ -4,7 +4,7 @@
{% block content %}
<div class="homepage">
<h1>Welcome to EJ's Database of Favorite Books and Authors!</h1>
<p>I like a variety of books from YA novels to psychological horror :D</p>
<p>Hello! It's EJ. I'm not that much of an avid book reader, but when I read, I usually prefer fantasy novels -- although I wouldn't mind otherwise. If you have any recommendations please send them my way! </p>
</div>
<ul class="footer">
......
......@@ -13,6 +13,8 @@ https://docs.djangoproject.com/en/3.2/ref/settings/
from pathlib import Path
from dotenv import load_dotenv
import os
load_dotenv()
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
......@@ -121,6 +123,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
......
body {
font-family :'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
color : #444;
letter-spacing: 2px;
}
h1 {
text-align: center;
}
a {
text-decoration: none;
}
a:link, a:visited {
color:steelblue;
}
a:hover {
transition: 0.5s;
color:darkblue;
}
.homepage {
text-align: center;
}
.footer {
text-align: center;
}
.footer li {
padding: 10px;
margin: 10px;
display: inline;
}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
{% load static %}
<link rel="stylesheet" href="{% static 'style.css' %}">
<title>{% block title %}My amazing site{% 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