site.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. function map() {
  2. var mymap = L.map('carte').setView([44.7365818, 4.9776488], 13);
  3. L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
  4. maxZoom: 18,
  5. id: 'mapbox.streets'
  6. }).addTo(mymap);
  7. L.marker([44.7365818, 4.9776488]).addTo(mymap)
  8. .bindPopup("<b>Hello world!</b><br />I am le campus.").openPopup();
  9. function onMapClick(e) {
  10. popup
  11. .setLatLng(e.latlng)
  12. .setContent("You clicked the map at " + e.latlng.toString())
  13. .openOn(mymap);
  14. }
  15. mymap.on('click', onMapClick);
  16. }
  17. function filteritem() {
  18. var $card = $('#item > .card');
  19. var $cat = $('.cat a');
  20. var $img = $('#item .img');
  21. var $grid = $('#archive #item, #calendrier #item').masonry({
  22. // columnWidth: 200,
  23. itemSelector: '.card',
  24. gutter: 10,
  25. transitionDuration: '0.2s'
  26. });
  27. $grid.imagesLoaded().progress(function() {
  28. $grid.masonry();
  29. });
  30. $grid.multipleFilterMasonry({
  31. itemSelector: '.card',
  32. filtersGroupSelector:'.filters'
  33. });
  34. }
  35. function slide() {
  36. $(".gal").slidesjs({
  37. width: 940,
  38. height: 528,
  39. pagination: {
  40. active: false
  41. }
  42. });
  43. }
  44. function links() {
  45. href="/organisez-vos-evenements"
  46. var $a = $('li a[href="/organisez-vos-evenements"]');
  47. var $map = $('a#carte');
  48. $a.on('click', function(e) {
  49. e.preventDefault();
  50. })
  51. $map.on('click', function(e) {
  52. e.preventDefault();
  53. })
  54. }
  55. jQuery(document).ready(function($){
  56. links();
  57. slide();
  58. filteritem();
  59. map();
  60. });