Skip to content

Commit

Permalink
Fix Mirador viewer (unmounted, collection modal remove by default) + …
Browse files Browse the repository at this point in the history
…fix facsimile navigation + fix padding on facsimile page + update SEO
  • Loading branch information
Lucaterre committed Apr 25, 2024
1 parent a3b4988 commit 404f138
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 15 deletions.
31 changes: 31 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"url": "^0.11.3",
"vue": "^3.2.13",
"vue-router": "^4.2.5",
"vue-router-sitemap": "^0.0.4",
"vue-slider-component": "^4.1.0-beta.7",
"vue3-carousel": "^0.3.1",
"vuex": "^4.1.0"
Expand Down
8 changes: 5 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<!DOCTYPE html>
<html lang="">
<html lang="fr">
<head>
<meta charset="utf-8">
<title>e-NDP | Notre-Dame de Paris et son cloître (1326-1504)</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="L'application e-NDP permet d'explorer l’intégralité des 26 registres médiévaux du chapitre de Notre-Dame de Paris. La publication de ce corpus inédit, dont toutes les données sont ouvertes, participe au renouvellement de la connaissance sur l’administration de la cathédrale par les chanoines et sur la société du cloître.">
<meta name="keywords" content="Moyen âge, Histoire médiévale, manuscrit, Notre-Dame de Paris, Chapitres cathédraux, Registres capitulaires, ANR e-NDP, chanoines, corpus médiéval, données ouvertes">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!--<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/bulma.min.css" />-->
<script src="https://kit.fontawesome.com/7202f6c941.js" crossorigin="anonymous"></script>
<title>e-NDP | Notre-Dame de Paris et son cloître (1326-1504)</title>
</head>
<body>
<noscript>
Expand Down
4 changes: 4 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Allow: /

