<repo_name>antichars/antichars<file_sep>/info/README.md
Info générale sur le site.
<file_sep>/docs/wp-content/themes/salon_auto/js/custom/gallery_ver=5.3.js
jQuery(function($){
  $('.gallery').each(function(){
    var $gallery = $(this);
    $gallery.magnificPopup({
      delegate: 'a',
      type: 'image',
      gallery: {
        enabled: true,
        tCounter: '%curr% ' + i18n.of + ' %total%',
      },
      callbacks: {
        elementParse: function(item) {
          // the class name
          if($(item.el.context).hasClass('video-link')) {
            item.type = 'iframe';
          } else {
            item.type = 'image';
          }
        }
      },
    })
  });
});<file_sep>/README.md
Développement local
-----

Installer Docker Desktop et, dans le terminal taper:

    ./scripts/deploy.sh

Site original
-----

Nous avons utilisé le logiciel SiteSucker pour obtenir une copie complète du site web.

Photos
-----

Nous avons pris les photos suivantes du site [Unsplash](https://unsplash.com); toutes les photos ont une [license permissive](https://unsplash.com/license):

* https://unsplash.com/photos/k1AFA4N8O0g par https://unsplash.com/@ryansearle
* https://unsplash.com/photos/XIOSHynz4Wo par https://unsplash.com/@drewbutler
* https://unsplash.com/photos/8osoVBQWWHc par https://unsplash.com/@jens_h
* https://unsplash.com/photos/_1Z5rLrf5-Y par https://unsplash.com/@7seth
* https://unsplash.com/photos/yBhOcUr4TVY par https://unsplash.com/@koushikpal
* https://unsplash.com/photos/ipHlSSaC3vk par https://unsplash.com/@michaeljinphoto
* https://unsplash.com/photos/mHrc8ydLg3c par https://unsplash.com/@matthew_t_rader

Nous avons utilisé iMovie 10.1.13 pour importer les images et les exporter en mp4. Ensuite nous avons réduit la taille du mp4 avec https://www.ps2pdf.com.

La commande suivante peut être utilisée pour réduire le poids des images:

    sips -Z 1200 *.jpg
<file_sep>/docs/wp-content/themes/salon_auto/js/custom/header_ver=5.3.js
jQuery(function($){
  $('.header-bar__toggle').on('click', function(){
    var $toggle = $(this);
    if(!$toggle.hasClass('active')){
      $toggle.addClass('active');
      $('.menu-panel').stop(true,false).slideDown(500, function(){
        bodyScrollLock.disableBodyScroll($('.menu-panel')[0]);
      });
    }else{
      $toggle.removeClass('active');
      $('.menu-panel').stop(true,false).slideUp(500, function(){
        bodyScrollLock.enableBodyScroll($('.menu-panel')[0]);
      });
    }
  });
  
  $('.mobile-menu__arrow').on('click', function(e){
    e.preventDefault();
    var $arrow = $(this)
    var $submenu = $arrow.parent('a').siblings('ul.sub-menu');
    
    if(!$arrow.hasClass('active')){
      $('.mobile-menu__arrow.active').removeClass('active').parent('a').siblings('ul.sub-menu').stop(true,false).slideUp();
      $arrow.addClass('active');
      $submenu.stop(true,false).slideDown();
    }else{
      $arrow.removeClass('active');
      $submenu.stop(true,false).slideUp();
    }
    
  });
  
  $('.mobile-header__toggle').on('click', function(){
    var $toggle = $(this);
    if(!$toggle.hasClass('close')){
      $toggle.addClass('close');
      $('.mobile-menu').css({left: 0});
      bodyScrollLock.disableBodyScroll($('.mobile-menu')[0]);
    }else{
      $toggle.removeClass('close');
      $('.mobile-menu').css({left: '-100%'});
      bodyScrollLock.enableBodyScroll($('.mobile-menu')[0]);
    }
  });
  
  $('.mobile-menu__menu .sub-menu a').on('click', function(e){
    var $anchor = $(this);
    var href = $anchor.attr('href');
    var explode = href.split('/');
    if(explode[explode.length - 1][0] == '#'){
      e.preventDefault();
      window.location = href;
      $('.mobile-header__toggle').removeClass('close');
      $('.mobile-menu').css({left: '-100%'});
      bodyScrollLock.enableBodyScroll($('.mobile-menu')[0]);
    }
    
  });
  
  $('.standard-text a').has('.button').css({textDecoration: 'none'});
  
});<file_sep>/docs/wp-content/themes/salon_auto/js/custom/map_ver=5.3.js
jQuery(function($){
  
  levels = phpVars.levels;

  if(getUrlParam('floor', false)){
    var currentLevel = parseInt(getUrlParam('floor', false));
    for(var i = 0; i < levels.length; i++){
      if(levels[i] == currentLevel){
        currentLevelPosition = i;
        break;
      }
    }
  }else{
    currentLevel = parseInt(levels[0]);
    currentLevelPosition = 0;
  }
    
  hideArrows();
          
  $menuSelect = new Dropkick($('.salon-maps__select-level')[0]);
  
  $('.salon-maps__maps-track').magnificPopup({
    type: 'image',
    delegate: '.salon-maps__map-outer a',
    gallery: {
      enabled: true,
      tCounter: '%curr% ' + phpVars.i18n.of + ' %total%',
    }
  })
  
  $('.salon-maps__select-level').on('change', function(){
    var $select = $(this);
    currentLevelPosition = $select.prop('selectedIndex');
    changeFloor($select.val());
  });
  
  $('.salon-maps__up').on('click', function(){
    
    if(currentLevelPosition + 1 < levels.length){
      currentLevelPosition++;
      changeFloor(levels[currentLevelPosition]);
    }      
  });
  
  $('.salon-maps__down').on('click', function(){
    
    if(currentLevelPosition - 1 >= 0){
      currentLevelPosition--;
      changeFloor(levels[currentLevelPosition]);
    }      
  });
  
  $('.salon-maps__dot').on('click', function(){
    var $dot = $(this);
    if(!$dot.hasClass('current')){
      currentLevelPosition = $dot.data('index');
      changeFloor($dot.data('level'));
    }
  });
  
  function switchDot(){
    
    $('.salon-maps__dot.current').removeClass('current');
    $('.salon-maps__dot').eq(currentLevelPosition).addClass('current');
  }
  
  function hideArrows(){
    if(currentLevelPosition == 0){
      $('.salon-maps__down').css({opacity: 0.33});
    }else{
      $('.salon-maps__down').css({opacity: 1});
    }
    if(currentLevelPosition >= levels.length - 1){
      $('.salon-maps__up').css({opacity: 0.33});
    }else{
      $('.salon-maps__up').css({opacity: 1});
    }
  }
  
  function switchSelect(floor){
    $('.salon-maps__select-level').val(floor);
    $menuSelect.refresh();
  }
  
  function changeFloor(floor){
      
    const $currentMap = $('.salon-maps__map-outer.current');
    const $targetMap = $('.salon-maps__map-outer[data-level='+floor+']');
    const currentPosition = $currentMap.data('level');
    
    if(currentPosition < floor){
      var movement = '60px';
    }else{
      var movement = '-60px';
    }
    
    $currentMap.removeClass('current').stop(true,false).animate({top: '+='+movement}, 500, function(){
      $(this).css({top: 0});
    });
    $targetMap.addClass('current').removeClass('invisible').css({top: '-='+movement}).stop(true,false).animate({top: '+='+movement}, 500);
    
    const $currentDescription = $('.salon-maps__level-description-outer.current');
    const $targetDescription = $('.salon-maps__level-description-outer[data-level='+floor+']');
    
    $currentDescription.removeClass('current');
    $targetDescription.addClass('current').removeClass('invisible')
    
    const $currentExhibitors = $('.map-exhibitors__list.current');
    const $targetExhibitors = $('.map-exhibitors__list[data-level='+floor+']');
    
    $currentExhibitors.removeClass('current');
    $targetExhibitors.addClass('current').removeClass('invisible')
    
    setTimeout(function(){
      if(!$currentMap.hasClass('current')){
        $currentMap.addClass('invisible');
        $currentDescription.addClass('invisible');
        $currentExhibitors.addClass('invisible');
      }
    },500);
            
    hideArrows();
    switchDot();
    switchSelect(floor);
      
  }
      
  function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        vars[key] = value;
    });
    return vars;
  }
  
  function getUrlParam(parameter, defaultvalue){
    var urlparameter = defaultvalue;
    if(window.location.href.indexOf(parameter) > -1){
        urlparameter = getUrlVars()[parameter];
        }
    return urlparameter;
  }
});