theme_frameset_footer_js.html

 1   <#-- Template to add js to footer in page_frameset.html theme template -->
 2   <@cTpl>
 3   <#-- Update ME -->
 4   <script src="themes/skin/shared/vendor/clipboard/clipboard.min.js?theme=${commonsGlobalThemeCode!}${commonsGlobalThemeVersion}"></script>
 5   <#if dskey('theme.site_property.bannerBrowserWarning.checkbox')?number = 1>
 6   <!-- Browser detection and warning old browser -->
 7   <script src="${thetheme.pathJs}/vendor/es5.js?theme=${commonsGlobalThemeCode!}${commonsGlobalThemeVersion}"></script>
 8   <script>
 9   window.addEventListener( "load", function() {
 10   	const browser = bowser.getParser(window.navigator.userAgent);
 11   	const browserName=browser['parsedResult']['browser']['name'];
 12   	const browserVer=browser['parsedResult']['browser']['version'];
 13   	const isValidBrowser = browser.satisfies({
 14   		// declare browsers per OS
 15   		windows: {
 16   			"internet explorer": ">11",
 17   			"edge" : ">=80",
 18   		},
 19   		macos: {
 20   			safari: ">=6"
 21   		},
 22   		ios: {
 23   			safari: ">=6"
 24   		},
 25   		// or in general
 26   		chrome: ">=80",
 27   		firefox: ">=52",
 28   		opera: ">=22",
 29   	});
 30   	if ( !isValidBrowser ){
 31   		toastr.options = {
 32   			"closeButton": true,
 33   			"debug": false,
 34   			"newestOnTop": false,
 35   			"progressBar": false,
 36   			"positionClass": "toast-top-full-width browser-warning",
 37   			"preventDuplicates": true,
 38   			"onclick": null,
 39   			"showDuration": "300",
 40   			"hideDuration": "1000",
 41   			"timeOut": "0",
 42   			"extendedTimeOut": "0",
 43   			"showEasing": "swing",
 44   			"hideEasing": "linear",
 45   			"showMethod": "fadeIn",
 46   			"hideMethod": "fadeOut"
 47   		}
 48   		const urlMessage='<p class="mt-3"><a class="btn btn-primary" target="_blank" href="https://browsehappy.com/?locale=fr">#i18n{theme.toast.msg.updateBrowser}</a></p>';
 49   		toastr["warning"]("#i18n{theme.toast.msg.ContentBrowser}" + urlMessage, "#i18n{theme.toast.msg.titleBrowser}" + browserName + ' ' + browserVer );
 50   	}
 51   });   
 52   </script>
 53   </#if> 
 54   <!-- CNIL Consent TarteAuCitron / Needs Matomo plugin -->
 55   <@cConsentTac title=favourite>
 56   <#-- Tarte au Citron Service : - default- -->
 57   <@cConsentTacService  />
 58   <#-- Tarte au Citron Service : Matomo  -->
 59   <@cConsentTacService code='matomohightrack'>${matomo!}</@cConsentTacService>
 60   </@cConsentTac>
 61   <#if urlAccount !=''>
 62   <!-- MyLutece User Connexion -->
 63   </#if>
 64   <#-- User message toastr notification - Parameter in back office - Menu Site / Site Properties -> Theme Paris.fr 	-->
 65   <#if dskey('theme.site_property.bannerMessage.htmlblock') !='' && dskey('theme.site_property.bannerMessage.Title') !=''>
 66   <!-- ========================================================   -->
 67   <!-- USER MESSAGE NOTIF		                                   -->
 68   <!-- ========================================================   -->
 69   <#assign bannerMessageDuration>${dskey('theme.site_property.bannerMessage.Duration')}</#assign>
 70   <#assign bannerMessagePosition>${dskey('theme.site_property.bannerMessage.Position')}</#assign>
 71   <@cInitToast showAll=true duration=bannerMessageDuration?number position=bannerMessagePosition >
 72       <@cToast title=dskey('theme.site_property.bannerMessage.Title') content=dskey('theme.site_property.bannerMessage.htmlblock') delay=bannerMessageDuration?number class='bg-${dskey(\'theme.site_property.bannerMessage.Type\')}' />
 73   </@cInitToast>
 74   </#if>
 75   <#-- End Update ME -->
 76   </@cTpl>