adapt a2 accounts page to service appearance customization (#77688) #271

Merged
pmarillonnet merged 1 commits from wip/77688-a2-accounts-service-customization into main 2023-06-13 15:16:52 +02:00
1 changed files with 38 additions and 0 deletions

View File

@ -1,10 +1,48 @@
{% extends "authentic2/base.html" %}
{% load i18n %}
{% if service_custom_appearance %}
{% block extra-top-head %}
{{ block.super }}
{% firstof generic_service_colour service_colour service_ou_colour as colour %}
{% if colour %}
<style>
.gru-content div#a2-service-information h2 {
color: {{ colour }};
}
</style>
{% endif %}
{% endblock %}
{% endif %}
{% block title %}Gestion du compte{% endblock %}
{% block extra-body-class %}{{ block.super }} account-page{% endblock %}
{% block content %}
{% block before-main-content %}
{{ block.super }}
{% if service_custom_appearance %}
{% firstof generic_service_name service.name service.ou.name as name %}
{% firstof generic_service_logo_url service_logo_url service_ou_logo_url as logo_url %}
<div id="a2-service-information" class="service-message">
<h2>{{ name }}</h2>
<div class="cell--body">
{% if logo_url %}
<picture>
{% if service.home_url or generic_service_home_url %}
<a href="{% firstof service.home_url generic_service_home_url %}">
{% endif %}
<img src="{{ logo_url }}" alt=""/>
{% if service.home_url or generic_service_home_url %}
</a>
{% endif %}
</picture>
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}
<div class="column profile">
{% block profile-pre %}{% endblock %}
<div class="block" id="a2-profile">