diff --git a/assets/css/app.scss b/assets/css/app.scss index 1fa23e2..ef58c58 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -248,8 +248,25 @@ section[role="main-content"]{ #edition{ header{ + position: relative; h1{ - @include title2black; + @include title1black; + } + aside.index-tooltip{ + margin-top: -1.75em; + position:absolute; + text-align: right; + right: 2em; + h1 { + @include title2black; + margin:0 0 0.5em 0; + } + p{ + margin:0 0 0.5em 0; + } + time{ + font-weight: 600; + } } } @@ -339,10 +356,16 @@ section[role="main-content"]{ font-weight: 600; } a{ - color: $rouge; font-weight: 600; &.active-link{ - text-decoration: underline; + color: $rouge; + // text-decoration: underline; + } + sup.mdi{ + font-size: 0.630em; + vertical-align: super; + // line-height: 0.1; + padding: 0 0.2em; } } } diff --git a/assets/css/base/_fonts.scss b/assets/css/base/_fonts.scss index 13c0ed6..8b248b5 100644 --- a/assets/css/base/_fonts.scss +++ b/assets/css/base/_fonts.scss @@ -36,6 +36,14 @@ footer[role="tools"] .row>nav{ margin:0; } +@mixin title1black { + @include fontserif; + font-size: 1.512em; + color: $grisfonce; + font-weight: 400; + margin:0; +} + @mixin title2black { @include fontserif; font-size: 1.134em; diff --git a/src/components/Content/EdText.vue b/src/components/Content/EdText.vue index 2545d03..ff475a1 100644 --- a/src/components/Content/EdText.vue +++ b/src/components/Content/EdText.vue @@ -51,12 +51,6 @@ export default { let index = null for (var i = 0; i < links.length; i++) { // console.log(`link ${i}:`, links[i]) - // domlink = domparser.parseFromString(links[i], 'text/xml').firstChild - // console.log('domlink', domlink.classList) - // if (domlink.classList.contains('placeName')) { index = 'locorum' } - // if (domlink.classList.contains('persName')) { index = 'nominum' } - // if (domlink.classList.contains('objectName')) { index = 'operum' } - // console.log('index:', index) linkparts = RegExp(/(.+)<\/a>/g).exec(links[i], 'g') // console.log('linkparts', linkparts) switch (linkparts[1]) { @@ -75,11 +69,15 @@ export default { newlink = `${linkparts[3]}` + ` @mouseover="onHoverLink"` + + ` @mouseleave="onLeaveLink"` + + `>${linkparts[3]}` + + `` + + `` // console.log('newlink', newlink) this.html = this.html.replace(links[i], newlink) } @@ -88,11 +86,23 @@ export default { } }, onClickRef (e) { - console.log('onClickRef()', e) + console.log('onClickRef(e)', e) this.$router.push({ - name: e.target.getAttribute('data-index'), - params: { id: e.target.getAttribute('uuid') } + name: e.target.dataset.index, + params: { id: e.target.dataset.uuid } }) + }, + onHoverLink (e) { + console.log('EdText onHoverLink(e)', e) + this.$emit('onHoverLink', { + uuid: e.target.dataset.uuid, + index: e.target.dataset.index, + rect: e.target.getBoundingClientRect() + }) + }, + onLeaveLink (e) { + // console.log('EdText onLeaveLink(e)', e) + this.$emit('onLeaveLink') } }, render (h) { diff --git a/src/pages/Edition.vue b/src/pages/Edition.vue index ab837f7..e7d078d 100644 --- a/src/pages/Edition.vue +++ b/src/pages/Edition.vue @@ -6,11 +6,34 @@
- +