Project

General

Profile

0001-eurelien-cd28-add-picto-on-wcs-forms-of-category-cel.patch

Nicolas Roche, 20 Oct 2021 05:44 PM

Download (2.92 KB)

View differences:

Subject: [PATCH 1/2] eurelien-cd28: add picto on wcs-forms-of-category-cell
 (#57950)

 static/eurelien-cd28/_custom.scss             | 25 +++++++++++++++++++
 static/eurelien-cd28/config.json              |  8 ++++++
 .../combo/wcs/forms_of_category.html          | 16 ++++++++++++
 3 files changed, 49 insertions(+)
 create mode 100644 templates/variants/eurelien-cd28/combo/wcs/forms_of_category.html
static/eurelien-cd28/_custom.scss
75 75
	.cancel-button button, .previous-button button{
76 76
		background: $nav-background;
77 77
	}
78 78
}
79 79

  
80 80
.pk-information {
81 81
	@include notification-message($notification_info_color, "\f164");
82 82
}
83

  
84
#columns {
85
	div.wcs-forms-of-category-cell {
86
		img {
87
			border-radius: 10px;
88
		}
89
		h2 {
90
			background: transparent center left no-repeat;
91
			height: 50px;
92
			margin: 0;
93
			margin-left: 10px;
94
			display: flex;
95
			flex-direction: column;
96
			justify-content: center;
97
			padding-left: 65px;
98
			text-align: left;
99
			span {
100
				font-size: 30px;
101
			}
102
		}
103
	}
104
	@media screen and ($max-mobile-viewport) {
105
		text-align: center;
106
	}
107
}
static/eurelien-cd28/config.json
4 4
    "theme_color": "#ffcd00",
5 5
    "favicon": "eurelien-cd28/img/favicon.ico"
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
      "WCS_CATEGORY_ASSET_SLOTS": {
14
        "picture": {
15
          "prefix": "Photographie"
16
        },
17
        "logo": {
18
          "prefix": "Pictogramme"
19
        }
12 20
      }
13 21
    }
14 22
  }
15 23
}
templates/variants/eurelien-cd28/combo/wcs/forms_of_category.html
1
{% extends 'combo/wcs/forms_of_category.html' %}
2
{% load assets i18n static %}
3

  
4
{% block cell-header %}{% endblock cell-header %}
5

  
6
{% block cell-top-content %}
7
<picture>
8
<img src="{% asset_url "wcs:category:picture:"|add:cell.category_reference size="265x174" crop="center" %}" alt="">
9
</picture>
10
<h2 style="background-image: url({% asset_url "wcs:category:logo:"|add:cell.category_reference size="65x65" %})"><span>{{ title }}</span></h2>
11
{% if description %}
12
<div class="intro">
13
{{ description|safe }}
14
</div>
15
{% endif %}
16
{% endblock cell-top-content %}
0
-