From fa83b7ca4198a67d51b721188b1ca1419b6e1131 Mon Sep 17 00:00:00 2001 From: axolotle Date: Fri, 2 Jul 2021 18:26:23 +0200 Subject: [PATCH] add popup welcome on first visit --- src/assets/scss/abstracts/_variables.scss | 10 +- .../scss/base/_bootstrap-overrides.scss | 2 +- src/components/layouts/PageView.vue | 26 +++-- src/components/nodes/NodeViewFooter.vue | 2 +- src/pages/Home.vue | 17 +++- src/pages/Introduction.vue | 94 +++++++++++++++++-- src/store/modules/pages.js | 11 ++- 7 files changed, 129 insertions(+), 33 deletions(-) diff --git a/src/assets/scss/abstracts/_variables.scss b/src/assets/scss/abstracts/_variables.scss index f10ca99..e4e135b 100644 --- a/src/assets/scss/abstracts/_variables.scss +++ b/src/assets/scss/abstracts/_variables.scss @@ -86,6 +86,7 @@ $font-family-sans-serif: 'Noto Sans'; $font-family-text: 'Redaction'; // custom $font-size-base: 1rem; +$font-size-base-em: 1em; $font-size-sm: $font-size-base * .9; $line-height-base: 1.5; @@ -95,6 +96,13 @@ $line-height-sm: $line-height-base; // Headings $headings-font-weight: 700; $headings-line-height: $line-height-base; +$h1-font-size: $font-size-base-em * 2.5; +$h2-font-size: $font-size-base-em * 2; +$h3-font-size: $font-size-base-em * 1.75; +$h4-font-size: $font-size-base-em * 1.5; +$h5-font-size: $font-size-base-em * 1.25; +$h6-font-size: $font-size-base-em; + // Buttons $input-btn-padding-y: 0; $input-btn-padding-x: .5rem; @@ -161,7 +169,7 @@ $popover-arrow-outer-color: null; // HEADER $header-spacer-sm: 18px; -$header-spacer: 35px; +$header-spacer: 30px; $header-height: 86px; // NODEVIEW diff --git a/src/assets/scss/base/_bootstrap-overrides.scss b/src/assets/scss/base/_bootstrap-overrides.scss index ab39df4..651c4ee 100644 --- a/src/assets/scss/base/_bootstrap-overrides.scss +++ b/src/assets/scss/base/_bootstrap-overrides.scss @@ -52,6 +52,6 @@ a:hover { @if $color == 'depart' { @include text-emphasis-variant(".text-#{$color}", $black, true); } @else { - @include text-emphasis-variant(".text-#{$color}", darken($value, 30%), true); + @include text-emphasis-variant(".text-#{$color}", darken($value, 15%), true); } } diff --git a/src/components/layouts/PageView.vue b/src/components/layouts/PageView.vue index 2638587..eb94ef0 100644 --- a/src/components/layouts/PageView.vue +++ b/src/components/layouts/PageView.vue @@ -1,5 +1,5 @@ @@ -13,16 +13,9 @@ export default { slug: { type: String, required: true } }, - data () { - return { - links: undefined - } - }, - methods: { addFootnotes () { const links = this.$el.querySelectorAll('.page-wrapper a') - console.log('addFootnotes', links) links.forEach((link, i) => { const number = parseInt(link.hash.replace('#', '')) if (!isNaN(number)) { @@ -38,8 +31,6 @@ export default { this.addFootnoteContent(link, i) } }) - - this.links = links }, addFootnoteContent (link, i) { @@ -51,13 +42,14 @@ export default { }, onFootnoteLinkClick (e) { - document.getElementById(e.target.id + '-content').classList.toggle('show') - console.log('onFootnoteLinkClick', e.target.dataset.number, e) + const container = document.getElementById(e.target.id + '-content') + if (container) { + container.classList.toggle('show') + } } }, mounted () { - console.log('mounted', this.page.notes) if (this.page.notes) this.addFootnotes() } } @@ -65,6 +57,12 @@ export default { diff --git a/src/components/nodes/NodeViewFooter.vue b/src/components/nodes/NodeViewFooter.vue index 51c3f89..a9f915c 100644 --- a/src/components/nodes/NodeViewFooter.vue +++ b/src/components/nodes/NodeViewFooter.vue @@ -2,7 +2,7 @@