@explorer-1/vue 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/components/BaseHeading/BaseHeading.vue +1 -1
- package/src/components/BlockHeading/BlockHeading.vue +0 -1
- package/src/components/BlockStreamfield/BlockStreamfield.stories.js +10 -0
- package/src/components/BlockTable/BlockTable.vue +0 -4
- package/src/components/NavDesktopEdu/NavDesktopEdu.vue +0 -26
- package/src/components/NavSecondary/NavSecondary.vue +1 -1
- package/src/templates/PageContent/PageContent.vue +17 -1
- package/src/templates/edu/PageContentEdu.stories.js +31 -0
- package/src/templates/edu/PageEduNewsDetail.vue +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@explorer-1/vue",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"vue": "^3.4.21",
|
|
29
29
|
"vue-observe-visibility": "^1.0.0",
|
|
30
30
|
"vue3-compare-image": "^1.2.5",
|
|
31
|
-
"@explorer-1/common": "1.0.
|
|
31
|
+
"@explorer-1/common": "1.0.5"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
@@ -49,6 +49,16 @@ export const BlockStreamfieldData = {
|
|
|
49
49
|
'<p>Lorem ipsum <a href="/missions/test-mission/">dolor</a> sit amet, consectetur adipiscing elit. Quisque vitae justo quis justo malesuada molestie. Cras sed tincidunt dui.</p><p>Integer imperdiet blandit neque vitae euismod. Nulla aliquet lacus nibh, vel tincidunt urna efficitur non. In et eros vitae ex posuere maximus quis eget urna. Suspendisse fringilla posuere velit sit amet posuere. Morbi malesuada bibendum vehicula. Donec faucibus ut erat ut mattis. Suspendisse ornare, quam at placerat cursus, dolor mi lacinia nunc, eget maximus augue nulla in dolor.</p>\n'
|
|
50
50
|
},
|
|
51
51
|
BlockInlineImageData.block,
|
|
52
|
+
{
|
|
53
|
+
blockType: 'HeadingBlock',
|
|
54
|
+
heading: 'Heading 2',
|
|
55
|
+
level: 'h2'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
blockType: 'HeadingBlock',
|
|
59
|
+
heading: 'Heading 3',
|
|
60
|
+
level: 'h3'
|
|
61
|
+
},
|
|
52
62
|
{
|
|
53
63
|
blockType: 'RichTextBlock',
|
|
54
64
|
value:
|
|
@@ -65,9 +65,5 @@ export default defineComponent({
|
|
|
65
65
|
</script>
|
|
66
66
|
|
|
67
67
|
<style lang="scss">
|
|
68
|
-
@import '@explorer-1/common/src/scss/typography';
|
|
69
|
-
// required for @apply text-subtitle in _BlockTable.scss
|
|
70
|
-
@import '@explorer-1/common/src/scss/components/BlockText';
|
|
71
|
-
// required for @extend .BlockText in _BlockTable.scss
|
|
72
68
|
@import '@explorer-1/common/src/scss/components/BlockTable';
|
|
73
69
|
</style>
|
|
@@ -8,13 +8,11 @@
|
|
|
8
8
|
'transition-transform': scrollTop > 0 && scrolledCurrentPage, // If not at the top of the page, just transition the transform to prevents content from peeking through on header reveal.
|
|
9
9
|
'transform -translate-y-full': !scrolledUp && !headerVisible,
|
|
10
10
|
'-scrolled transform translate-y-0': scrolledUp && headerVisible && scrollTop > 0,
|
|
11
|
-
'-transparent': invert,
|
|
12
11
|
'-hasSecondary': !headerStore?.highlightPrimary
|
|
13
12
|
}"
|
|
14
13
|
>
|
|
15
14
|
<!-- navbar -->
|
|
16
15
|
<div class="header-bg z-10 max-w-screen-3xl absolute inset-0 mx-auto"></div>
|
|
17
|
-
<div class="bg-primary z-0 absolute right-0 w-1/2 top-0 bottom-0"></div>
|
|
18
16
|
<div class="px-4">
|
|
19
17
|
<div class="h-18 container flex items-center justify-between mx-auto">
|
|
20
18
|
<!-- branding -->
|
|
@@ -287,29 +285,5 @@ export default defineComponent({
|
|
|
287
285
|
}
|
|
288
286
|
}
|
|
289
287
|
}
|
|
290
|
-
|
|
291
|
-
&.-scrolled {
|
|
292
|
-
@apply border-b border-gray-mid border-opacity-50 bg-white;
|
|
293
|
-
|
|
294
|
-
&.-transparent {
|
|
295
|
-
> .header-bg {
|
|
296
|
-
@apply opacity-0 bg-white;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.main-navigation {
|
|
300
|
-
> * {
|
|
301
|
-
@apply text-gray-dark;
|
|
302
|
-
|
|
303
|
-
.NavDesktopDropdown > button {
|
|
304
|
-
text-shadow: none;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
&.-hasSecondary {
|
|
311
|
-
@apply border-0 border-transparent;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
288
|
}
|
|
315
289
|
</style>
|
|
@@ -139,7 +139,7 @@ export default defineComponent({
|
|
|
139
139
|
<style lang="scss">
|
|
140
140
|
.NavSecondary {
|
|
141
141
|
top: -1px; // for intersection observer to work
|
|
142
|
-
@apply sticky z-50 w-full bg-white border-b border-gray-mid border-opacity-0 transition-border-opacity duration-150 ease-in;
|
|
142
|
+
@apply sticky z-50 w-full bg-white border-b edu:border-0 border-gray-mid border-opacity-0 transition-border-opacity duration-150 ease-in;
|
|
143
143
|
@apply hidden;
|
|
144
144
|
@screen lg {
|
|
145
145
|
@apply block;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { defineComponent } from 'vue'
|
|
3
3
|
import { useRoute } from 'vue-router'
|
|
4
|
+
import { mapStores } from 'pinia'
|
|
5
|
+
import { useThemeStore } from '../../store/theme'
|
|
6
|
+
|
|
4
7
|
import HeroMedia from '@explorer-1/vue/src/components/HeroMedia/HeroMedia.vue'
|
|
5
8
|
import NavSecondary from '@explorer-1/vue/src/components/NavSecondary/NavSecondary.vue'
|
|
6
9
|
import LayoutHelper from '@explorer-1/vue/src/components/LayoutHelper/LayoutHelper.vue'
|
|
7
10
|
import DetailHeadline from '@explorer-1/vue/src/components/DetailHeadline/DetailHeadline.vue'
|
|
8
11
|
import BlockImageStandard from '@explorer-1/vue/src/components/BlockImage/BlockImageStandard.vue'
|
|
9
12
|
import ShareButtons from '@explorer-1/vue/src/components/ShareButtons/ShareButtons.vue'
|
|
13
|
+
import ShareButtonsEdu from '@explorer-1/vue/src/components/ShareButtonsEdu/ShareButtonsEdu.vue'
|
|
10
14
|
import BlockStreamfield from '@explorer-1/vue/src/components/BlockStreamfield/BlockStreamfield.vue'
|
|
11
15
|
import BlockRelatedLinks from '@explorer-1/vue/src/components/BlockRelatedLinks/BlockRelatedLinks.vue'
|
|
12
16
|
import FormContact from '@explorer-1/vue/src/components/FormContact/FormContact.vue'
|
|
@@ -24,6 +28,7 @@ export default defineComponent({
|
|
|
24
28
|
DetailHeadline,
|
|
25
29
|
BlockImageStandard,
|
|
26
30
|
ShareButtons,
|
|
31
|
+
ShareButtonsEdu,
|
|
27
32
|
BlockStreamfield,
|
|
28
33
|
BlockRelatedLinks,
|
|
29
34
|
FormContact,
|
|
@@ -38,6 +43,10 @@ export default defineComponent({
|
|
|
38
43
|
}
|
|
39
44
|
},
|
|
40
45
|
computed: {
|
|
46
|
+
...mapStores(useThemeStore),
|
|
47
|
+
isEdu() {
|
|
48
|
+
return this.themeStore.theme === 'ThemeEdu'
|
|
49
|
+
},
|
|
41
50
|
heroInline() {
|
|
42
51
|
if (this.data?.heroPosition === 'inline') {
|
|
43
52
|
return true
|
|
@@ -92,6 +101,13 @@ export default defineComponent({
|
|
|
92
101
|
:label="data.displayLabel"
|
|
93
102
|
:class="{ 'sr-only': hideH1 }"
|
|
94
103
|
/>
|
|
104
|
+
<ShareButtonsEdu
|
|
105
|
+
v-if="isEdu && data?.url"
|
|
106
|
+
class="mt-4"
|
|
107
|
+
:url="data.url"
|
|
108
|
+
:title="data.title"
|
|
109
|
+
:image="data.thumbnailImage?.original"
|
|
110
|
+
/>
|
|
95
111
|
</LayoutHelper>
|
|
96
112
|
|
|
97
113
|
<!-- inline hero -->
|
|
@@ -114,7 +130,7 @@ export default defineComponent({
|
|
|
114
130
|
class="lg:mb-0 relative mb-8"
|
|
115
131
|
>
|
|
116
132
|
<ShareButtons
|
|
117
|
-
v-if="data.title && data.url"
|
|
133
|
+
v-if="data.title && data.url && !isEdu"
|
|
118
134
|
:title="data.title"
|
|
119
135
|
:url="data.url"
|
|
120
136
|
/>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ContentPageData } from './../PageContent/PageContent.stories.js'
|
|
2
|
+
import PageContent from './../PageContent/PageContent.vue'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Templates/EDU/PageContent',
|
|
6
|
+
component: PageContent,
|
|
7
|
+
decorators: [
|
|
8
|
+
() => ({
|
|
9
|
+
template: `<div id="storyDecorator" class="ThemeEdu"><story/></div>`
|
|
10
|
+
})
|
|
11
|
+
],
|
|
12
|
+
parameters: {
|
|
13
|
+
html: {
|
|
14
|
+
root: '#storyDecorator'
|
|
15
|
+
},
|
|
16
|
+
docs: {
|
|
17
|
+
description: {
|
|
18
|
+
component:
|
|
19
|
+
'EDU uses the same `PageContent` component as WWW. The only difference is the theme class used on the site.'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
excludeStories: /.*(Data)$/
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// stories
|
|
27
|
+
export const BaseStory = {
|
|
28
|
+
args: {
|
|
29
|
+
data: ContentPageData
|
|
30
|
+
}
|
|
31
|
+
}
|