diff --git a/web/themes/custom/popsu_colloque/css/layout.css b/web/themes/custom/popsu_colloque/css/layout.css index 6a932ceb..1d1e7e1e 100644 --- a/web/themes/custom/popsu_colloque/css/layout.css +++ b/web/themes/custom/popsu_colloque/css/layout.css @@ -12,3 +12,14 @@ article img, height: 100%; object-fit: cover; } + +.layout-content > div{ + display: flex; +} +.side_notes{ + position: relative; +} + +.side_notes > *{ + position: absolute; +} diff --git a/web/themes/custom/popsu_colloque/js/script.js b/web/themes/custom/popsu_colloque/js/script.js index 8c1df405..feda050e 100644 --- a/web/themes/custom/popsu_colloque/js/script.js +++ b/web/themes/custom/popsu_colloque/js/script.js @@ -3,34 +3,52 @@ function notes() { var $link = $('#presentation a'); $link.each(function(){ $(this).click(function(e) { - if ($(this).is('#ressource')) { + $this = $(this); + if ( $this.is('#ressource') || $this.is('#publication') ) { e.preventDefault(); - var $url = $(this).attr("href"); + + var $url = $this.attr("href"); if ($( ".side_notes" )[0]) { $( ".side_notes" ).remove(); } - - $("
").insertAfter("article"); - - ajax($url); - }else{ - // nothing + content_type($url, $this); + ajax($url, $this); } }); }) - function ajax($url) { + function content_type($url, $this) { + if ($this.is('#ressource')) { + $("").insertAfter("article"); + }else if ( $this.is('#publication') ) { + console.log('clcik'); + $("