entrouvert: add references cell type (#35274)

This commit is contained in:
Christophe Siraut 2019-08-08 13:53:36 +02:00
parent e04107f792
commit 6b62ead23d
3 changed files with 64 additions and 0 deletions

View File

@ -176,3 +176,30 @@ div.carrousel-content a.carrousel-previous.carrousel-previous {
div.carrousel-content a.carrousel-previous, div.carrousel-content a.carrousel-next {
color: #ccc;
}
div.references {
display: flex;
flex-wrap: wrap;
}
div.references div.references-item {
max-width: 560px;
margin: 5px auto;
}
div.references div.references-item div.references-item-image {
float: left;
min-width: 160px;
padding: 20px 20px 0 0;
@media screen and (max-width: $nav-mobile-limit) {
padding: 0;
}
}
div.references div.references-item div.references-item-content {
min-width: 380px;
overflow: hidden;
@media screen and (max-width: $nav-mobile-limit) {
float: left;
}
}

View File

@ -3,5 +3,16 @@
"variables": {
"theme_color": "#E0007A",
"include_top_links": true
},
"settings": {
"combo": {
"JSON_CELL_TYPES": {
"references": {
"name": "References",
"url": "https://gestion.entrouvert.org/api/references/",
"cache_duration": 300
}
}
}
}
}

View File

@ -0,0 +1,26 @@
{% load thumbnail %}
<h1>Références</h1>
<div class="references">
{% for e in json.data|dictsort:'client' %}
<div class="references-item">
<div class="references-item-image">
{% thumbnail e.logo "160x160" as im %}
<img src="{{ im.url }}">
{% endthumbnail %}
</div>
<div class="references-item-content">
<h3> {{ e.client }}</h3>
<strong>{{ e.title }}</strong>
<p>{{ e.description }}</p>
</div>
</div>
{% endfor %}
</div>