smartphone home

This commit is contained in:
armansansd 2021-09-02 20:41:14 +02:00
parent 18114c9846
commit 87ae7fb4db
7 changed files with 118 additions and 6 deletions

View File

@ -1394,6 +1394,11 @@ iframe {
align-items: center; } align-items: center; }
.header_top_middle_container .views-element-container > div:first-child > div:first-child > div:first-child { .header_top_middle_container .views-element-container > div:first-child > div:first-child > div:first-child {
grid-column-start: 2; } grid-column-start: 2; }
@media print, screen and (max-width: 39.99875em) {
.header_top_middle_container .views-element-container > div:first-child > div:first-child {
grid-template-columns: repeat(3, 1fr); }
.header_top_middle_container .views-element-container > div:first-child > div:first-child > div:first-child {
grid-column-start: 1; } }
.header_top_middle_container .views-row { .header_top_middle_container .views-row {
display: inline-block; display: inline-block;
width: auto; } width: auto; }
@ -1430,6 +1435,11 @@ iframe {
transform: translateY(57%) rotate(45deg); } transform: translateY(57%) rotate(45deg); }
.close-block > div > span:nth-child(2) { .close-block > div > span:nth-child(2) {
transform: rotate(-45deg); } transform: rotate(-45deg); }
@media print, screen and (max-width: 39.99875em) {
.close-block {
position: absolute;
top: 1rem;
right: 1rem; } }
.open-block { .open-block {
height: 100%; height: 100%;
@ -1450,8 +1460,18 @@ iframe {
padding: 1rem 0; padding: 1rem 0;
z-index: 140; z-index: 140;
line-height: 2; } line-height: 2; }
@media print, screen and (max-width: 39.99875em) {
#header-top-right .header_top_right_container {
grid-template-columns: 1fr;
align-content: center;
text-align: center;
height: 100vh;
font-size: 0.8rem; } }
#header-top-right .header_top_right_container nav { #header-top-right .header_top_right_container nav {
grid-column-start: 2; } grid-column-start: 2; }
@media print, screen and (max-width: 39.99875em) {
#header-top-right .header_top_right_container nav {
grid-column-start: 1; } }
#header-top-right .header_top_right_container a { #header-top-right .header_top_right_container a {
text-decoration: none; text-decoration: none;
font-weight: 400; } font-weight: 400; }
@ -1533,6 +1553,10 @@ footer {
font-size: 0; font-size: 0;
color: transparent; color: transparent;
background: left/contain no-repeat url(../images/yt.svg); } background: left/contain no-repeat url(../images/yt.svg); }
@media print, screen and (max-width: 39.99875em) {
#footer-bottom .footer_bottom_right_container {
text-align: center;
margin-top: 1rem; } }
.path-frontpage .header_top_left_container div:nth-child(2) img { .path-frontpage .header_top_left_container div:nth-child(2) img {
width: 77%; } width: 77%; }
@ -1727,6 +1751,9 @@ footer {
color: black; } color: black; }
.about .views-row div { .about .views-row div {
margin: 0 5%; } margin: 0 5%; }
@media print, screen and (max-width: 39.99875em) {
.about .views-row div {
margin: 0 3%; } }
.about .views-row .views-field-view-node { .about .views-row .views-field-view-node {
display: inline-block; display: inline-block;
margin: 0 auto; margin: 0 auto;
@ -1770,6 +1797,11 @@ footer {
.header_container header.active { .header_container header.active {
opacity: 1; opacity: 1;
font-size: 4rem; } font-size: 4rem; }
@media print, screen and (max-width: 39.99875em) {
.header_container {
grid-template-columns: repeat(2, 1fr); }
.header_container header[data-dom="programmes-block_4"] {
display: none; } }
#home_themes-block_1 { #home_themes-block_1 {
display: none; } display: none; }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,11 @@
import 'slick-carousel'; import 'slick-carousel';
var mobile = false;
$(function(){ $(function(){
console.log("$ ready !!"); console.log("$ ready !!");
if( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i)){
mobile = true;
}
if($(".path-frontpage").length > 0){ if($(".path-frontpage").length > 0){
$('.last-news').slick({ $('.last-news').slick({
@ -10,6 +13,13 @@ $(function(){
slidesToScroll: 1, slidesToScroll: 1,
centerMode: true, centerMode: true,
centerPadding: '300px', centerPadding: '300px',
responsive: [
{
breakpoint: 800,
settings: {
centerPadding: '0',
}
}]
}); });
$('.last-ressources').slick({ $('.last-ressources').slick({
slidesToShow: 3, slidesToShow: 3,
@ -17,6 +27,21 @@ $(function(){
centerMode: true, centerMode: true,
centerPadding: '60px', centerPadding: '60px',
infinite: true, infinite: true,
responsive: [
{
breakpoint: 800,
settings: {
slidesToShow: 2,
centerPadding: '0',
}
},
{
breakpoint: 400,
settings: {
slidesToShow: 1,
centerPadding: '0',
}
}]
}); });
} }
@ -55,6 +80,7 @@ $(function(){
centerMode: false, centerMode: false,
centerPadding: '60px', centerPadding: '60px',
infinite: false, infinite: false,
}); });
$('#home_blocks-block_3>div>div').slick({ $('#home_blocks-block_3>div>div').slick({
@ -82,9 +108,15 @@ $(function(){
$('.close-block').click(function(){ $('.close-block').click(function(){
$(this).parent().fadeOut(); $(this).parent().fadeOut();
if(mobile == true){
$("body").css("overflow","auto");
}
}); });
$('.open-block').click(function(){ $('.open-block').click(function(){
$(this).prev().css("display","grid"); $(this).prev().css("display","grid");
if(mobile == true){
$("body").css("overflow","hidden");
}
}); });
$("body").on("click", ".header_container header", function(){ $("body").on("click", ".header_container header", function(){
@ -177,6 +209,15 @@ $(function(){
centerMode: false, centerMode: false,
// centerPadding: '10%', // centerPadding: '10%',
infinite: false, infinite: false,
responsive: [
{
breakpoint: 800,
settings: {
slidesToShow: 2,
slidesToScroll: 1,
centerPadding: '10px',
}
}]
}); });
// $('#programmes-block_4').after('<div id="home_map_container" class="home_info_container"></div><div id="home_theme_container" class="home_info_container"></div><div id="home_prog_container" class="home_info_container"></div>'); // $('#programmes-block_4').after('<div id="home_map_container" class="home_info_container"></div><div id="home_theme_container" class="home_info_container"></div><div id="home_prog_container" class="home_info_container"></div>');

View File

@ -3,13 +3,13 @@
{{ page.footer_top }} {{ page.footer_top }}
</section> </section>
<section id="footer-bottom" class="row"> <section id="footer-bottom" class="row">
<div id="footer-left" class="columns small-3 small-offset-1"> <div id="footer-left" class="columns small-5 small-offset-1 medium-3 medium-offset-1">
{{ page.footer_bottom_left }} {{ page.footer_bottom_left }}
</div> </div>
<div id="footer-middle" class="columns small-2 small-offset-0"> <div id="footer-middle" class="columns small-5 small-offset-1 medium-2 medium-offset-0">
{{ page.footer_bottom_middle }} {{ page.footer_bottom_middle }}
</div> </div>
<div id="footer-right" class="columns small-4 small-offset-1"> <div id="footer-right" class="columns small-12 medium-4 medium-offset-1">
{{ page.footer_bottom_right }} {{ page.footer_bottom_right }}
</div> </div>
</section> </section>

View File

@ -302,6 +302,9 @@
} }
div{ div{
margin: 0 5%; margin: 0 5%;
@include breakpoint(small down) {
margin: 0 3%;
}
} }
.views-field-view-node{ .views-field-view-node{
display: inline-block; display: inline-block;
@ -357,6 +360,14 @@
font-size: 4rem; font-size: 4rem;
} }
} }
@include breakpoint(small down) {
grid-template-columns: repeat(2, 1fr);
header[data-dom="programmes-block_4"]{
display:none;
}
}
} }
#home_themes-block_1{ #home_themes-block_1{

View File

@ -173,6 +173,13 @@
&>div:first-child{ &>div:first-child{
grid-column-start: 2; grid-column-start: 2;
} }
@include breakpoint(small down) {
grid-template-columns: repeat(3, 1fr);
&>div:first-child{
grid-column-start: 1;
}
}
} }
} }
@ -231,6 +238,12 @@
&>div>span:nth-child(2){ &>div>span:nth-child(2){
transform: rotate(-45deg); transform: rotate(-45deg);
} }
@include breakpoint(small down) {
position: absolute;
top: 1rem;
right: 1rem;
}
} }
.open-block{ .open-block{
height: 100%; height: 100%;
@ -254,8 +267,19 @@
padding: 1rem 0; padding: 1rem 0;
z-index: 140; z-index: 140;
line-height: 2; line-height: 2;
@include breakpoint(small down) {
grid-template-columns: 1fr;
align-content: center;
text-align: center;
height: 100vh;
font-size: $font-medium;
}
nav{ nav{
grid-column-start: 2; grid-column-start: 2;
@include breakpoint(small down) {
grid-column-start: 1;
}
} }
// padding: 1rem .5rem 1rem .5rem; // padding: 1rem .5rem 1rem .5rem;
a{ a{
@ -382,5 +406,9 @@ footer{
} }
} }
} }
@include breakpoint(small down) {
text-align:center;
margin-top: 1rem;
}
} }
} }