grandlyon-sau: use assets for services background image (#74716)
gitea/publik-base-theme/pipeline/head This commit looks good Details

This commit is contained in:
Serghei Mihai 2023-02-20 14:50:18 +01:00 committed by Gitea
parent b5dcbbd32c
commit 2dabed57f0
9 changed files with 33 additions and 21 deletions

View File

@ -370,32 +370,30 @@ div.cell > div {
}
}
}
@each $service in (grandlyon-connect, trabool, toodego, cozy, ecolyo, pilote) {
div.#{$service} {
a {
background-image: url('img/service-#{$service}.png');
background-repeat: no-repeat;
background-size: 200px auto;
background-position: center top;
padding-top: 150px;
position: relative;
filter: grayscale(1);
&:hover {
filter: none;
&::after {
background-color: $primary-color;
}
}
div.service-sau.has-asset-picture {
a {
background-repeat: no-repeat;
background-size: 200px auto;
background-position: center 10%;
padding-top: 150px;
position: relative;
filter: grayscale(1);
&:hover {
filter: none;
&::after {
position: absolute;
top: 145px;
background-color: #000000;
display: block;
height: calc(100% - 145px);
background-color: $primary-color;
}
}
&::after {
position: absolute;
top: 145px;
background-color: #000000;
display: block;
height: calc(100% - 145px);
}
}
}
}
}
}

View File

@ -3,5 +3,14 @@
"variables": {
"theme_color": "#E42320",
"favicon": "grandlyon-sau/img/favicon.png"
},
"settings": {
"combo": {
"COMBO_CELL_ASSET_SLOTS.update": {
"data_linkcell": {
"picture": { "prefix": "Image" }
}
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,5 @@
{% load assets %}
{% get_asset cell=cell type='picture' as asset %}
<div class="links-list">
<ul><li><a href="{{url}}"{% if asset %} style="background-image: url({{ asset.asset.url }})"{% endif %}>{{title}}</a></li></ul>
</div>