Edited the templates so that they use styles.css

parent 870f109a
{% extends 'base.html' %} {% extends 'base.html' %}
{% block title %} {{ author.first_name }} {{ author.last_name }} {% endblock %} {% block title %} {{ author.first_name }} {{ author.last_name }} {% endblock %}
{% block header %} {{ author.first_name }} {{ author.last_name }} {% endblock %} {% block header %} {{ author.first_name }} {{ author.last_name }} {% endblock %}
{% block content %} {% block content %}
<p> <p>
{{ author.age }} <br> {{ author.age }} <br>
...@@ -12,11 +14,13 @@ ...@@ -12,11 +14,13 @@
<ul> <ul>
{% for work in author.works.all %} {% for work in author.works.all %}
<li> <li>
<a href="{{ work.get_absolute_url }}">{{ work.title }}</a> <br> <a href="{{ work.get_absolute_url }}" class = "item">{{ work.title }}</a> <br>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock %}
{% block navbar %}
<a href="http://localhost:8000/home/">Home</a> <a href="http://localhost:8000/home/">Home</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://localhost:8000/books/">Books</a> <a href="http://localhost:8000/books/">Books</a>
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% block title %} My Favorite Authors {% endblock %} {% block title %} My Favorite Authors {% endblock %}
{% block header %} Lance's Favorite Authors: {% endblock %} {% block header %} Lance's Favorite Authors: {% endblock %}
{% block content %} {% block content %}
<ul> <div id = "object_bar">
<ul id = "object_list">
{% for author in author_list %} {% for author in author_list %}
<li> <li>
<a href="{{ author.get_absolute_url }}">{{ author.first_name }} {{ author.last_name }}</a> <br> <a href="{{ author.get_absolute_url }}" class = "item">{{ author.first_name }} {{ author.last_name }}</a> <br>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</div>
{% endblock %}
{% block navbar %}
<a href="http://localhost:8000/home/">Home</a> <a href="http://localhost:8000/home/">Home</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://localhost:8000/books/">Books</a> <a href="http://localhost:8000/books/">Books</a>
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% block title %} {{ books.title }} {% endblock %} {% block title %} {{ books.title }} {% endblock %}
{% block header %} {{ books.title }} {% endblock %} {% block header %} {{ books.title }} {% endblock %}
{% block content %} {% block content %}
<p> <p>
<a href="{{ books.author.get_absolute_url }}"> <li>
<a href="{{ books.author.get_absolute_url }}" class = "item">
{{ books.author.first_name }} {{ books.author.last_name }} {{ books.author.first_name }} {{ books.author.last_name }}
</a> <br> </a> <br>
</li>
{{ books.publisher }} <br> {{ books.publisher }} <br>
{{ books.year_published }} <br> {{ books.year_published }} <br>
{{ books.ISBN }} <br> {{ books.ISBN }} <br>
{{ books.blurb }} <br> {{ books.blurb }} <br>
</p> </p>
{% endblock %}
{% block navbar %}
<a href="http://localhost:8000/home/">Home</a> <a href="http://localhost:8000/home/">Home</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://localhost:8000/books/">Books</a> <a href="http://localhost:8000/books/">Books</a>
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% block title %} My Favorite Books {% endblock %} {% block title %} My Favorite Books {% endblock %}
{% block header %} Lance's Favorite Books: {% endblock %} {% block header %} Lance's Favorite Books: {% endblock %}
{% block content %} {% block content %}
<ul> <div id = "object_container">
<ul id = "object_list">
{% for book in book_list %} {% for book in book_list %}
<li> <li>
<a href="{{ book.get_absolute_url }}">{{ book.title }}</a> <br> <a href="{{ book.get_absolute_url }}" class = "item">{{ book.title }}</a> <br>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</div>
{% endblock %}
{% block navbar %}
<a href="http://localhost:8000/home/">Home</a> <a href="http://localhost:8000/home/">Home</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://localhost:8000/authors/">Authors</a> <a href="http://localhost:8000/authors/">Authors</a>
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% block title %} My Favorite Books & Authors {% endblock %} {% block title %} My Favorite Books & Authors {% endblock %}
{% block header %} Welcome to Lance's Database of Favorite Books and Authors! {% endblock %} {% block header %} Welcome to Lance's Database of Favorite Books and Authors! {% endblock %}
{% block content %} {% block content %}
<p> <p>
Hello, I'm Lance! This is a short collection of my favorite books and authors. While I'm open to most types Hello, I'm Lance! This is a short collection of my favorite books and authors. While I'm open to most types
of books, I particularly enjoy fantasy books, especially those with magic! of books, I particularly enjoy fantasy books, especially those with magic!
</p> </p>
{% endblock %}
{% block navbar %}
<a href="http://localhost:8000/books/">Books</a> <a href="http://localhost:8000/books/">Books</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://localhost:8000/authors/">Authors</a> <a href="http://localhost:8000/authors/">Authors</a>
......
<!DOCTYPE html> <!DOCTYPE html>
{% load static %}
<html lang="en"> <html lang="en">
<link rel="stylesheet" href="{% static 'styles.css' %}">
<head> <head>
<title> {% block title %} Title {% endblock %}</title> <title> {% block title %} Title {% endblock %}</title>
</head> </head>
<div id = "main">
<body>
<h1> <h1>
{% block header %} Header {% endblock %} {% block header %} Header {% endblock %}
</h1> </h1>
<body> <div id = "content">
{% block content %} Content {% endblock %} {% block content %} Content {% endblock %}
</div>
<div id = "navbar">
{% block navbar %} Navigation bar {% endblock %}
</div>
</body> </body>
</div>
</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