Commit 7b92e6d9 authored by Star Neptune R. Sy's avatar Star Neptune R. Sy

css is done

parent 42b799e7
body{
background-color: rgb(235, 124, 84)
}
#additional{
padding: 10px;
background-color: whitesmoke;
font-family: Verdana, Geneva, Tahoma, sans-serif;
box-shadow: 0px 2px 10px 0px rgb(80, 37, 21);
margin-left: 10%;
margin-right: 10%;
text-align: center;
border-style: double;
border-radius: 5px;
border-color: rgb(117, 54, 31);
border-width: 10px;
}
div.content{
padding: 10px;
background-color: whitesmoke;
font-family: Verdana, Geneva, Tahoma, sans-serif;
box-shadow: 50px;
margin-left: 20%;
margin-right: 20%;
text-align: center;
border-style: solid;
border-radius: 5px;
border-color: rgb(117, 54, 31);
border-width: 2px;
padding-bottom: 20px;
}
a.navBtn{
padding: 10px;
border-radius: 5px;
border-color: rgb(117, 54, 31);
border-width: 2px;
border-style: groove;
}
\ No newline at end of file
{% load static %}
<head> <head>
<link rel="stylesheet" href="formatt.css"> <link rel="stylesheet" href="{% static '/formatt.css' %}">
<title>{% block title %}{% endblock %}</title> <title>{% block title %}{% endblock %}</title>
</head> </head>
<body> <body>
<h1>{% block additional %}{% endblock %}</h1> <h1 id="additional" >{% block additional %}{% endblock %}</h1>
<div>{% block content %}{% endblock %}</div> <div class="content">{% block content %}{% endblock %}</div>
</body> </body>
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
{% block content %} {% block content %}
<ul> <ul>
{% for author in object_list %} {% for author in object_list %}
<li><a href="{{author.get_absolute_url}}/details/"> {{ author.first_name }}{{ author.last_name }} <li><a href="{{author.get_absolute_url}}/details/"> {{ author.first_name }} {{ author.last_name }}
{% endfor %} {% endfor %}
</ul> </ul>
<br><br>
<div> <div>
<a href="/home">Home</a> <a class="navBtn" href="/home">Home</a>
<a href="/books">Books</a> <a class="navBtn" href="/books">Books</a>
</div> </div>
{% endblock %} {% endblock %}
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
{% block additional %} {{object.first_name}} {{object.last_name}} {% endblock %} {% block additional %} {{object.first_name}} {{object.last_name}} {% endblock %}
{% block content%} {% block content%}
<ul>
<li> {{object.age}} <b>Age:</b> {{object.age}} <br>
<li> {{object.nationality}} <b>Nationality:</b> {{object.nationality}} <br>
<li> {{object.bio}} <b>Biography:</b> {{object.bio}} <br>
</ul>
<div> <div>
<p> Books by {{object.first_name}} {{object.last_name}} I love: </p> <p> Books by {{object.first_name}} {{object.last_name}} I love: </p>
...@@ -18,10 +18,11 @@ ...@@ -18,10 +18,11 @@
<li> <a href="/books/{{aBook.get_absolute_url}}/details/"> {{aBook.title}} </a></li> <li> <a href="/books/{{aBook.get_absolute_url}}/details/"> {{aBook.title}} </a></li>
{% endfor %} {% endfor %}
</ul> </ul>
<br><br>
<div> <div>
<a href="/home">Home</a> <a class="navBtn" href="/home">Home</a>
<a href="/books">Books</a> <a class="navBtn" href="/books">Books</a>
<a href="/authors">Authors</a>\ <a class="navBtn" href="/authors">Authors</a>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
...@@ -5,17 +5,19 @@ ...@@ -5,17 +5,19 @@
{% block additional %} {{ object.title }} {% endblock %} {% block additional %} {{ object.title }} {% endblock %}
{% block content %} {% block content %}
<ul>
<li> {{ object.author }} </li> <b>Author:</b> <a href="/authors/{{object.get_absolute_url}}/details/">{{ object.author }}</a> <br>
<li> {{ object.publisher}} </li> <b>Publisher:</b> {{ object.publisher}} <br>
<li> {{ object.year_published}} </li> <b>Year published:</b> {{ object.year_published}} <br>
<li> {{ object.ISBN}} </li> <b>ISBN:</b> {{ object.ISBN}} <br>
<li> {{ object.blurb}} </li> <b>Blurb:</b> {{ object.blurb}} <br>
</ul>
<br><br>
<div> <div>
<a href="/home">Home</a> <a class="navBtn" href="/home">Home</a>
<a href="/books">Books</a> <a class="navBtn" href="/books">Books</a>
<a href="/authors">Authors</a> <a class="navBtn" href="/authors">Authors</a>
{% endblock %} {% endblock %}
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<li><a href="{{obj.get_absolute_url}}/details/">{{ obj.title }}</a></li> <li><a href="{{obj.get_absolute_url}}/details/">{{ obj.title }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
<br><br>
<div> <div>
<a href="/home">Home</a> <a class="navBtn" href="/home">Home</a>
<a href="/authors">Authors</a> <a class="navBtn" href="/authors">Authors</a>
</div> </div>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</ol> </ol>
<div> <div>
<a href="/home">Home</a> <a class="navBtn" href="/home">Home</a>
<a href="/authors">Authors</a> <a class="navBtn" href="/authors">Authors</a>
</div> </div>
{% endblock %} {% endblock %}
\ No newline at end of file
# bookshelf/urls.py # bookshelf/urls.py
from django.urls import path from django.urls import path
from .views import (homeView, BooksView, BooksDetail, AuthorView, AuthorDetail) from .views import (homeView, BooksView, BooksDetail, AuthorView, AuthorDetail)
from django.conf.urls.static import static
urlpatterns = [ urlpatterns = [
path('home/', homeView, name='home'), path('home/', homeView, name='home'),
......
...@@ -123,6 +123,7 @@ USE_TZ = True ...@@ -123,6 +123,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/3.2/howto/static-files/ # https://docs.djangoproject.com/en/3.2/howto/static-files/
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
# Default primary key field type # Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
......
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