Projet

Général

Profil

0001-gers-cd32-add-assets-on-link-cell-48011.patch

Nicolas Roche, 05 novembre 2020 15:38

Télécharger (3,04 ko)

Voir les différences:

Subject: [PATCH] gers-cd32: add assets on link-cell (#48011)

 static/gers-cd32/_custom.scss                 | 33 +++++++++++++++++++
 static/gers-cd32/config.json                  |  5 +++
 .../variants/gers-cd32/combo/link-cell.html   | 16 +++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 templates/variants/gers-cd32/combo/link-cell.html
static/gers-cd32/_custom.scss
95 95
	display: block;
96 96
}
97 97

  
98 98
#sidebar {
99 99
	box-shadow: 3px 3px 20px 0px #dedede;
100 100
	margin-right: 2.5em;
101 101
}
102 102

  
103
div.linkcell.has-asset-picture {
104
	border: 1px solid $secondary-color;
105
	text-transform: uppercase;
106
	font-size: 90%;
107
	&:hover {
108
		background-color: $secondary-color;
109
	}
110
	@media screen and ($max-mobile-viewport) {
111
		box-sizing: content-box;
112
	}
113
	a.image-link {
114
		padding: 5rem 0 0.5em 1.5em;
115
		background-position: 1rem 1rem;
116
		background-size: auto 2.5rem;
117
		background-repeat: no-repeat;
118
		display: block;
119
		&::after {
120
		    display: block;
121
		    margin-top: 0.5em;
122
		    content: '';
123
		    background: $tertiary-color;
124
		    width: 2em;
125
		    height: 2px;
126
		}
127
		@media screen and ($max-mobile-viewport) {
128
			padding-top: 1rem;
129
			padding-left: 5rem;
130
			background-position: 1rem center;
131
		}
132
		text-decoration: none;
133
	}
134
}
135

  
103 136
@mixin form-icon($content) {
104 137
	content: $content;
105 138
	font-family: FontAwesome;
106 139
}
107 140

  
108 141
div#footer-wrapper {
109 142
	padding: 66px 0 73px;
110 143
}
static/gers-cd32/config.json
4 4
    "logo_link_url": "/",
5 5
    "theme_color": "#ae2217"
6 6
  },
7 7
  "settings": {
8 8
    "combo": {
9 9
      "COMBO_ASSET_SLOTS.update": {
10 10
        "header:background": { "label": "Têtière : fond" },
11 11
        "header:logo": { "label": "Têtière : logo" }
12
      },
13
      "COMBO_CELL_ASSET_SLOTS.update": {
14
        "data_linkcell": {
15
          "picture": {"prefix": "Image"}
16
        }
12 17
      }
13 18
    }
14 19
  }
15 20
}
templates/variants/gers-cd32/combo/link-cell.html
1
{% load assets %}
2
{% get_asset cell=cell type='picture' as asset %}
3

  
4
{% if asset.asset.url %}
5
<a class="image-link" href="{{url}}" style="background-image: url({{asset.asset.url}})">
6
<div>
7
  <strong>{{ title }}</strong>
8
  {% if cell.link_page.description %}<p>{{ cell.link_page.description }}</p>{% endif %}
9
</div>
10
</a>
11
{% else %}
12
{% block cell-content %}
13
{% include "combo/asset_picture_fragment.html" %}
14
<a href="{{url}}">{{title}}</a>
15
{% endblock %}
16
{% endif %}
0
-