| 
									
										
										
										
											2020-03-26 19:04:23 +01:00
										 |  |  | <template> | 
					
						
							| 
									
										
										
										
											2020-03-30 14:26:19 +02:00
										 |  |  |   <v-app class="srd"> | 
					
						
							| 
									
										
										
										
											2020-03-30 11:03:20 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-11 18:01:59 +02:00
										 |  |  |     <NavDrawer class="d-print-none" /> | 
					
						
							|  |  |  |     <RightDrawer class="d-print-none" v-if="hasRightDrawer" /> | 
					
						
							| 
									
										
										
										
											2020-03-26 19:04:23 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-11 18:01:59 +02:00
										 |  |  |     <Navbar class="d-print-none" /> | 
					
						
							| 
									
										
										
										
											2020-03-26 19:04:23 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-28 10:42:54 +01:00
										 |  |  |     <v-content> | 
					
						
							| 
									
										
										
										
											2020-04-15 16:27:16 +02:00
										 |  |  |       <v-container fluid ref="container"> | 
					
						
							| 
									
										
										
										
											2020-03-30 11:03:20 +02:00
										 |  |  |         <v-row align="start" justify="center"> | 
					
						
							|  |  |  |           <v-col cols="12"> | 
					
						
							|  |  |  |             <DefaultGlobalLayout/> | 
					
						
							|  |  |  |           </v-col> | 
					
						
							| 
									
										
										
										
											2020-03-28 10:42:54 +01:00
										 |  |  |         </v-row> | 
					
						
							|  |  |  |       </v-container> | 
					
						
							|  |  |  |     </v-content> | 
					
						
							| 
									
										
										
										
											2020-04-17 17:04:03 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-18 15:27:29 +02:00
										 |  |  |     <v-dialog v-model="shallNotPass" persistent max-width="600"> | 
					
						
							|  |  |  |       <v-card> | 
					
						
							|  |  |  |         <v-card-title class="headline">Meneur de jeu</v-card-title> | 
					
						
							|  |  |  |         <v-card-text> | 
					
						
							|  |  |  |           <p>Tu te trouves seul dans l'obscurité du repaire du dragon noir. Tu serres ton bâton de magicien entre tes mains et t'apprêtes à réagir à la moindre menace.</p> | 
					
						
							|  |  |  |           <p>Que fais-tu ?</p> | 
					
						
							|  |  |  |           <v-text-field label="Je veux..." v-model="iWantTo"></v-text-field> | 
					
						
							|  |  |  |         </v-card-text> | 
					
						
							|  |  |  |         <v-card-actions> | 
					
						
							|  |  |  |           <v-btn color="primary" text @click="setShallPass">Valider</v-btn> | 
					
						
							|  |  |  |         </v-card-actions> | 
					
						
							|  |  |  |       </v-card> | 
					
						
							|  |  |  |     </v-dialog> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <v-bottom-sheet v-model="cookieConsentDialog" persistent> | 
					
						
							|  |  |  |       <v-sheet class="text-center" tile> | 
					
						
							|  |  |  |         <div class="py-3">Ce site utilise des cookies pour son bon fonctionnement et pour l'analyse de la fréquentation. Sans ces cookies, vous ne pourriez pas écrire vos sorts dans votre grimoire ou recruter tous ces monstres pour garnir votre repaire maléfique.</div> | 
					
						
							|  |  |  |         <v-btn class="my-6" color="primary" @click="setCookieConsent">Compris</v-btn> | 
					
						
							|  |  |  |       </v-sheet> | 
					
						
							|  |  |  |     </v-bottom-sheet> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-28 10:42:54 +01:00
										 |  |  |   </v-app> | 
					
						
							| 
									
										
										
										
											2020-03-26 19:04:23 +01:00
										 |  |  | </template> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <script> | 
					
						
							|  |  |  | import GlobalLayout from '@app/components/GlobalLayout.vue' | 
					
						
							|  |  |  | import Navbar from '@theme/components/Navbar.vue' | 
					
						
							| 
									
										
										
										
											2020-03-30 11:03:20 +02:00
										 |  |  | import NavDrawer from '@theme/components/NavDrawer.vue' | 
					
						
							| 
									
										
										
										
											2020-04-01 19:34:06 +02:00
										 |  |  | import RightDrawer from '@theme/components/RightDrawer.vue' | 
					
						
							| 
									
										
										
										
											2020-04-15 16:27:16 +02:00
										 |  |  | import Vue from 'vue' | 
					
						
							|  |  |  | import RuleTooltip from '@theme/global-components/RT' | 
					
						
							| 
									
										
										
										
											2020-04-18 15:27:29 +02:00
										 |  |  | import Cookies from 'js-cookie' | 
					
						
							| 
									
										
										
										
											2020-03-26 19:04:23 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | export default { | 
					
						
							|  |  |  |   name: 'GlobalLayout', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   components: { | 
					
						
							|  |  |  |     DefaultGlobalLayout: GlobalLayout, | 
					
						
							| 
									
										
										
										
											2020-03-30 11:03:20 +02:00
										 |  |  |     Navbar, | 
					
						
							| 
									
										
										
										
											2020-04-01 19:34:06 +02:00
										 |  |  |     NavDrawer, | 
					
						
							|  |  |  |     RightDrawer | 
					
						
							| 
									
										
										
										
											2020-03-26 19:04:23 +01:00
										 |  |  |   }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   data () { | 
					
						
							|  |  |  |     return { | 
					
						
							| 
									
										
										
										
											2020-04-18 15:27:29 +02:00
										 |  |  |       shallNotPass: true, | 
					
						
							|  |  |  |       iWantTo: null, | 
					
						
							|  |  |  |       cookieConsentDialog: true, | 
					
						
							| 
									
										
										
										
											2020-03-26 19:04:23 +01:00
										 |  |  |     } | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   computed: { | 
					
						
							| 
									
										
										
										
											2020-04-17 17:04:03 +02:00
										 |  |  |     footerCSS () { | 
					
						
							|  |  |  |       let css = '' | 
					
						
							|  |  |  |       if (this.$store.state.drawer) { | 
					
						
							|  |  |  |         css += ' footer-padding-left' | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |       if (this.$store.state.rightDrawer) { | 
					
						
							|  |  |  |         css += ' footer-padding-right' | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |       return css | 
					
						
							|  |  |  |     }, | 
					
						
							| 
									
										
										
										
											2020-04-01 19:34:06 +02:00
										 |  |  |     hasRightDrawer() { | 
					
						
							|  |  |  |       return this.$store.state.hasRightDrawer | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-03-26 19:04:23 +01:00
										 |  |  |   }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   mounted () { | 
					
						
							| 
									
										
										
										
											2020-04-11 18:01:59 +02:00
										 |  |  |     this.$store.commit('setDrawer', this.$vuetify.breakpoint.lgAndUp) | 
					
						
							| 
									
										
										
										
											2020-04-18 15:27:29 +02:00
										 |  |  |     const AUTHORIZED = Cookies.get('shallpass') | 
					
						
							|  |  |  |     if (AUTHORIZED) { | 
					
						
							|  |  |  |       this.shallNotPass = false | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Cookie consent
 | 
					
						
							|  |  |  |     const COOKIECONSENT = Cookies.get('heros-et-dragons-cookies') | 
					
						
							|  |  |  |     if (COOKIECONSENT == 'compris') { | 
					
						
							|  |  |  |       this.cookieConsentDialog = false | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Cookie consent
 | 
					
						
							|  |  |  |     const THEMEISDARK = Cookies.get('heros-et-dragons-is-dark') | 
					
						
							|  |  |  |     if (THEMEISDARK === 'true') { | 
					
						
							|  |  |  |       this.$vuetify.theme.dark = true | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-04-22 11:17:05 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Chargement des donées utilisateur depuis le navigateur
 | 
					
						
							|  |  |  |     this.$store.commit('mySpells/initialiseStore') | 
					
						
							|  |  |  |     this.$store.commit('myMonsters/initialiseStore') | 
					
						
							|  |  |  |     this.$store.commit('myMagicItems/initialiseStore') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-17 11:31:24 +02:00
										 |  |  |     // this.$vuetify.theme.dark = this.$store.state.isThemeDark
 | 
					
						
							| 
									
										
										
										
											2020-04-15 16:27:16 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // let conditionLinks = document.links
 | 
					
						
							|  |  |  |     // conditionLinks.forEach((link, idx) => {
 | 
					
						
							|  |  |  |     //   if (link.hash == "#a-terre") {
 | 
					
						
							|  |  |  |     //     let RTClass = Vue.extend(RuleTooltip)
 | 
					
						
							|  |  |  |     //     let rtInstance = new RTClass({
 | 
					
						
							|  |  |  |     //       propsData: { l: link.text, t: link.hash.substring(1, link.hash.length) },
 | 
					
						
							|  |  |  |     //       parent: this.$root
 | 
					
						
							|  |  |  |     //     })
 | 
					
						
							|  |  |  |     //     rtInstance.$mount()
 | 
					
						
							|  |  |  |     //     console.log(link)
 | 
					
						
							|  |  |  |     //     link = rtInstance.$el
 | 
					
						
							|  |  |  |     //     console.log(link)
 | 
					
						
							|  |  |  |     //   }
 | 
					
						
							|  |  |  |     // })
 | 
					
						
							| 
									
										
										
										
											2020-03-26 19:04:23 +01:00
										 |  |  |   }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   methods: { | 
					
						
							| 
									
										
										
										
											2020-04-18 15:27:29 +02:00
										 |  |  |     setShallPass () { | 
					
						
							|  |  |  |       if (this.iWantTo == 'Je veux lancer un projectile magique !') { | 
					
						
							|  |  |  |         Cookies.set('shallpass', true) | 
					
						
							|  |  |  |         this.shallNotPass = false | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     setCookieConsent () { | 
					
						
							|  |  |  |       Cookies.set('heros-et-dragons-cookies', 'compris') | 
					
						
							|  |  |  |       this.cookieConsentDialog = false | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-03-26 19:04:23 +01:00
										 |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | </script> | 
					
						
							| 
									
										
										
										
											2020-04-17 17:04:03 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | <style lang="scss"> | 
					
						
							|  |  |  | .footer-padding-left { | 
					
						
							|  |  |  |   padding-left: 300px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | .footer-padding-right { | 
					
						
							|  |  |  |   padding-right: 300px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | </style> |