removed static (means that img path needs to be fixed), login page is beautified
This commit is contained in:
		@@ -42,7 +42,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  <div class="navbar-fixed">
 | 
					  <div class="navbar-fixed">
 | 
				
			||||||
    <nav>
 | 
					    <nav>
 | 
				
			||||||
      <div class="nav-wrapper row">
 | 
					      <div class="nav-wrapper row green darken-4">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <ul class="right">
 | 
					        <ul class="right">
 | 
				
			||||||
        {% if user.is_authenticated %}
 | 
					        {% if user.is_authenticated %}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
{% extends "base.html" %}
 | 
					{% extends "base.html" %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
{% load static %}
 | 
					
 | 
				
			||||||
<h1>{{author}}</h1>
 | 
					<h1>{{author}}</h1>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<table id="books" class="highlight centered">
 | 
					<table id="books" class="highlight centered">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
{% extends "base.html" %}
 | 
					{% extends "base.html" %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
{% load static %}
 | 
					
 | 
				
			||||||
  <h1>Author List</h1>
 | 
					  <h1>Author List</h1>
 | 
				
			||||||
  {% if author_list %}
 | 
					  {% if author_list %}
 | 
				
			||||||
  <ul>
 | 
					  <ul>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,9 @@
 | 
				
			|||||||
{% extends "base.html" %}
 | 
					{% extends "base.html" %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
{% load static %}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div class="row">
 | 
					<div class="row">
 | 
				
			||||||
  <div class="col s4"><a href="{% static "" %}{{download}}"><img src="{% static "" %}{{imgpath}}" alt="download" srcset=""></a></div>
 | 
					  <div class="col s4"><a href="{{download}}"><img src="{{imgpath}}" alt="download" srcset=""></a></div>
 | 
				
			||||||
  <div class="col s8">
 | 
					  <div class="col s8">
 | 
				
			||||||
  <h1> {{book.title}}</h1> 
 | 
					  <h1> {{book.title}}</h1> 
 | 
				
			||||||
  <h4> by
 | 
					  <h4> by
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
{% extends "base.html" %}
 | 
					{% extends "base.html" %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
{% load static %}
 | 
					
 | 
				
			||||||
<h1>{{publisher}} </h1>
 | 
					<h1>{{publisher}} </h1>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% if publisher.released %}
 | 
					{% if publisher.released %}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
{% extends "base.html" %}
 | 
					{% extends "base.html" %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
{% load static %}
 | 
					
 | 
				
			||||||
  <h1>Publishers List</h1>
 | 
					  <h1>Publishers List</h1>
 | 
				
			||||||
  {% if publisher_list %}
 | 
					  {% if publisher_list %}
 | 
				
			||||||
  <ul>
 | 
					  <ul>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,8 @@
 | 
				
			|||||||
{% extends "base.html" %}
 | 
					{% extends "base.html" %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
{% load static %}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
<h1 class="left">⭐ {{rating}}</h1>
 | 
					<h1 class="left">Books with rating: {{rating}}</h1>
 | 
				
			||||||
{% if books %}
 | 
					{% if books %}
 | 
				
			||||||
<table id="books" class="highlight centered">
 | 
					<table id="books" class="highlight centered">
 | 
				
			||||||
    <tr>
 | 
					    <tr>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
{% extends "base.html" %}
 | 
					{% extends "base.html" %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
{% load static %}
 | 
					
 | 
				
			||||||
  <h1>Ratings List</h1>
 | 
					  <h1>Ratings List</h1>
 | 
				
			||||||
  {% if rating_list %}
 | 
					  {% if rating_list %}
 | 
				
			||||||
  <ul>
 | 
					  <ul>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,6 @@
 | 
				
			|||||||
{% extends "base.html" %}
 | 
					{% extends "base.html" %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
{% load static %}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
<h1>{{tag}}</h1>
 | 
					<h1>{{tag}}</h1>
 | 
				
			||||||
{% if books %}
 | 
					{% if books %}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
{% extends "base.html" %}
 | 
					{% extends "base.html" %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
{% load static %}
 | 
					
 | 
				
			||||||
  <h1>Tags List</h1>
 | 
					  <h1>Tags List</h1>
 | 
				
			||||||
  {% if tag_list %}
 | 
					  {% if tag_list %}
 | 
				
			||||||
  <ul>
 | 
					  <ul>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,19 +2,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  {% if form.errors %}
 | 
					 | 
				
			||||||
    <p>Your username and password didn't match. Please try again.</p>
 | 
					 | 
				
			||||||
  {% endif %}
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  {% if next %}
 | 
					 | 
				
			||||||
    {% if user.is_authenticated %}
 | 
					 | 
				
			||||||
      <p>Your account doesn't have access to this page. To proceed,
 | 
					 | 
				
			||||||
      please login with an account that has access.</p>
 | 
					 | 
				
			||||||
    {% else %}
 | 
					 | 
				
			||||||
      <p>Please login to see this page.</p>
 | 
					 | 
				
			||||||
    {% endif %}
 | 
					 | 
				
			||||||
  {% endif %}
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  <form method="post" action="{% url 'login' %}">
 | 
					  <form method="post" action="{% url 'login' %}">
 | 
				
			||||||
    {% csrf_token %}
 | 
					    {% csrf_token %}
 | 
				
			||||||
    <table>
 | 
					    <table>
 | 
				
			||||||
@@ -27,6 +14,22 @@
 | 
				
			|||||||
        <td>{{ form.password }}</td>
 | 
					        <td>{{ form.password }}</td>
 | 
				
			||||||
      </tr>
 | 
					      </tr>
 | 
				
			||||||
    </table>
 | 
					    </table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div style="color:#f44336">
 | 
				
			||||||
 | 
					    {% if form.errors %}
 | 
				
			||||||
 | 
					    <p>Your username and password didn't match. Please try again.</p>
 | 
				
			||||||
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					    {% if next %}
 | 
				
			||||||
 | 
					    {% if user.is_authenticated %}
 | 
				
			||||||
 | 
					    <p>Your account doesn't have access to this page. To proceed,
 | 
				
			||||||
 | 
					    please login with an account that has access.</p>
 | 
				
			||||||
 | 
					    {% else %}
 | 
				
			||||||
 | 
					    <p>Please login to see this page.</p>
 | 
				
			||||||
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <input type="submit" value="login" />
 | 
					    <input type="submit" value="login" />
 | 
				
			||||||
    <input type="hidden" name="next" value="{{ next }}" />
 | 
					    <input type="hidden" name="next" value="{{ next }}" />
 | 
				
			||||||
  </form>
 | 
					  </form>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
{% extends "base.html" %}
 | 
					{% extends "base.html" %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
{% load static %}
 | 
					
 | 
				
			||||||
<h1>Results</h1>
 | 
					<h1>Results</h1>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<table id="books">
 | 
					<table id="books">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,37 +5,40 @@
 | 
				
			|||||||
  {% block title %}<title>Local Library</title>{% endblock %}
 | 
					  {% block title %}<title>Local Library</title>{% endblock %}
 | 
				
			||||||
  <meta charset="utf-8">
 | 
					  <meta charset="utf-8">
 | 
				
			||||||
  <meta name="viewport" content="width=device-width, initial-scale=1">
 | 
					  <meta name="viewport" content="width=device-width, initial-scale=1">
 | 
				
			||||||
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
 | 
					
 | 
				
			||||||
    integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
 | 
					  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
 | 
				
			||||||
  <!-- Add additional CSS in static file -->
 | 
					  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
 | 
				
			||||||
  {% load static %}
 | 
					  <!-- Compiled and minified CSS -->
 | 
				
			||||||
  <link rel="stylesheet" href="{% static 'css/styles.css' %}">
 | 
					  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css">
 | 
				
			||||||
 | 
					  <!-- Compiled and minified JavaScript -->
 | 
				
			||||||
 | 
					  <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js"></script>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
  {% block topnav%}
 | 
					 | 
				
			||||||
  <ul class="topnav">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="navbar-fixed">
 | 
				
			||||||
 | 
					  <nav>
 | 
				
			||||||
 | 
					    <div class="nav-wrapper row green darken-4">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      <ul class="right">
 | 
				
			||||||
      {% if user.is_authenticated %}
 | 
					      {% if user.is_authenticated %}
 | 
				
			||||||
     <li class="active"><a href="{{user.get_absolute_url}}"></a> {{ user.get_username }}</a></li>
 | 
					        <li class="active"><a href="{{user.get_absolute_url}}"> {{ user.get_username }}</a></li>
 | 
				
			||||||
        <li><a href="{% url 'logout'%}?next={{request.path}}">Logout</a></li>
 | 
					        <li><a href="{% url 'logout'%}?next={{request.path}}">Logout</a></li>
 | 
				
			||||||
 | 
					      </ul>
 | 
				
			||||||
      {% else %}
 | 
					      {% else %}
 | 
				
			||||||
        <li><a href="{% url 'sign-up'%}?next={{request.path}}">Sign up</a></li>
 | 
					        <li><a href="{% url 'sign-up'%}?next={{request.path}}">Sign up</a></li>
 | 
				
			||||||
        <li><a href="{% url 'login'%}?next={{request.path}}">Login</a></li>
 | 
					        <li><a href="{% url 'login'%}?next={{request.path}}">Login</a></li>
 | 
				
			||||||
   {% endif %} 
 | 
					 | 
				
			||||||
      </ul>
 | 
					      </ul>
 | 
				
			||||||
  {% endblock %}
 | 
					      {% endif %}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
  
 | 
					  </nav>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
  <div class="container-fluid">
 | 
					<div class="container">
 | 
				
			||||||
  <div class="row">
 | 
					  <div class="row">
 | 
				
			||||||
 | 
					    <div class="col s10 ">{% block content %}{% endblock %}</div>
 | 
				
			||||||
      <div class="col-sm-10 ">{% block content %}{% endblock %}</div>
 | 
					 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
</body>
 | 
					</body>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
		Reference in New Issue
	
	Block a user