Bläddra i källkod

:recycle: adjustments to hero text overlay | bug fix for youtube hero

tags/0.9.0
j 4 år sedan
förälder
incheckning
74fac8a5ba
3 ändrade filer med 15 tillägg och 14 borttagningar
  1. 13
    12
      vue-theme/src/components/hero.vue
  2. 1
    1
      vue-theme/src/pages/list.vue
  3. 1
    1
      vue-theme/src/pages/single.vue

+ 13
- 12
vue-theme/src/components/hero.vue Visa fil

8
             allowfullscreen
8
             allowfullscreen
9
         ).embedded.w-max
9
         ).embedded.w-max
10
         .blank.f-col(v-else)
10
         .blank.f-col(v-else)
11
-            h3(v-if="heroText") {{ heroText }}
11
+            .hero--image--overlay.w-max.f-col
12
+                h2.t-up.t-cntr(v-if="heroText") {{ heroText }}
12
             img.w-max(:src="getThumbnailFromYt(showHero)" alt="hero alt image")
13
             img.w-max(:src="getThumbnailFromYt(showHero)" alt="hero alt image")
13
             //- button(v-if="showPlaybutton" @click="isPlaying = true") play
14
             //- button(v-if="showPlaybutton" @click="isPlaying = true") play
14
             button(v-if="showPlaybutton" @click="isPlaying = true")
15
             button(v-if="showPlaybutton" @click="isPlaying = true")
89
         &--overlay
90
         &--overlay
90
             color: $cia_white
91
             color: $cia_white
91
             position: absolute
92
             position: absolute
92
-            /* top: 30% */
93
             margin: 20% 0
93
             margin: 20% 0
94
             h2 
94
             h2 
95
                 /* need better responsive solution for heading size  */
95
                 /* need better responsive solution for heading size  */
96
-                /* font-size: 1.5vh */
96
+                font-size: 5vw
97
                 color: $cia_white
97
                 color: $cia_white
98
                 text-shadow: 1px 1px $cia_black
98
                 text-shadow: 1px 1px $cia_black
99
                 max-width: 70vw
99
                 max-width: 70vw
100
+                margin: -25vh 0 0
100
     &--video
101
     &--video
101
         width: 100vw
102
         width: 100vw
102
         height: 100%
103
         height: 100%
108
     .blank
109
     .blank
109
         button 
110
         button 
110
             position: absolute
111
             position: absolute
111
-            height: $ms-8
112
-            width: $ms-8
112
+            min-height: $ms-7
113
+            min-width: $ms-7
113
             background-color: rgba(170,17,0,0.4)
114
             background-color: rgba(170,17,0,0.4)
114
             border-radius: 50%
115
             border-radius: 50%
115
-            border-width: 3px
116
-            border-color: white
117
-            border-style: solid
116
+            border: 2px white solid
117
+            &:hover 
118
+                border: 2px #DDD solid
119
+                background-color: rgba(170,170,170,0.7)
118
             &:after 
120
             &:after 
119
                 content: ""
121
                 content: ""
120
                 position: absolute
122
                 position: absolute
121
                 top: 20%
123
                 top: 20%
122
-                left: 30%
124
+                left: 35%
123
                 border-style: solid
125
                 border-style: solid
124
-                border-width: 1.2em 0 1.2em 2.1em
126
+                border-width: 1em 0 1em 1.6em
125
                 border-color: transparent transparent transparent white
127
                 border-color: transparent transparent transparent white
126
 
128
 
127
         @media (min-width: $medium)     
129
         @media (min-width: $medium)     
128
             button 
130
             button 
129
                 height: $ms-9
131
                 height: $ms-9
130
                 width: $ms-9
132
                 width: $ms-9
131
-                border-width: 4px
132
-
133
+                border-width: 3px
133
                 &:after 
134
                 &:after 
134
                     top: 18%
135
                     top: 18%
135
                     left: 30%
136
                     left: 30%

+ 1
- 1
vue-theme/src/pages/list.vue Visa fil

81
             const page = this.allPages[type]
81
             const page = this.allPages[type]
82
             if(!page) return
82
             if(!page) return
83
             
83
             
84
-            const json = { url: page.featured, heroType: 'image' }
84
+            let json = { url: page.featured, heroType: 'image' }
85
             if(page.hero && JSON.parse(page.hero) && JSON.parse(page.hero).url) {
85
             if(page.hero && JSON.parse(page.hero) && JSON.parse(page.hero).url) {
86
                 json = JSON.parse(page.hero)
86
                 json = JSON.parse(page.hero)
87
                 json.heroType = 'video'
87
                 json.heroType = 'video'

+ 1
- 1
vue-theme/src/pages/single.vue Visa fil

144
         checkAndSetHero(post) {
144
         checkAndSetHero(post) {
145
             if(!post) return
145
             if(!post) return
146
 
146
 
147
-            const json = { url: post.featured, heroType: 'image' }
147
+            let json = { url: post.featured, heroType: 'image' }
148
             if(post.hero && JSON.parse(post.hero) && JSON.parse(post.hero).url) {
148
             if(post.hero && JSON.parse(post.hero) && JSON.parse(post.hero).url) {
149
                 json = JSON.parse(post.hero)
149
                 json = JSON.parse(post.hero)
150
                 json.heroType = 'video'
150
                 json.heroType = 'video'

Laddar…
Avbryt
Spara