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">
 | 
			
		||||
    <nav>
 | 
			
		||||
      <div class="nav-wrapper row">
 | 
			
		||||
      <div class="nav-wrapper row green darken-4">
 | 
			
		||||
 | 
			
		||||
        <ul class="right">
 | 
			
		||||
        {% if user.is_authenticated %}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
<h1>{{author}}</h1>
 | 
			
		||||
 | 
			
		||||
<table id="books" class="highlight centered">
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
  <h1>Author List</h1>
 | 
			
		||||
  {% if author_list %}
 | 
			
		||||
  <ul>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,9 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
<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">
 | 
			
		||||
  <h1> {{book.title}}</h1> 
 | 
			
		||||
  <h4> by
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
<h1>{{publisher}} </h1>
 | 
			
		||||
 | 
			
		||||
{% if publisher.released %}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
  <h1>Publishers List</h1>
 | 
			
		||||
  {% if publisher_list %}
 | 
			
		||||
  <ul>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,8 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
<h1 class="left">⭐ {{rating}}</h1>
 | 
			
		||||
<h1 class="left">Books with rating: {{rating}}</h1>
 | 
			
		||||
{% if books %}
 | 
			
		||||
<table id="books" class="highlight centered">
 | 
			
		||||
    <tr>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
  <h1>Ratings List</h1>
 | 
			
		||||
  {% if rating_list %}
 | 
			
		||||
  <ul>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,6 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
<h1>{{tag}}</h1>
 | 
			
		||||
{% if books %}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
  <h1>Tags List</h1>
 | 
			
		||||
  {% if tag_list %}
 | 
			
		||||
  <ul>
 | 
			
		||||
 
 | 
			
		||||
@@ -2,19 +2,6 @@
 | 
			
		||||
 | 
			
		||||
{% 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' %}">
 | 
			
		||||
    {% csrf_token %}
 | 
			
		||||
    <table>
 | 
			
		||||
@@ -27,6 +14,22 @@
 | 
			
		||||
        <td>{{ form.password }}</td>
 | 
			
		||||
      </tr>
 | 
			
		||||
    </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="hidden" name="next" value="{{ next }}" />
 | 
			
		||||
  </form>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
<h1>Results</h1>
 | 
			
		||||
 | 
			
		||||
<table id="books">
 | 
			
		||||
 
 | 
			
		||||
@@ -5,36 +5,39 @@
 | 
			
		||||
  {% block title %}<title>Local Library</title>{% endblock %}
 | 
			
		||||
  <meta charset="utf-8">
 | 
			
		||||
  <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">
 | 
			
		||||
  <!-- Add additional CSS in static file -->
 | 
			
		||||
  {% load static %}
 | 
			
		||||
  <link rel="stylesheet" href="{% static 'css/styles.css' %}">
 | 
			
		||||
 | 
			
		||||
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
 | 
			
		||||
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
 | 
			
		||||
  <!-- Compiled and minified 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>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
  {% block topnav%}
 | 
			
		||||
  <ul class="topnav">
 | 
			
		||||
 | 
			
		||||
    {% if user.is_authenticated %}
 | 
			
		||||
     <li class="active"><a href="{{user.get_absolute_url}}"></a> {{ user.get_username }}</a></li>
 | 
			
		||||
     <li><a href="{% url 'logout'%}?next={{request.path}}">Logout</a></li>   
 | 
			
		||||
   {% else %}
 | 
			
		||||
   <li><a href="{% url 'sign-up'%}?next={{request.path}}">Sign up</a></li> 
 | 
			
		||||
     <li><a href="{% url 'login'%}?next={{request.path}}">Login</a></li>   
 | 
			
		||||
   {% endif %} 
 | 
			
		||||
  </ul>
 | 
			
		||||
  {% endblock %}
 | 
			
		||||
<div class="navbar-fixed">
 | 
			
		||||
  <nav>
 | 
			
		||||
    <div class="nav-wrapper row green darken-4">
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  <div class="container-fluid">
 | 
			
		||||
    <div class="row">
 | 
			
		||||
 | 
			
		||||
      <div class="col-sm-10 ">{% block content %}{% endblock %}</div>
 | 
			
		||||
      <ul class="right">
 | 
			
		||||
      {% if user.is_authenticated %}
 | 
			
		||||
        <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>
 | 
			
		||||
      </ul>
 | 
			
		||||
      {% else %}
 | 
			
		||||
        <li><a href="{% url 'sign-up'%}?next={{request.path}}">Sign up</a></li>
 | 
			
		||||
        <li><a href="{% url 'login'%}?next={{request.path}}">Login</a></li>
 | 
			
		||||
      </ul>
 | 
			
		||||
      {% endif %}
 | 
			
		||||
    </div>
 | 
			
		||||
  </nav>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="container">
 | 
			
		||||
  <div class="row">
 | 
			
		||||
    <div class="col s10 ">{% block content %}{% endblock %}</div>
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
</body>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user