This commit is contained in:
armansansd
2022-12-09 15:02:54 +00:00
parent 94ec5ab316
commit b74b57b296
8 changed files with 45 additions and 13 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+12 -1
View File
@@ -208,7 +208,8 @@ $(function(){
// HOME PAGE // HOME PAGE
if($(".path-frontpage").length > 0){ if($(".path-frontpage").length > 0){
let elem = "<div class='main_logo'></div>"; let elem = $(".field_logo").clone();
$(".about .views-row").prepend(elem); $(".about .views-row").prepend(elem);
var header_container = "<div class='header_container'></div>"; var header_container = "<div class='header_container'></div>";
@@ -451,6 +452,16 @@ if($(".block-region-first").find("a").length == 0 ){
} }
}; };
//spec ressources video
if($(".page-node-type-ressource").find(".ressources-video").length > 0){
let vid = $(".field_videos").parents().eq(0);
let prog = $(".field_programme").parents().eq(0);
$(vid).clone().insertAfter(prog);
$(vid).remove();
}
//crop text for collection //crop text for collection
// $(".block-region-third .views-field-description__value").addClass("hidden_text"); // $(".block-region-third .views-field-description__value").addClass("hidden_text");
// $(".block-region-third .views-field-description__value").on("click", function(){ // $(".block-region-third .views-field-description__value").on("click", function(){
+6 -1
View File
@@ -41,7 +41,12 @@ function popsu_preprocess_html(&$variables) {
} }
function popsu_preprocess_page(&$variables) { function popsu_preprocess_page(&$variables) {
dump($variables); if(isset($variables['node'])){
$node = $variables['node'];
if(isset($node) && $node->hasField('field_videos') && $node->get('field_videos')->getString() != ""){
$variables['attributes']['class'][] = 'ressources-video';
}
}
} }
function popsu_preprocess_node(&$variables){ function popsu_preprocess_node(&$variables){
@@ -289,7 +289,7 @@
} }
} }
.main_logo{ .main_logo{
background: center / contain no-repeat url(../../images/POPSU_1.svg); //background: center / contain no-repeat url(../../images/POPSU_1.svg);
} }
} }
@@ -303,7 +303,7 @@
} }
} }
.main_logo{ .main_logo{
background: center / contain no-repeat url(../../images/POPSU_1.svg); //background: center / contain no-repeat url(../../images/POPSU_1.svg);
} }
} }
&.programme-3{ &.programme-3{
@@ -317,7 +317,7 @@
} }
.main_logo{ .main_logo{
background: center / contain no-repeat url(../../images/POPSU_Europe.svg); //background: center / contain no-repeat url(../../images/POPSU_Europe.svg);
} }
} }
// àmodifer ?? // àmodifer ??
@@ -332,7 +332,7 @@
} }
.main_logo{ .main_logo{
background: center / contain no-repeat url(../../images/POPSU_2.svg); //background: center / contain no-repeat url(../../images/POPSU_2.svg);
} }
} }
&.programme-5{ &.programme-5{
@@ -346,7 +346,7 @@
} }
.main_logo{ .main_logo{
background: center / contain no-repeat url(../../images/POPSU_monde.svg); //background: center / contain no-repeat url(../../images/POPSU_monde.svg);
} }
} }
&.programme-6{ &.programme-6{
@@ -360,7 +360,7 @@
} }
.main_logo{ .main_logo{
background: center / contain no-repeat url(../../images/POPSU_territoires.svg); //background: center / contain no-repeat url(../../images/POPSU_territoires.svg);
} }
} }
&.programme-7{ &.programme-7{
@@ -374,7 +374,7 @@
} }
.main_logo{ .main_logo{
background: center / contain no-repeat url(../../images/POPSU_metropoles.svg); //background: center / contain no-repeat url(../../images/POPSU_metropoles.svg);
} }
} }
.layout-content{ .layout-content{
@@ -819,3 +819,19 @@
} }
} }
//spec ressources vidéo
.page-node-type-ressource{
.ressources-video{
#node\:field_image{
display: none;
}
#node\:field_type_de_ressource{
padding: 0;
}
#node\:field_videos{
margin: 0rem 0 1rem 0;
}
}
}
@@ -156,7 +156,7 @@
display: block; display: block;
font-size: 0; font-size: 0;
color: transparent; color: transparent;
background: left / contain no-repeat url(../../images/POPSU_logo.svg); //background: left / contain no-repeat url(../../images/POPSU_logo.svg);
} }
@include breakpoint(small down) { @include breakpoint(small down) {
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
@@ -30,7 +30,7 @@
* @see html.html.twig * @see html.html.twig
*/ */
#} #}
<div class="layout-container row"> <div class="layout-container row {{ attributes.class }}">
{% include directory ~ '\/partials/header.html.twig' %} {% include directory ~ '\/partials/header.html.twig' %}
{{ page.help }} {{ page.help }}