Sitemap: https://www.end.chartes.psl.eu/sitemap.xml
27 changes: 27 additions & 0 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.endp.chartes.psl.eu</loc>
</url>
<url>
<loc>https://www.endp.chartes.psl.eu/registres</loc>
</url>
<url>
<loc>https://www.endp.chartes.psl.eu/persons</loc>
</url>
<url>
<loc>https://www.endp.chartes.psl.eu/ressources</loc>
</url>
<url>
<loc>https://www.endp.chartes.psl.eu/facsimile/collection/top</loc>
</url>
<url>
<loc>https://www.endp.chartes.psl.eu/contact</loc>
</url>
<url>
<loc>https://www.endp.chartes.psl.eu/credits</loc>
</url>
<url>
<loc>https://www.endp.chartes.psl.eu/termsofservice</loc>
</url>
</urlset>
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const toggleMobileMenu = function($event) {
const route = useRoute();
watch(() => route.name, (nextRoute, previousRoute) => {
isMobileMenuOpen.value = false;
console.log(nextRoute, previousRoute);
// console.log(nextRoute, previousRoute);
if (nextRoute !== "facsimile" || previousRoute !== "facsimile") {
window.scrollTo(0,0);
}
Expand Down
1 change: 1 addition & 0 deletions src/components/AppMenuAside.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export default {
navigateToFacSimile() {
this.$store.commit('setEndpVolume', "collection");
this.$store.commit('setCanvasId', "top");
this.$store.commit('setBtnCollectionClicked', false);
this.$router.push('/facsimile/collection/top');
},
},
Expand Down
18 changes: 16 additions & 2 deletions src/components/FacSimileNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,23 @@ export default {
};
},
computed: {
...mapState(["navByVolumesJSON"]),
...mapState(["navByVolumesJSON", "canvasId"]),
},
watch: {
canvasId(newVal) {
if (newVal) {
if (newVal === 'top') {
this.openRegisters = {};
this.highlighted = null;
this.navItemsSelected = {};
} else {
this.highlightAndUnfoldSelectedNav();
}
}
},
selectedNav(newVal) {
if (newVal) {
//console.log('selectedNav.canvasID changed', newVal);
this.highlightAndUnfoldSelectedNav();
}
},
Expand All @@ -74,6 +85,7 @@ export default {
highlightAndUnfoldSelectedNav() {
const {register, canvas, year} = this.selectedNav;
console.log('highlightAndUnfoldSelectedNav', register, canvas, year);
if (!register || !canvas || !year) return;
// close all years except the one clicked
Expand All @@ -83,6 +95,8 @@ export default {
}
}
this.openRegisters = {};
// Assurer que le registre et l'année sont ouverts
this.ensureOpenRegisterAndYear(register, year.split(' ')[1]);
Expand Down
4 changes: 4 additions & 0 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default createStore({
{iso_code: '11', name: 'Novembre'},
{iso_code: '12', name: 'Décembre'}
],
btnCollectionClicked: false,
// Data-driven JSON
navByDatesJSON: navByDatesJSON,
navByVolumesJSON: navByVolumesJSON,
Expand All @@ -50,6 +51,9 @@ export default createStore({
},
setEndpVolume(state, volume) {
state.endpVolume = volume;
},
setBtnCollectionClicked(state, value) {
state.btnCollectionClicked = value;
}
},
});
41 changes: 33 additions & 8 deletions src/views/FacSimileView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

<!-- Mobile Title section -->
<div class="mobile-header header">
<p class="facsimile-title" v-if="!registerPageDate">Collection des fac-similés de registres de conclusions capitulaires</p>
<p class="facsimile-title" v-if="registerPageDate">Fac-similé du registre de conclusions capitulaires {{ endpVolume }} de
Notre-Dame de Paris - <span class="date-title">{{ registerPageDate }}</span></p>
<p class="facsimile-title" v-if="canvasId === 'top'">Collection des fac-similés de registres de conclusions capitulaires</p>
<p class="facsimile-title" v-if="canvasId !== 'top'">Fac-similé du registre de conclusions capitulaires {{ endpVolume }} de
Notre-Dame de Paris <span v-if="registerPageDate">- <span class="date-title">{{ registerPageDate }}</span></span></p>
</div>

<!-- Main grid -->
Expand Down Expand Up @@ -66,9 +66,9 @@

<!-- Desktop Title section -->
<div class="header">
<p class="facsimile-title" v-if="!registerPageDate">Collection des fac-similés de registres de conclusions capitulaires</p>
<p class="facsimile-title" v-if="registerPageDate">Fac-similé du registre de conclusions capitulaires {{ endpVolume }} de
Notre-Dame de Paris - <span class="date-title">{{ registerPageDate }}</span></p>
<p class="facsimile-title" v-if="canvasId === 'top'">Collection des fac-similés de registres de conclusions capitulaires</p>
<p class="facsimile-title" v-if="canvasId !== 'top'">Fac-similé du registre de conclusions capitulaires {{ endpVolume }} de
Notre-Dame de Paris <span v-if="registerPageDate">- <span class="date-title">{{ registerPageDate }}</span></span></p>
</div>

<!-- Mirador viewer section -->
Expand Down Expand Up @@ -143,6 +143,7 @@ export default {
showCopyError: false,
loadPredictionText: false,
isNavOpen: true,
//btnCollectionClicked: false,
endpVolumeManifest() {
return this.endpVolume === "collection" || this.canvasId === "top"
? `${this.iiifEncService}collection/top`
Expand Down Expand Up @@ -187,6 +188,7 @@ export default {
computed: {
...mapState(
[
'btnCollectionClicked',
'canvasId',
'endpVolume',
'miradorSettings',
Expand Down Expand Up @@ -280,7 +282,7 @@ export default {
document: {
collectionDialogOn: false,
}
}],
}]
}, [...textOverlayPlugin]);
this.viewer.store.subscribe(() => {
this.storeState = this.viewer.store.getState();
Expand All @@ -300,7 +302,16 @@ export default {
// test if canvasObject is empty
if (Object.keys(canvasObject).length === 0) {
this.imageNakalaSrc = `${this.nakalaAppService}collection/${this.nakalaDoiImages}`;
/* A quick fix to disabled modal collection for first pass */
if (!this.btnCollectionClicked) {
try {
document.querySelector('.MuiButtonBase-root.MuiButton-root.MuiButton-text').click();
this.$store.commit('setBtnCollectionClicked', true);
//this.btnCollectionClicked = true;
} catch (e) {
/* do nothing */
}
}
} else {
this.imageNakalaSrc = nakalaUrlImageSrc;
}
Expand Down Expand Up @@ -408,6 +419,7 @@ export default {
this.$store.commit('setEndpVolume', this.$route.params.volumeIndex);
this.$store.commit('setCanvasId', this.$route.params.canvasIndex);
this.endpVolume = this.$route.params.volumeIndex;
this.$store.commit('setBtnCollectionClicked', false);
this.initMiradorViewer();
},
beforeUnmount() {
Expand Down Expand Up @@ -715,6 +727,19 @@ tspan {
}
.raw-prediction-card-parent {
background-color: #ffffff;
}
.raw-prediction-card-parent .card-header {
background-color: #ffffff;
}
.facsimile-columns .column:last-child div.raw-prediction-card-parent {
padding: 0 0 !important;
}
@media screen and (max-width: 1024px) {
#banner-image::before {
Expand Down
2 changes: 1 addition & 1 deletion src/views/RessourcesView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
retracer leur parcours. Chaque mention d’un événement est autant que possible liée à son attestation dans le
fac-similé.</p>

<p>Ce travail collaboratif au long cours, initié par Darwin Smith est partagé. Toutes les informations sont accessibles par le biai d'une <a href="https://endp.chartes.psl.eu/endp-person/api/docs" target="_blank">API ouverte</a> documentée.</p>
<p>Ce travail collaboratif au long cours, initié par Darwin Smith est partagé. Toutes les informations sont accessibles par le biais d'une <a href="https://endp.chartes.psl.eu/endp-person/api/docs" target="_blank">API ouverte</a> documentée.</p>

<br>
<h2 class="subtitle">Autres ressources</h2>
Expand Down

0 comments on commit 404f138

Please sign in to comment.