Skip to content

Commit

Permalink
Add DjHTML to project (#95)
Browse files Browse the repository at this point in the history
* add djhtml

* apply djhtml to all project html templates

* configure djhtml pre-commit options
  • Loading branch information
fng3r authored Sep 1, 2024
1 parent d0cf2fd commit b128960
Show file tree
Hide file tree
Showing 52 changed files with 2,705 additions and 2,714 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/rtts/djhtml
rev: '3.0.6'
hooks:
- id: djhtml
# Indent only HTML files in template directories
files: .*/templates/.*\.html$
28 changes: 14 additions & 14 deletions haxball_site/templates/account/email_confirm.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@ <h1>{% trans "Confirm E-mail Address" %}</h1>

<div class="card-body">

{% if confirmation %}
{% if confirmation %}

{% user_display confirmation.email_address.user as user_display %}
{% user_display confirmation.email_address.user as user_display %}

<p>{% blocktrans with confirmation.email_address.email as email %}Пожалуйста, подтвердите, что
<a href="mailto:{{ email }}">{{ email }}</a> является email-адресом для пользователя {{ user_display }}
.{% endblocktrans %}</p>
<p>{% blocktrans with confirmation.email_address.email as email %}Пожалуйста, подтвердите, что
<a href="mailto:{{ email }}">{{ email }}</a> является email-адресом для пользователя {{ user_display }}
.{% endblocktrans %}</p>

<form method="post" action="{% url 'account_confirm_email' confirmation.key %}" class="text-center">
{% csrf_token %}
<button type="submit" class="btn btn-success">{% trans 'Confirm' %}</button>
</form>
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}" class="text-center">
{% csrf_token %}
<button type="submit" class="btn btn-success">{% trans 'Confirm' %}</button>
</form>

{% else %}
{% else %}

{% url 'account_email' as email_url %}
{% url 'account_email' as email_url %}

<p>{% blocktrans %}This e-mail confirmation link expired or is invalid. Please
<a href="{{ email_url }}">issue a new e-mail confirmation request</a>.{% endblocktrans %}</p>
<p>{% blocktrans %}This e-mail confirmation link expired or is invalid. Please
<a href="{{ email_url }}">issue a new e-mail confirmation request</a>.{% endblocktrans %}</p>

{% endif %}
{% endif %}
</div>
</div>

Expand Down
72 changes: 36 additions & 36 deletions haxball_site/templates/account/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,43 @@


