fix formatting and template-related issues

- remove unwanted spaces and line breaks
- use just an image instead of using figure and figure caption to
  display the icon in installation page
- eliminate unnecessary code duplication due to if condition

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Alice Kile 2019-11-11 09:55:44 +05:30 committed by James Valleroy
parent eb83e00011
commit 45b6aa6a1c
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
3 changed files with 35 additions and 47 deletions

View File

@ -36,6 +36,11 @@ is_essential = True
name = _('General Configuration') name = _('General Configuration')
description = [
_('Here you can set some general configuration options ',
'like hostname, domain name, webserver home page etc.')
]
depends = ['firewall', 'names'] depends = ['firewall', 'names']
manual_page = 'Configure' manual_page = 'Configure'

View File

@ -36,14 +36,15 @@
{% block content %} {% block content %}
<header class="app-header {% if not setup_helper.module.icon_filename %} app-header-single-column {% endif %}">
{% if setup_helper.module.icon_filename %} {% if setup_helper.module.icon_filename %}
<header class="app-header"> <img src="{% static 'theme/icons/' %}{{ setup_helper.module.icon_filename }}.svg" alt="{{ setup_helper.module.name }}"/>
<figure>
<img src="{% static 'theme/icons/' %}{{ setup_helper.module.icon_filename }}.svg"/> {% endif %}
<figcaption>{{ setup_helper.module.name }}</figcaption>
</figure> <section class="app-description" >
<section class="app-description">
<h2>{% trans "Installation" %}: {{ setup_helper.module.short_description|default:'' }} ({{ setup_helper.module.name }}) </h2> <h2>{% trans "Installation" %}: {{ setup_helper.module.short_description|default:'' }} ({{ setup_helper.module.name }}) </h2>
{% for paragraph in setup_helper.module.description %} {% for paragraph in setup_helper.module.description %}
@ -59,21 +60,6 @@
{% endif %} {% endif %}
</section> </section>
</header> </header>
{% else %}
<h2>{% trans "Installation" %}: {{ setup_helper.module.short_description|default:'' }} ({{ setup_helper.module.name }}) </h2>
{% for paragraph in setup_helper.module.description %}
<p>{{ paragraph|safe }}</p>
{% endfor %}
{% if setup_helper.module.manual_page %}
<p class="manual-page">
<a href="{% url 'help:manual-page' lang='-' page=setup_helper.module.manual_page %}">
{% trans 'Learn more...' %}
</a>
</p>
{% endif %}
{% endif %}
{% include "toolbar.html" with clients=setup_helper.module.clients %} {% include "toolbar.html" with clients=setup_helper.module.clients %}

View File

@ -545,21 +545,18 @@ a.menu_link_active {
margin-bottom: 20px; margin-bottom: 20px;
} }
.app-header > figure { .app-header > img {
margin-top: 25px; margin-top: 25px;
}
.app-header > figure img {
width: 100%; width: 100%;
} }
.app-header > figure figcaption {
text-align: center;
opacity: 0.5;
padding: 10px;
font-size: 12px;
}
.app-description { .app-description {
grid-column: 2; grid-column: 2;
} }
.app-header-single-column {
grid-template-columns: 1fr;
}
.app-header-single-column .app-description {
grid-column: 1;
}