style fixes

This commit is contained in:
Kaibu
2021-06-05 18:10:10 +02:00
parent fd7e20a46b
commit 3d60379ed0
20 changed files with 396 additions and 159 deletions

View File

@@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load crispy_forms_filters %}
{% load i18n %}
{% load static %}
{% load account socialaccount %}
@@ -8,6 +9,7 @@
{% block content %}
<div class="row">
<div class="col-12" style="text-align: center">
<h3>{% trans "Sign In" %}</h3>
@@ -17,6 +19,7 @@
<div class="row">
<div class="col-6 offset-3">
<hr>
<form class="login" method="POST" action="{% url 'account_login' %}">
{% csrf_token %}
{{ form | crispy }}
@@ -25,12 +28,12 @@
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
{% endif %}
<button class="btn btn-primary" type="submit">{% trans "Sign In" %}</button>
<a class="btn btn-success" href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a>
<button class="btn btn-success" type="submit">{% trans "Sign In" %}</button>
<a class="btn btn-secondary" href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a>
{% if EMAIL_ENABLED %}
<a class="btn btn-secondary"
href="{% url 'account_reset_password' %}">{% trans "Reset Password" %}</a>
<a class="btn btn-warning float-right"
href="{% url 'account_reset_password' %}">{% trans "Reset My Password" %}</a>
{% endif %}
</form>
</div>

View File

@@ -8,25 +8,31 @@
{% block content %}
<h3>{% trans "Password Reset" %}</h3>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
<div class="row">
<div class="col-12" style="text-align: center">
<h3>{% trans "Password Reset" %}</h3>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
</div>
</div>
{% if EMAIL_ENABLED %}
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p>
<form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
{% csrf_token %}
{{ form | crispy }}
<input type="submit" class="btn btn-success" value="{% trans 'Reset My Password' %}"/>
<a class="btn btn-primary" href="{% url 'account_login' %}">{% trans "Sign In" %}</a>
<a class="btn btn-info" href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a>
</form>
{% else %}
<p>{% trans 'Password reset is disabled on this instance.' %}</p>
{% endif %}
<div class="row">
<div class="col-6 offset-3">
<hr>
{% if EMAIL_ENABLED %}
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p>
<form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
{% csrf_token %}
{{ form | crispy }}
<input type="submit" class="btn btn-warning float-right" value="{% trans 'Reset My Password' %}"/>
</form>
{% else %}
<p>{% trans 'Password reset is disabled on this instance.' %}</p>
{% endif %}
</div>
</div>
{% endblock %}

View File

@@ -7,52 +7,65 @@
{% block content %}
<h3>{% trans 'Create your Account' %}</h3>
<div class="row">
<div class="col-12" style="text-align: center">
<h3>{% trans "Create an Account" %}</h3>
</div>
</div>
<form method="post">
{% csrf_token %}
<div class="row">
<div class="col-6 offset-3">
<hr>
<form method="post">
{% csrf_token %}
<div class="form-group">
{{ form.username |as_crispy_field }}
</div>
<div class="form-group">
{{ form.email |as_crispy_field }}
</div>
<div class="form-group">
{{ form.password1 |as_crispy_field }}
</div>
<div class="form-group">
{{ form.password2 |as_crispy_field }}
</div>
<div class="form-group">
{{ form.username |as_crispy_field }}
</div>
<div class="form-group">
{{ form.email |as_crispy_field }}
</div>
<div class="form-group">
{{ form.password1 |as_crispy_field }}
</div>
<div class="form-group">
{{ form.password2 |as_crispy_field }}
</div>
{% if TERMS_URL != '' or PRIVACY_URL != '' %}
<div class="form-group">
{{ form.terms |as_crispy_field }}
<small>
{% trans 'I accept the follwoing' %}
{% if TERMS_URL != '' %}
<a href="{{ TERMS_URL }}" target="_blank" rel="noreferrer nofollow">{% trans 'Terms and Conditions' %}</a>
{% endif %}
{% if TERMS_URL != '' or PRIVACY_URL != '' %}
{% trans 'and' %}
{% endif %}
{% if PRIVACY_URL != '' %}
<a href="{{ PRIVACY_URL }}" target="_blank" rel="noreferrer nofollow">{% trans 'Privacy Policy' %}</a>
{% endif %}
</small>
</div>
{% endif %}
<div class="form-group">
{{ form.terms |as_crispy_field }}
<small>
{% trans 'I accept the follwoing' %}
{% if TERMS_URL != '' %}
<a href="{{ TERMS_URL }}" target="_blank"
rel="noreferrer nofollow">{% trans 'Terms and Conditions' %}</a>
{% endif %}
{% if TERMS_URL != '' or PRIVACY_URL != '' %}
{% trans 'and' %}
{% endif %}
{% if PRIVACY_URL != '' %}
<a href="{{ PRIVACY_URL }}" target="_blank"
rel="noreferrer nofollow">{% trans 'Privacy Policy' %}</a>
{% endif %}
</small>
</div>
{% endif %}
{% if CAPTCHA_ENABLED %}
<div class="form-group">
{{ form.captcha.errors }}
{{ form.captcha }}
</div>
{% endif %}
{% if CAPTCHA_ENABLED %}
<div class="form-group">
{{ form.captcha.errors }}
{{ form.captcha }}
</div>
{% endif %}
<button class="btn btn-success" type="submit"><i class="fas fa-save"></i> {% trans 'Create User' %}</button>
</form>
<button class="btn btn-success" type="submit"><i class="fas fa-save"></i> {% trans 'Create User' %}
</button>
</form>
<p>{% trans 'Already have an account?' %} <a href="{% url 'account_login' %}">{% trans "Sign In" %}</a></p>
<p>{% trans 'Already have an account?' %} <a href="{% url 'account_login' %}">{% trans "Sign In" %}</a></p>
</div>
</div>
{% endblock %}

