Skip to content

Commit

Permalink
Fix html formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
manti-by committed Feb 12, 2024
1 parent 5519155 commit 905259a
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 191 deletions.
4 changes: 2 additions & 2 deletions semkov/templates/404.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "base.html" %}

{% block content %}
<h1>Page not found</h1>
<h2>Sorry, this page could not be found.</h2>
<h1>Page not found</h1>
<h2>Sorry, this page could not be found.</h2>
{% endblock %}
4 changes: 2 additions & 2 deletions semkov/templates/500.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "base.html" %}

{% block content %}
<h1>Internal server error</h1>
<h2>Sorry, there seems to be an error. Please try again soon.</h2>
<h1>Internal server error</h1>
<h2>Sorry, there seems to be an error. Please try again soon.</h2>
{% endblock %}
127 changes: 65 additions & 62 deletions semkov/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,78 +2,81 @@

<!DOCTYPE html>
<html class="no-js" lang="ru">
<head>
<title>
{% block title %}
{% if self.seo_title %}{{ self.seo_title }}{% else %}{{ self.title }}{% endif %}
{% endblock %}
{% block title_suffix %}
{% with self.get_site.site_name as site_name %}
{% if site_name %}- {{ site_name }}{% endif %}
{% endwith %}
{% endblock %}
</title>
<head>
<title>
{% block title %}
{% if self.seo_title %}{{ self.seo_title }}{% else %}{{ self.title }}{% endif %}
{% endblock %}
{% block title_suffix %}
{% with self.get_site.site_name as site_name %}
{% if site_name %}- {{ site_name }}{% endif %}
{% endwith %}
{% endblock %}
</title>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">

<meta name="theme-color" content="#ff6f61">
<meta name="application-name" content="Semkov Gorodok">
<meta name="description"
content="{% trans 'Semkov Gorodok - a village in Papernyansky village council, Minsk region, Belarus' %}">
<meta name="theme-color" content="#ff6f61">
<meta name="application-name" content="Semkov Gorodok">
<meta name="description"
content="{% trans 'Semkov Gorodok - a village in Papernyansky village council, Minsk region, Belarus' %}">

<meta name="mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">

{% block open-graph %}
<meta property="og:type" content="website">
<meta property="og:title"
content="{% trans 'Semkov Gorodok' %}">
<meta property="og:description"
content="{% trans 'Semkov Gorodok - a village in Papernyansky village council, Minsk region, Belarus' %}">
<meta property="og:image" content="{% static 'img/semkov-gorodok.jpg' %}">
{% endblock %}
{% block open-graph %}
<meta property="og:type" content="website">
<meta property="og:title"
content="{% trans 'Semkov Gorodok' %}">
<meta property="og:description"
content="{% trans 'Semkov Gorodok - a village in Papernyansky village council, Minsk region, Belarus' %}">
<meta property="og:image" content="{% static 'img/semkov-gorodok.jpg' %}">
{% endblock %}

<link rel="manifest" href="{% static "manifest.json" %}">

<link rel="icon" type="image/x-icon" href="{% static "favicon.ico" %}">
<link rel="icon" type="image/png" sizes="18x18" href="{% static "img/appicon/18x18.png" %}">
<link rel="icon" type="image/png" sizes="24x24" href="{% static "img/appicon/24x24.png" %}">
<link rel="icon" type="image/png" sizes="36x36" href="{% static "img/appicon/36x36.png" %}">
<link rel="icon" type="image/png" sizes="48x48" href="{% static "img/appicon/48x48.png" %}">
<link rel="icon" type="image/png" sizes="72x72" href="{% static "img/appicon/72x72.png" %}">
<link rel="icon" type="image/png" sizes="96x96" href="{% static "img/appicon/96x96.png" %}">
<link rel="icon" type="image/png" sizes="128x128" href="{% static "img/appicon/128x128.png" %}">
<link rel="icon" type="image/png" sizes="144x144" href="{% static "img/appicon/144x144.png" %}">
<link rel="icon" type="image/png" sizes="192x192" href="{% static "img/appicon/192x192.png" %}">

