nanterre-2023: add optionnal page title background image (#83201)

This commit is contained in:
Thomas Jund 2024-01-29 17:44:02 +01:00
parent 8f5adf3222
commit c067a39ee6
3 changed files with 27 additions and 1 deletions

View File

@ -387,6 +387,19 @@ div#main-content-wrapper {
border-left-color: $red;
border-left-style: solid;
padding-left: 0;
position: relative;
&::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: Min(40%, calc(8 * #{$fz-1}));
background-image: var(--page-picture, var(--page-title-background, none));
background-repeat: no-repeat;
background-size: cover;
}
}
}
.theme-page-title {

View File

@ -8,7 +8,8 @@
"combo": {
"COMBO_ASSET_SLOTS.update": {
"header:logo": { "label": "Têtière : logo" },
"emails:logo": {"label": "Emails : logo"}
"emails:logo": {"label": "Emails : logo"},
"page-title:background": {"label": "Titre de la page : image d'arrière plan"}
},
"COMBO_CELL_TEMPLATES.update" : {
"data_menucell" : {

View File

@ -1,4 +1,16 @@
{% extends "theme.html" %}
{% load assets %}
{% block extra_css %}
{% get_asset "page-title:background" as page_title_background %}
{% if page_title_background %}
<style>
html {
--page-title-background: url({% asset_url page_title_background %});
}
</style>
{% endif %}
{% endblock %}
{% block header-content %}
{% block nav %}{% endblock %}