est-ensemble: allow picture for form link cell (#77991)
gitea/publik-base-theme/pipeline/head This commit looks good Details

This commit is contained in:
Serghei Mihai 2023-05-30 11:38:26 +02:00
parent e6afbc3e43
commit bf65153163
3 changed files with 40 additions and 0 deletions

View File

@ -60,6 +60,27 @@ div.gru-nav {
}
}
div.wcsformcell.has-asset-picture {
a {
text-decoration: none;
&:hover {
color: $cell-entry-hover-color;
}
}
img {
padding: $cell-image-padding;
}
span.form--title {
display: block;
padding: 0 $cell-image-padding;
font-weight: 600;
}
div.description {
padding: 0 1rem;
font-size: 0.9em;
}
}
/* custom est-ensemble menu entry */
li.menu-est-ensemble a {
background: $ee-red;

View File

@ -10,6 +10,11 @@
"header:background": {"label": "Têtière : image de fond"},
"header:logo": {"label": "Têtière : logo"},
"emails:logo": {"label": "Emails : logo"}
},
"COMBO_CELL_ASSET_SLOTS.update": {
"wcs_wcsformcell": {
"picture": {"prefix": "Image"}
}
}
}
}

View File

@ -0,0 +1,14 @@
{% extends "combo/wcs/form_link_fragment.html" %}
{% load assets %}
{% block form-link-title %}
{% get_asset cell=cell type='picture' as asset %}
{% if asset.asset.url %}
{% include "combo/asset_picture_fragment.html" %}
{% endif %}
<span class="form--title">{{ title }}</span>
{% endblock %}
{% block form-link-description %}
{{ description|safe }}
{% endblock %}