<link rel="manifest" href="{% static "manifest.json" %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/index.css' %}">
{% block extra_css %}{% endblock %}
<link rel="stylesheet" type="text/css" href="{% static 'css/responsive.css' %}" media="screen">

<link rel="icon" type="image/x-icon" href="{% static "favicon.ico" %}">
<link rel="icon" type="image/png" sizes="18x18" href="{% static "img/appicon/18x18.png" %}">
<link rel="icon" type="image/png" sizes="24x24" href="{% static "img/appicon/24x24.png" %}">
<link rel="icon" type="image/png" sizes="36x36" href="{% static "img/appicon/36x36.png" %}">
<link rel="icon" type="image/png" sizes="48x48" href="{% static "img/appicon/48x48.png" %}">
<link rel="icon" type="image/png" sizes="72x72" href="{% static "img/appicon/72x72.png" %}">
<link rel="icon" type="image/png" sizes="96x96" href="{% static "img/appicon/96x96.png" %}">
<link rel="icon" type="image/png" sizes="128x128" href="{% static "img/appicon/128x128.png" %}">
<link rel="icon" type="image/png" sizes="144x144" href="{% static "img/appicon/144x144.png" %}">
<link rel="icon" type="image/png" sizes="192x192" href="{% static "img/appicon/192x192.png" %}">
<link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
</head>

<link rel="stylesheet" type="text/css" href="{% static 'css/index.css' %}">
{% block extra_css %}{% endblock %}
<link rel="stylesheet" type="text/css" href="{% static 'css/responsive.css' %}" media="screen">
<body class="{% block body_class %}{% endblock %}">
{% wagtailuserbar %}

<link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
</head>
{% block content %}{% endblock %}

<body class="{% block body_class %}{% endblock %}">
{% wagtailuserbar %}
<script type="application/javascript">
const GOOGLE_RECAPTCHA_SITE_KEY = "{% get_settings 'GOOGLE_RECAPTCHA_SITE_KEY' %}"
</script>
{% block extra_js %}{% endblock %}

{% block content %}{% endblock %}
<script async
src="https://www.google.com/recaptcha/api.js?render={% get_settings 'GOOGLE_RECAPTCHA_SITE_KEY' %}"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-142198021-1"></script>
<script>
window.dataLayer = window.dataLayer || [];

<script type="application/javascript">
const GOOGLE_RECAPTCHA_SITE_KEY = "{% get_settings 'GOOGLE_RECAPTCHA_SITE_KEY' %}"
</script>
{% block extra_js %}{% endblock %}
function gtag() {
dataLayer.push(arguments);
}

<script async src="https://www.google.com/recaptcha/api.js?render={% get_settings 'GOOGLE_RECAPTCHA_SITE_KEY' %}"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-142198021-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-142198021-1');
</script>
</body>
gtag('js', new Date());
gtag('config', 'UA-142198021-1');
</script>
</body>
</html>
157 changes: 78 additions & 79 deletions semkov/templates/emails/email.html
Original file line number Diff line number Diff line change
@@ -1,95 +1,94 @@
{% load i18n %}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="ru">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>{{ email.subject }}</title>
<style type="text/css">
.email {
width: 100%;
padding: 10px 0;
margin: 0;
font-family: Arial, Tahoma, Verdana, sans-serif;
font-size: 18px;
background: #EEE;
}
.email {
width: 100%;
padding: 10px 0;
margin: 0;
font-family: Arial, Tahoma, Verdana, sans-serif;
font-size: 18px;
background: #EEE;
}

.container {
width: 90%;
max-width: 600px;
margin: 0 auto;
padding: 15px 0;
}
.container {
width: 90%;
max-width: 600px;
margin: 0 auto;
padding: 15px 0;
}