{% block post %}
<div class="card">
<div class="card-header text-center">
<div class="card">
<div class="card-header text-center">
{#% get_providers as socialaccount_providers %#}
<h1>{% trans "Sign In" %}</h1>
{% if socialaccount_providers %}
<p>{% blocktrans with site.name as site_name %}Please sign in with one
of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a>
for a {{ site_name }} account and sign in below:{% endblocktrans %}</p>

<div class="socialaccount_ballot">

<ul class="socialaccount_providers">
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
</ul>

<div class="login-or">{% trans 'or' %}</div>

</div>

{% include "socialaccount/snippets/login_extra.html" %}

{% else %}
<p>Если у вас нету аккаунта, сперва
<a href="{{ signup_url }}">зарегистрируйтесь</a>.</p>
{% endif %}

<form class="login" method="POST" action="{% url 'account_login' %}">
{% csrf_token %}
<div class="form-group">
{{ form.as_p }}
<h1>{% trans "Sign In" %}</h1>
{% if socialaccount_providers %}
<p>{% blocktrans with site.name as site_name %}Please sign in with one
of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a>
for a {{ site_name }} account and sign in below:{% endblocktrans %}</p>

<div class="socialaccount_ballot">

<ul class="socialaccount_providers">
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
</ul>

<div class="login-or">{% trans 'or' %}</div>

</div>

{% include "socialaccount/snippets/login_extra.html" %}

{% else %}
<p>Если у вас нету аккаунта, сперва
<a href="{{ signup_url }}">зарегистрируйтесь</a>.</p>
{% endif %}

<form class="login" method="POST" action="{% url 'account_login' %}">
{% csrf_token %}
<div class="form-group">
{{ form.as_p }}
</div>
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
{% endif %}
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
<button class="primaryAction" type="submit">{% trans "Sign In" %}</button>
</form>
</div>
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
{% endif %}
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
<button class="primaryAction" type="submit">{% trans "Sign In" %}</button>
</form>
</div>
</div>
{% endblock %}
44 changes: 22 additions & 22 deletions haxball_site/templates/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ <h4 id="list-item-1">Регистрация</h4>

<p>&nbsp;</p>

</p>
<h4 id="list-item-2">Общие правила</h4>
<p>
</p>
<h4 id="list-item-2">Общие правила</h4>
<p>
<p><span
style="font-size:14px"><strong>Запрещается публиковать информацию, содержащую:</strong></span>
style="font-size:14px"><strong>Запрещается публиковать информацию, содержащую:</strong></span>
</p>

<p><span style="font-size:14px">&mdash; чрезмерное количество жаргонных слов, грубые и нецензурные слова или выражения;</span>
Expand All @@ -98,7 +98,7 @@ <h4 id="list-item-2">Общие правила</h4>
</p>

<p><span
style="font-size:14px">&mdash; политическую, религиозную и иную пропаганду;</span>
style="font-size:14px">&mdash; политическую, религиозную и иную пропаганду;</span>
</p>

<p><span style="font-size:14px">&mdash; призывы к насилию или нарушению действующего законодательства.</span>
Expand All @@ -107,9 +107,9 @@ <h4 id="list-item-2">Общие правила</h4>
<p><span style="font-size:14px"><strong>Наказание:</strong> редактирование или удаление информации, мьют или бан пользователя.</span>
</p>

</p>
<h4 id="list-item-3">Форум</h4>
<p>
</p>
<h4 id="list-item-3">Форум</h4>
<p>
<p><span style="font-size:14px"><strong>Запрещается:</strong></span></p>

<p><span style="font-size:14px">&mdash; дублирование уже существующих тем;</span></p>
Expand All @@ -123,30 +123,30 @@ <h4 id="list-item-3">Форум</h4>
<p><span style="font-size:14px"><strong>Наказание:</strong> удаление темы или перенос её в соответствующий раздел, лишение возможности создавать темы на форуме, мьют или бан пользователя.</span>
</p>

</p>
<h4 id="list-item-4">Подтверждение</h4>
<p>
</p>
<h4 id="list-item-4">Подтверждение</h4>
<p>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1"
required="True">
<label class="form-check-label" for="exampleCheck1">С правилами ознакомлен</label>
</div>
</p>
</div>
</p>
</div>
</div>

</div>

</div>


{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
{% endif %}
<div class="d-flex flex-row justify-content-end mt-2">
<button type="submit" class="btn btn-success">Зарегистрироваться</button>
</div>
</form>
</div>

{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
{% endif %}
<div class="d-flex flex-row justify-content-end mt-2">
<button type="submit" class="btn btn-success">Зарегистрироваться</button>
</div>
</form>
</div>
</div>
{% endblock %}
16 changes: 8 additions & 8 deletions haxball_site/templates/account/verification_sent.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
<h1>{% trans "Verify Your E-mail Address" %}</h1>
</div>

<div class="card-body">
<div class="card-body">
<!-- <p>{% blocktrans %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup
process. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p> -->
<p class="ml-2">На ваш e-mail отправлено письмо с ссылкой для подтверждения регистрации. Перейдите по полученной
ссылке, чтобы завершить процедуру регистрации!
Свяжитесь с <a href="{% url 'core:profile_detail' '1918' 'fng3r' %}">администратором</a>, если письмо не
приходит в течении нескольких минут.
</p>
<p class="ml-2">P.S. Проверьте папку спам</p>
</div>
<p class="ml-2">На ваш e-mail отправлено письмо с ссылкой для подтверждения регистрации. Перейдите по полученной
ссылке, чтобы завершить процедуру регистрации!
Свяжитесь с <a href="{% url 'core:profile_detail' '1918' 'fng3r' %}">администратором</a>, если письмо не
приходит в течении нескольких минут.
</p>
<p class="ml-2">P.S. Проверьте папку спам</p>
</div>

</div>
{% endblock %}
92 changes: 46 additions & 46 deletions haxball_site/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,64 @@

<!DOCTYPE html>
<html lang="en">
<head>
<head>
<!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
<script type="text/javascript">
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");

ym(97769152, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/97769152" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
ym(97769152, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/97769152" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->

<meta charset="UTF-8">
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{% static "bootstrap/css/bootstrap.min.css" %}">
<meta charset="UTF-8">
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{% static "bootstrap/css/bootstrap.min.css" %}">
<!--<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">-->
<link rel="stylesheet" href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'>
<link rel="shortcut icon" href="{% static "img/logo_try.png" %}" type="image/x-icon">
<link rel="stylesheet" href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'>
<link rel="shortcut icon" href="{% static "img/logo_try.png" %}" type="image/x-icon">
<!-- Google Fonts-->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=JetBrains+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Open+Sans&family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Source+Serif+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap"
rel="stylesheet">
<style>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=JetBrains+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Open+Sans&family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Source+Serif+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap"
rel="stylesheet">
<style>

body {
background: linear-gradient(120deg, #000000, #10205a, #00a080, #40ffbf);
background-size: 160% 160%;
background-repeat: no-repeat;
background-attachment: fixed;
animation: gradient 22s ease-in-out infinite;
height: 100vh;
}
body {
background: linear-gradient(120deg, #000000, #10205a, #00a080, #40ffbf);
background-size: 160% 160%;
background-repeat: no-repeat;
background-attachment: fixed;
animation: gradient 22s ease-in-out infinite;
height: 100vh;
}


</style>
{% block styles %} {% endblock %}
<script data-ad-client="ca-pub-1603400488742656" async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script type="text/javascript" src="{% static "jquery/jquery-3.5.1.min.js" %}"></script>
<script type="text/javascript" src="{% static "bootstrap/js/bootstrap.min.js" %}"></script>
<script type="text/javascript" src="{% static "summernote/summernote.min.js" %}"></script>
</style>
{% block styles %} {% endblock %}
<script data-ad-client="ca-pub-1603400488742656" async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script type="text/javascript" src="{% static "jquery/jquery-3.5.1.min.js" %}"></script>
<script type="text/javascript" src="{% static "bootstrap/js/bootstrap.min.js" %}"></script>
<script type="text/javascript" src="{% static "summernote/summernote.min.js" %}"></script>


{% block scripts %} {% endblock %}
</head>
<body>
{% block scripts %} {% endblock %}
</head>
<body>

{% include "core/include/navbar.html" %}
{% include "core/include/running_line.html" %}
{% include "core/include/navbar.html" %}
{% include "core/include/running_line.html" %}

{% block content %} {% endblock %}
{% block content %} {% endblock %}

</body>
</body>
</html>
Loading

0 comments on commit b128960

Please sign in to comment.