Ajout hyphen

This commit is contained in:
Tibo
2020-01-13 22:21:24 +01:00
parent aff4f57711
commit 1e895d5b51
157 changed files with 16864 additions and 10 deletions
+31 -10
View File
@@ -1,6 +1,5 @@
<template>
<Layout>
<!-- Mise en page -->
<!-- introductions -->
<div class="v-center grow">
<div v-for="edge in $page.introductions.edges.slice().reverse()" :key="`introductions${edge.node.id}`">
@@ -49,18 +48,18 @@
</div>
</div>
<!-- Chapitres -->
<div v-for="(edge,index) in $page.chapitres.edges.slice().reverse()" :key="`chapitre${edge.node.id}`">
<div v-for="(edge,index) in $page.chapitres.edges.slice().reverse()" :key="`chapitre${edge.node.id}`">
<div class="blank-page no-folio breakBeforeLeft" />
<div v-if="edge.node.Rubrique">
<div class="section-title">
{{edge.node.Rubrique}}
</div>
<h2 :id="`chapitres${edge.node.id}`" class="chapter-title ">{{edge.node.Titre}}</h2>
<VueMarkdown :id="`chapitres${edge.node.id}`" class="chapter-title ">{{edge.node.Titre}}</VueMarkdown>
</div>
<div v-else>
<h2 :id="`chapitres${edge.node.id}`" class="chapter-title">{{edge.node.Titre}}</h2>
<VueMarkdown :id="`chapitres${edge.node.id}`" class="chapter-title">{{edge.node.Titre}}</VueMarkdown>
</div>
<VueMarkdown class="chapter-content justify">{{edge.node.Contenu}}
<VueMarkdown lang="en-us" class="hyphen chapter-content justify">{{edge.node.Contenu}}
</VueMarkdown>
</div>
<!-- Page blanche -->
@@ -75,8 +74,8 @@
<!-- Credits -->
<div class="credits canbreak">
<div class="credit" v-for="(edge,index) in $page.credits.edges.slice().reverse()" :key="`credits-${edge.node.id}`">
<h4 v-html="edge.node.Role"/>
<VueMarkdown lang="fr" class="section-content">{{ edge.node.Nom }}</VueMarkdown>
<h4 v-html="edge.node.Role" />
<VueMarkdown class="section-content">{{ edge.node.Nom }}</VueMarkdown>
</div>
</div>
<div class="blank-page no-folio fill-green" />
@@ -143,10 +142,32 @@ export default {
});
allPromises.push(promise);
});
Promise.all(allPromises).then(() => {
let previewer = new Previewer();
previewer.preview();
this.$nextTick(function() {
Promise.all(allPromises).then(() => {
let hyphenopoly = document.createElement('script'),
hyph = document.createElement('script');
hyphenopoly.setAttribute('src', 'lib/Hyphenopoly-master/Hyphenopoly_Loader.js')
hyph.setAttribute('src', 'lib/hyph.js')
document.head.appendChild(hyph)
document.head.appendChild(hyphenopoly)
hyph.onload = () => {
Hyphenopoly.handleEvent = {
hyphenopolyEnd: (e) => {
let previewer = new Previewer();
previewer.preview();
}
};
};
});
});
});
}
};