add imgload
This commit is contained in:
parent
6de32791c3
commit
e20e0c5e9a
16
web/app/themes/la_mine/dist/assets/css/index.css
vendored
16
web/app/themes/la_mine/dist/assets/css/index.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -28,6 +28,12 @@
|
|||||||
}
|
}
|
||||||
add_action( 'wp_footer', 'isotope' );
|
add_action( 'wp_footer', 'isotope' );
|
||||||
|
|
||||||
|
function imgLoad(){
|
||||||
|
wp_enqueue_script( 'imagesloaded.pkgd.min.js',
|
||||||
|
get_template_directory_uri() . '/src/assets/js/imagesloaded.pkgd.min.js', array() );
|
||||||
|
}
|
||||||
|
add_action( 'wp_footer', 'imgLoad' );
|
||||||
|
|
||||||
function customJs(){
|
function customJs(){
|
||||||
wp_enqueue_script( 'script',
|
wp_enqueue_script( 'script',
|
||||||
get_template_directory_uri() . '/src/assets/js/scripts.js', array() );
|
get_template_directory_uri() . '/src/assets/js/scripts.js', array() );
|
||||||
@ -43,9 +49,6 @@
|
|||||||
// }
|
// }
|
||||||
// add_action('wp_enqueue_scripts', 'includedrag');
|
// add_action('wp_enqueue_scripts', 'includedrag');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ADD OPTION PAGES
|
// ADD OPTION PAGES
|
||||||
if( function_exists('acf_add_options_page') ) {
|
if( function_exists('acf_add_options_page') ) {
|
||||||
|
|
||||||
@ -196,6 +199,4 @@
|
|||||||
$labels->menu_name = 'Évenements';
|
$labels->menu_name = 'Évenements';
|
||||||
$labels->name_admin_bar = 'Évenements';
|
$labels->name_admin_bar = 'Évenements';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
7
web/app/themes/la_mine/src/assets/js/imagesloaded.pkgd.min.js
vendored
Normal file
7
web/app/themes/la_mine/src/assets/js/imagesloaded.pkgd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -50,12 +50,17 @@ function masonry() {
|
|||||||
function burger() {
|
function burger() {
|
||||||
var hamburgers = document.querySelector(".hamburger");
|
var hamburgers = document.querySelector(".hamburger");
|
||||||
var nav = document.querySelector(".nav-main");
|
var nav = document.querySelector(".nav-main");
|
||||||
|
var $nav_li = $('.nav-main li a');
|
||||||
hamburgers.addEventListener("click", function() {
|
hamburgers.addEventListener("click", function() {
|
||||||
this.classList.toggle("is-active");
|
this.classList.toggle("is-active");
|
||||||
nav.classList.toggle("is-active");
|
nav.classList.toggle("is-active");
|
||||||
});
|
});
|
||||||
}
|
$nav_li.on( 'click', function() {
|
||||||
|
hamburgers.classList.remove('is-active');
|
||||||
|
nav.classList.remove('is-active');
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function paralax() {
|
function paralax() {
|
||||||
var rellax = new Rellax('.paralax', {
|
var rellax = new Rellax('.paralax', {
|
||||||
@ -64,13 +69,19 @@ function paralax() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isotope() {
|
function isotope() {
|
||||||
|
|
||||||
var $grid = $('.grid').isotope({
|
var $grid = $('.grid').isotope({
|
||||||
percentPosition: true,
|
percentPosition: true,
|
||||||
masonry: {
|
|
||||||
columnWidth: '.thumbnails'
|
|
||||||
},
|
|
||||||
itemSelector: '.thumbnails',
|
itemSelector: '.thumbnails',
|
||||||
stagger: 30
|
layoutMode: 'masonry',
|
||||||
|
masonry: {
|
||||||
|
columnWidth: '.thumbnails',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.grid').imagesLoaded().progress( function(instance, imageObj) {
|
||||||
|
$(imageObj.img).fadeIn(300);
|
||||||
|
$('.grid').isotope('layout');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cat-list li').on( 'click', function(evt) {
|
$('.cat-list li').on( 'click', function(evt) {
|
||||||
@ -99,7 +110,6 @@ function click_nav() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function scrollto(){
|
function scrollto(){
|
||||||
|
|
||||||
$(window).scroll(function() {
|
$(window).scroll(function() {
|
||||||
var scroll = $(window).scrollTop();
|
var scroll = $(window).scrollTop();
|
||||||
if (scroll >= 100) {
|
if (scroll >= 100) {
|
||||||
@ -108,17 +118,17 @@ function scrollto(){
|
|||||||
$(".logo a").removeClass("reduct");
|
$(".logo a").removeClass("reduct");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
burger();
|
burger();
|
||||||
|
click_nav();
|
||||||
slides();
|
slides();
|
||||||
|
isotope();
|
||||||
// masonry();
|
// masonry();
|
||||||
// paralax();
|
// paralax();
|
||||||
isotope();
|
|
||||||
// drag();
|
// drag();
|
||||||
click_nav();
|
|
||||||
if (window.width >= 578) {
|
if (window.width >= 578) {
|
||||||
scrollto();
|
scrollto();
|
||||||
}
|
}
|
||||||
|
@ -2,5 +2,8 @@
|
|||||||
@import "thumbnails.scss";
|
@import "thumbnails.scss";
|
||||||
@import "hero.scss";
|
@import "hero.scss";
|
||||||
@import "forms.scss";
|
@import "forms.scss";
|
||||||
@import "_title-page.scss";
|
@import "title-page.scss";
|
||||||
@import "_footer.scss";
|
@import "footer.scss";
|
||||||
|
.grid img {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
.thumbnails{
|
.thumbnails{
|
||||||
|
height: auto;
|
||||||
|
&:not(:last-child){
|
||||||
|
margin-bottom: 5rem;
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 992px) {
|
||||||
|
margin-bottom: 0rem;
|
||||||
|
}
|
||||||
a{
|
a{
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
&:first-of-type{
|
&:first-of-type{
|
||||||
padding-top: 5rem;
|
padding-top: 5rem;
|
||||||
}
|
}
|
||||||
padding: 2.5rem 0;
|
padding: 5rem 0;
|
||||||
@media screen and (min-width: 576px) {
|
@media screen and (min-width: 576px) {
|
||||||
&:first-of-type{
|
&:first-of-type{
|
||||||
padding-top: 10rem;
|
padding-top: 10rem;
|
||||||
@ -60,6 +60,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
&#section_asso{
|
&#section_asso{
|
||||||
|
padding-bottom: 10rem;
|
||||||
.container-fluid{
|
.container-fluid{
|
||||||
& > h3{
|
& > h3{
|
||||||
border: 5px solid $colorYellow;
|
border: 5px solid $colorYellow;
|
||||||
@ -147,7 +148,7 @@
|
|||||||
}
|
}
|
||||||
& > div{
|
& > div{
|
||||||
border:5px solid $colorRed;
|
border:5px solid $colorRed;
|
||||||
padding: 1rem;
|
padding: 2rem;
|
||||||
height: calc(100% - 4rem);
|
height: calc(100% - 4rem);
|
||||||
h4{
|
h4{
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<section id="section_proch" class="row">
|
<section id="section_proch" class="row">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<h3>Prochainement</h3>
|
<h3>Prochainement</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% for item in posts %}
|
{% for item in posts %}
|
||||||
{% include 'components/thumbnails/thumbnails.twig'%}
|
{% include 'components/thumbnails/thumbnails.twig'%}
|
||||||
@ -42,9 +42,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="section_MineVideo" class="row">
|
<section id="section_MineVideo" class="row ">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<h3>La Mine en vidéo</h3>
|
<h3>La Mine en vidéo</h3>
|
||||||
{% if post.video_la_mine %}
|
{% if post.video_la_mine %}
|
||||||
<figure class="row mx-0">
|
<figure class="row mx-0">
|
||||||
<iframe width="560" height="315" src="//www.youtube.com/embed/{{ post.video_la_mine }}" frameborder="0" allowfullscreen></iframe>
|
<iframe width="560" height="315" src="//www.youtube.com/embed/{{ post.video_la_mine }}" frameborder="0" allowfullscreen></iframe>
|
||||||
|
@ -33,11 +33,12 @@
|
|||||||
{% if now >= end %}
|
{% if now >= end %}
|
||||||
{% include 'components/thumbnails/thumbnails.twig'%}
|
{% include 'components/thumbnails/thumbnails.twig'%}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<div class="paralax" data-rellax-speed="-5">
|
<div class="paralax" data-rellax-speed="-5">
|
||||||
<img src="{{theme.link}}/asset/images/objet_4.svg" alt="objet 4">
|
<img src="{{theme.link}}/asset/images/objet_4.svg" alt="objet 4">
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
{% include 'partial/pagination.twig'%}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<figure>
|
<figure>
|
||||||
<span class="icone_cat {{cat}}"></span>
|
<span class="icone_cat {{cat}}"></span>
|
||||||
<div class="overflow-hidden">
|
<div class="overflow-hidden">
|
||||||
<img src="{{ Image(item.image_event).src|resize(500,500) }}">
|
<img class="lazyload" src="{{ Image(item.image_event).src|resize(600,500) }}" data-original="{{ Image(item.image_event).src|resize(600,500) }}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<figcaption class="wrap_content">
|
<figcaption class="wrap_content">
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="{{ site.charset }}" />
|
<meta charset="{{ site.charset }}" />
|
||||||
<meta name="description" content="{{ site.description }}">
|
<meta name="description" content="{{ site.description }}">
|
||||||
<link rel="stylesheet" href="{{ site.theme.link }}/dist/assets/css/index.min.css" type="text/css" media="screen" />
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link rel="stylesheet" href="{{ site.theme.link }}/dist/assets/css/index.min.css" type="text/css" media="screen" />
|
||||||
<link rel="author" href="{{ site.theme.link }}/humans.txt" />
|
<link rel="author" href="{{ site.theme.link }}/humans.txt" />
|
||||||
<link rel="pingback" href="{{ site.pingback_url }}" />
|
<link rel="pingback" href="{{ site.pingback_url }}" />
|
||||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||||
|
|
||||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||||
|
|
||||||
{{function('wp_head')}}
|
{{function('wp_head')}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user