|
|
@@ -1,22 +1,22 @@
|
|
1
|
1
|
<template lang="pug">
|
|
2
|
|
-.hero.f-col(v-if="showHero")
|
|
3
|
|
- .hero--video(v-if="heroType === 'video'")
|
|
|
2
|
+.hero.w-max.f-col(v-if="showHero")
|
|
|
3
|
+ .hero--video.w-max(v-if="heroType === 'video'")
|
|
4
|
4
|
iframe(
|
|
5
|
5
|
v-if="isPlaying"
|
|
6
|
6
|
:src="`https://www.youtube.com/embed/${heroIdFromUrl}?autoplay=1`"
|
|
7
|
7
|
frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope"
|
|
8
|
8
|
allowfullscreen
|
|
9
|
|
- ).embedded
|
|
|
9
|
+ ).embedded.w-max
|
|
10
|
10
|
.blank.f-col(v-else)
|
|
11
|
11
|
h3(v-if="heroText") {{ heroText }}
|
|
12
|
|
- img(:src="getThumbnailFromYt(showHero)" alt="hero alt image")
|
|
|
12
|
+ img.w-max(:src="getThumbnailFromYt(showHero)" alt="hero alt image")
|
|
13
|
13
|
button(v-if="showPlaybutton" @click="isPlaying = true") play
|
|
14
|
|
- .hero--image(v-else-if="heroType === 'image'")
|
|
15
|
|
- .hero--image--overlay.f-col
|
|
|
14
|
+ .hero--image.w-max(v-else-if="heroType === 'image'")
|
|
|
15
|
+ .hero--image--overlay.w-max.f-col
|
|
16
|
16
|
h2.t-up.t-cntr(v-html="heroText")
|
|
17
|
|
- img(:src="showHero" alt="hero alt image")
|
|
|
17
|
+ img.w-max(:src="showHero" alt="hero alt image")
|
|
18
|
18
|
.hero--image(v-else)
|
|
19
|
|
- .hero--image--overlay.f-col
|
|
|
19
|
+ .hero--image--overlay.w-max.f-col
|
|
20
|
20
|
div(v-html="heroText")
|
|
21
|
21
|
//- if not hero image then heading overlay to show only in main article
|
|
22
|
22
|
|
|
|
@@ -84,17 +84,12 @@ export default {
|
|
84
|
84
|
.hero
|
|
85
|
85
|
background-color: rebeccapurple
|
|
86
|
86
|
min-height: 35%
|
|
87
|
|
- width: 100%
|
|
88
|
87
|
&--image
|
|
89
|
|
- width: 100%
|
|
90
|
|
- > img
|
|
91
|
|
- width: 100%
|
|
92
|
88
|
&--overlay
|
|
93
|
89
|
color: $cia_white
|
|
94
|
90
|
position: absolute
|
|
95
|
91
|
/* top: 30% */
|
|
96
|
92
|
margin: 20% 0
|
|
97
|
|
- width: 100%
|
|
98
|
93
|
h2
|
|
99
|
94
|
/* need better responsive solution for heading size */
|
|
100
|
95
|
/* font-size: 1.5vh */
|
|
|
@@ -106,12 +101,8 @@ export default {
|
|
106
|
101
|
height: 100%
|
|
107
|
102
|
|
|
108
|
103
|
.embedded
|
|
109
|
|
- height: 100%
|
|
110
|
|
- width: 100%
|
|
|
104
|
+ min-height: 210px
|
|
111
|
105
|
.blank
|
|
112
|
|
- img
|
|
113
|
|
- width: 100vw
|
|
114
|
|
-
|
|
115
|
106
|
button
|
|
116
|
107
|
position: absolute
|
|
117
|
108
|
/* height: 7vw */
|
|
|
@@ -119,13 +110,4 @@ export default {
|
|
119
|
110
|
height: 7vw
|
|
120
|
111
|
width: 10vw
|
|
121
|
112
|
border-radius: 1.5vw
|
|
122
|
|
-
|
|
123
|
|
-/* min-width settings */
|
|
124
|
|
-/* dynamic scaling for heading size scaling */
|
|
125
|
|
-// Medium devices (tablets, 768px and up)
|
|
126
|
|
-@media (min-width: $medium)
|
|
127
|
|
-.hero
|
|
128
|
|
- background-color: pink
|
|
129
|
|
- &--video
|
|
130
|
|
-
|
|
131
|
113
|
</style>
|