View File

@@ -5,9 +5,14 @@
{% block title %}{% trans "Sign Up Closed" %}{% endblock %}
{% block content %}
<h1>{% trans "Sign Up Closed" %}</h1>
<div class="row">
<div class="col-6 offset-3">
<hr>
<h1>{% trans "Sign Up Closed" %}</h1>
<p>{% trans "We are sorry, but the sign up is currently closed." %}</p>
<p>{% trans "We are sorry, but the sign up is currently closed." %}</p>
<a class="btn btn-primary" href="{% url 'account_login' %}">{% trans "Sign In" %}</a>
<a class="btn btn-primary" href="{% url 'account_login' %}">{% trans "Sign In" %}</a>
</div>
</div>
{% endblock %}

View File

@@ -31,6 +31,7 @@
<!-- Bootstrap 4 -->
<link id="id_main_css" href="{% theme_url request %}" rel="stylesheet">
<link href="{% static 'css/app.min.css' %}" rel="stylesheet">
<script src="{% static 'js/jquery-3.5.1.min.js' %}"></script>
<script src="{% static 'js/popper.min.js' %}"></script>
@@ -65,9 +66,9 @@
<span class="navbar-toggler-icon"></span>
</button>
{% if request.user.is_authenticated and request.user.userpreference.theme == request.user.userpreference.TANDOOR %}
{% if not request.user.is_authenticated or request.user.userpreference.theme == request.user.userpreference.TANDOOR %}
<a class="navbar-brand p-0 me-2 justify-content-center" href="/" aria-label="Tandoor">
<img class="brand-icon" src="{% static 'assets/brand_logo.svg' %}" alt="" style="height: 5vh;">
<img class="brand-icon" src="{% static 'assets/brand_logo.png' %}" alt="" style="height: 5vh;">
</a>
{% endif %}
<div class="collapse navbar-collapse" id="navbarText">

View File

@@ -14,7 +14,12 @@
<br/>
<br/>
<div class="text-center">
<i class="fas fa-sync fa-spin fa-10x"></i>
{% if not request.user.is_authenticated or request.user.userpreference.theme == request.user.userpreference.TANDOOR %}
<img class="spinner-tandoor"/>
{% else %}
<i class="fas fa-sync fa-spin fa-10x"></i>
{% endif %}
<br/>
<br/>

View File

@@ -35,7 +35,11 @@
<div v-if="!recipe" class="text-center">
<br/>
<i class="fas fa-spinner fa-spin fa-8x"></i>
{% if not request.user.is_authenticated or request.user.userpreference.theme == request.user.userpreference.TANDOOR %}
<img class="spinner-tandoor"/>
{% else %}
<i class="fas fa-spinner fa-spin fa-8x"></i>
{% endif %}
</div>
<div v-if="recipe">
@@ -668,7 +672,7 @@
this.recipe.steps[step].ingredients[id] = new_unit
},
addKeyword: function (tag) {
let new_keyword = {'label':tag,'name':tag}
let new_keyword = {'label': tag, 'name': tag}
this.recipe.keywords.push(new_keyword)
},
searchKeywords: function (query) {

View File

@@ -37,7 +37,11 @@
<template v-if="shopping_list !== undefined">
<div class="text-center" v-if="loading">
<i class="fas fa-spinner fa-spin fa-8x"></i>
{% if not request.user.is_authenticated or request.user.userpreference.theme == request.user.userpreference.TANDOOR %}
<img class="spinner-tandoor"/>
{% else %}
<i class="fas fa-spinner fa-spin fa-8x"></i>
{% endif %}
</div>
<div v-else-if="edit_mode">
<div class="row">

View File

@@ -29,7 +29,7 @@
style="height:50%"
href="{% bookmarklet request %}"
title="{% trans 'Drag me to your bookmarks to import recipes from anywhere' %}">
<img src="{% static 'assets/favicon-16x16.png' %}">{% trans 'Bookmark Me!' %} </a>
<img src="{% static 'assets/favicon-16x16.png' %}"> {% trans 'Bookmark Me!' %} </a>
</div>
<nav class="nav nav-pills flex-sm-row" style="margin-bottom:10px">
<a class="nav-link active" href="#nav-url" data-toggle="tab" role="tab" aria-controls="nav-url"
@@ -156,7 +156,11 @@
<div v-if="loading" class="text-center">
<br/>
<i class="fas fa-spinner fa-spin fa-8x"></i>
{% if not request.user.is_authenticated or request.user.userpreference.theme == request.user.userpreference.TANDOOR %}
<img class="spinner-tandoor"/>
{% else %}
<i class="fas fa-spinner fa-spin fa-8x"></i>
{% endif %}
</div>
<!-- recipe preview before Import -->