Просмотр исходного кода

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

tags/0.9.0
j 4 лет назад
Родитель
Сommit
74fac8a5ba
3 измененных файлов: 15 добавлений и 14 удалений
  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 Просмотреть файл

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

+ 1
- 1
vue-theme/src/pages/list.vue Просмотреть файл

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

+ 1
- 1
vue-theme/src/pages/single.vue Просмотреть файл

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

Загрузка…
Отмена
Сохранить