new mobile home #423

This commit is contained in:
2020-07-20 15:43:57 +02:00
parent 84d95267f6
commit 89d3753b74
9 changed files with 261 additions and 58 deletions
File diff suppressed because one or more lines are too long
@@ -707,7 +707,9 @@ main[role="main"]{
}
.collection{
.collection-link,
.production-link,
.agenda-link{
h3{
@include content_titles;
text-align: center;
@@ -2032,7 +2034,7 @@ body.path-frontpage, body.path-productions{
// p{margin: 0;}
}
&.node--view-mode-image-2-columns{
html:not(.is-mobile) &.node--view-mode-image-2-columns{
header{
position: absolute;
bottom: 0; left:0;
+21 -15
View File
@@ -109,22 +109,28 @@ function edlptheme_theme_suggestions_taxonomy_term_alter(&$suggestions, $variabl
}
function edlptheme_preprocess_edlp_home(&$vars){
foreach($vars['nodes'] as &$node){
switch($node['vm']){
case "image_2_columns":
$cols = 4;
break;
case "image_1_columns":
$cols = 2;
break;
case "text_1_column":
$cols = 2;
break;
default:
$cols = 3;
};
$node['cols'] = $cols;
// render the promoted_statics and promoted_prods
$promoteds = ['statics', 'prods'];
// dpm($vars);
foreach ($promoteds as $index => $p) {
foreach($vars['nodes_' . $p] as &$node){
switch($node['vm']){
case "image_2_columns":
$cols = 4;
break;
case "image_1_columns":
$cols = 2;
break;
case "text_1_column":
$cols = 2;
break;
default:
$cols = 3;
};
$node['cols'] = $cols;
}
}
}
function edlptheme_preprocess_taxonomy_term__entrees__mobile_home(&$vars){
@@ -0,0 +1,62 @@
<div class="grid">
{% if nodes_prods %}
{% for node in nodes_prods %}
<div class="col small-col-12 med-col-4 large-col-{{ node.cols }}">
<div class="wrapper">
{{ node.build }}
</div>
</div>
{% endfor %}
{% endif %}
{% if nodes_statics %}
{% for node in nodes_statics %}
<div class="col small-col-12 med-col-4 large-col-{{ node.cols }}">
<div class="wrapper">
{{ node.build }}
</div>
</div>
{% endfor %}
{% endif %}
{% if lastdocs %}
<div class="lastdocs-home col small-col-12 med-col-4 large-col-2">
<div class="wrapper">
{{ lastdocs }}
</div>
</div>
{% endif %}
{% if agenda %}
<div class="agenda col small-col-12 med-col-4 large-col-2">
<div class="wrapper">
{{ agenda }}
</div>
</div>
{% endif %}
{% if collection_link_rendered %}
<div class="collection-link col small-col-12 med-col-4 large-col-3">
<div class="wrapper">
{{ collection_link_rendered }}
</div>
</div>
{% endif %}
{% if production_link_rendered %}
<div class="production-link col small-col-12 med-col-4 large-col-3">
<div class="wrapper">
{{ production_link_rendered }}
</div>
</div>
{% endif %}
{% if agenda_link_rendered %}
<div class="agenda-link col small-col-12 med-col-4 large-col-3">
<div class="wrapper">
{{ agenda_link_rendered }}
</div>
</div>
{% endif %}
</div>
@@ -17,8 +17,18 @@
#}
<div class="grid">
{% if nodes %}
{% for node in nodes %}
{% if nodes_statics %}
{% for node in nodes_statics %}
<div class="col small-col-12 med-col-4 large-col-{{ node.cols }}">
<div class="wrapper">
{{ node.build }}
</div>
</div>
{% endfor %}
{% endif %}
{% if nodes_prods %}
{% for node in nodes_prods %}
<div class="col small-col-12 med-col-4 large-col-{{ node.cols }}">
<div class="wrapper">
{{ node.build }}
@@ -43,10 +53,26 @@
</div>
{% endif %}
{% if collection %}
<div class="collection col small-col-12 med-col-4 large-col-3">
{% if collection_link_rendered %}
<div class="collection_link col small-col-12 med-col-4 large-col-3">
<div class="wrapper">
{{ collection }}
{{ collection_link_rendered }}
</div>
</div>
{% endif %}
{% if production_link_rendered %}
<div class="production_link col small-col-12 med-col-4 large-col-3">
<div class="wrapper">
{{ production_link_rendered }}
</div>
</div>
{% endif %}
{% if agenda_link_rendered %}
<div class="agenda_link col small-col-12 med-col-4 large-col-3">
<div class="wrapper">
{{ agenda_link_rendered }}
</div>
</div>
{% endif %}