h1 {
margin: 0;
padding: 30px;
font-size: 24px;
font-weight: normal;
color: #FFF;
background: #ff6f61;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
h1 {
margin: 0;
padding: 30px;
font-size: 24px;
font-weight: normal;
color: #FFF;
background: #ff6f61;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}

.body {
padding: 20px 0 10px 0;
background: #FFF;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
.body {
padding: 20px 0 10px 0;
background: #FFF;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}

.image {
width: 90%;
margin: 0 30px 10px 30px;
padding-bottom: 20px;
text-align: center;
border-bottom: 1px solid #EEE;
}
.image {
width: 90%;
margin: 0 30px 10px 30px;
padding-bottom: 20px;
text-align: center;
border-bottom: 1px solid #EEE;
}

.row {
padding: 10px 30px;
}
.row {
padding: 10px 30px;
}

.footer {
margin: 10px 30px 0 30px;
padding: 15px 0 10px;
color: #999;
text-align: center;
font-size: 12px;
border-top: 1px solid #EEE;
}
.footer {
margin: 10px 30px 0 30px;
padding: 15px 0 10px;
color: #999;
text-align: center;
font-size: 12px;
border-top: 1px solid #EEE;
}
</style>
</head>
<body>
</head>
<body>
<div class="email">
<div class="container">
<h1>{{ email.subject }} </h1>
<div class="body">
<div class="image">
<img src="cid:logo" alt="logo"/>
</div>
<div class="row">
<strong>{% trans 'From' %}</strong>:
{% if email.name %}
{{ email.name }}, {{ email.contact }}
{% else %}
{{ email.contact }}
{% endif %}
</div>
<div class="row">
<strong>{% trans 'Message' %}</strong>:
</div>
<div class="row">
{{ email.message|safe }}
</div>
<div class="footer">
{% trans 'Created' %}: {{ email.created }}
</div>
</div>
<div class="container">
<h1>{{ email.subject }} </h1>
<div class="body">
<div class="image">
<img src="cid:logo" alt="logo"/>
</div>
<div class="row">
<strong>{% trans 'From' %}</strong>:
{% if email.name %}
{{ email.name }}, {{ email.contact }}
{% else %}
{{ email.contact }}
{% endif %}
</div>
<div class="row">
<strong>{% trans 'Message' %}</strong>:
</div>
<div class="row">
{{ email.message|safe }}
</div>
<div class="footer">
{% trans 'Created' %}: {{ email.created }}
</div>
</div>
</div>
</div>
</body>
</body>
</html>
48 changes: 24 additions & 24 deletions semkov/templates/tags/document_table.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{% load static i18n %}

<table class="document {{ classes|join:' ' }}">
{% for item in items %}
{% for item in items %}
{% if forloop.counter == 1 %}
<tr>
{% for row in item.data %}
<th>{{ row }}</th>
{% endfor %}
{% if item.days %}
<th class="days">{% trans 'Days' %}</th>
{% endif %}
</tr>
<tr>
{% for row in item.data %}
<th>{{ row }}</th>
{% endfor %}
{% if item.days %}
<th class="days">{% trans 'Days' %}</th>
{% endif %}
</tr>
{% else %}
<tr>
{% for row in item.data %}
<td>{{ row }}</td>
<tr>
{% for row in item.data %}
<td>{{ row }}</td>
{% endfor %}
{% if item.days %}
<td class="days">
{% for key, value in item.days.items %}
<span class="day {% if value %}active{% endif %}">
<label>{% trans key %}</label>
</span>
{% endfor %}
{% if item.days %}
<td class="days">
{% for key, value in item.days.items %}
<span class="day {% if value %}active{% endif %}">
<label>{% trans key %}</label>
</span>
{% endfor %}
</td>
{% endif %}
</tr>
</td>
{% endif %}
</tr>
{% endif %}
{% endfor %}
</table>
{% endfor %}
</table>
Loading

0 comments on commit 905259a

Please sign in to comment.