-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcollections.twig
66 lines (60 loc) · 1.79 KB
/
collections.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{% extends 'layout.twig' %}
{% block body %}
{% include '_featured-collections.twig' with { 'h_tag': '1' } %}
{% if collections | length > 0 %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2 class="collections__heading section-heading">Todas las colecciones</h2>
</div>
</div>
<div class="row collection__grid collection__layout__all-items">
{% for collection in collections %}
<div class="col-sm-3">
{% include '_collection-square.twig' %}
</div>
{% endfor %}
</div>
</div>
{% else %}
<div class="container placeholder-hover">
<div class="placeholder-helper">
<div class="placeholder-info">
<p>Todavía no existen colecciones, en cuanto añadas productos, éstas irán apareciendo aquí.</p>
<a href="/admin/collection" class="btn btn-placeholder">Agregar Colecciones</a>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h2 class="collections__heading section-heading">Todas las colecciones</h2>
</div>
</div>
{% include '_collection-placeholder-grid-4.twig' %}
</div>
{% endif %}
{% endblock %}
{% block body_js %}
{{ parent() }}
<script type="text/javascript">
var timeOut;
$(window).load(function() {
squareItem('.collection__item--square');
if ( !isMobile() ) {
rectangleItem('.collection__item--rectangle', '.collection__item--square');
} else {
squareItem('.collection__item--rectangle');
}
});
$(window).resize(function() {
clearTimeout(timeOut);
timeOut = setTimeout(function(){
squareItem('.collection__item--square');
if ( !isMobile() ) {
rectangleItem('.collection__item--rectangle', '.collection__item--square');
} else {
squareItem('.collection__item--rectangle');
}
}, 300);
});
</script>
{% endblock %}