Pārlūkot izejas kodu

:art: adjusting some widths in single template, and featured-image component

tags/0.9.0
J 4 gadus atpakaļ
vecāks
revīzija
1f1070a1fe
2 mainītis faili ar 11 papildinājumiem un 29 dzēšanām
  1. 9
    27
      vue-theme/src/components/hero.vue
  2. 2
    2
      vue-theme/src/pages/single.vue

+ 9
- 27
vue-theme/src/components/hero.vue Parādīt failu

1
 <template lang="pug">
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
         iframe(
4
         iframe(
5
             v-if="isPlaying"
5
             v-if="isPlaying"
6
             :src="`https://www.youtube.com/embed/${heroIdFromUrl}?autoplay=1`"
6
             :src="`https://www.youtube.com/embed/${heroIdFromUrl}?autoplay=1`"
7
             frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope"
7
             frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope"
8
             allowfullscreen
8
             allowfullscreen
9
-        ).embedded
9
+        ).embedded.w-max
10
         .blank.f-col(v-else)
10
         .blank.f-col(v-else)
11
             h3(v-if="heroText") {{ heroText }}
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
             button(v-if="showPlaybutton" @click="isPlaying = true") play
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
             h2.t-up.t-cntr(v-html="heroText")
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
     .hero--image(v-else)
18
     .hero--image(v-else)
19
-        .hero--image--overlay.f-col
19
+        .hero--image--overlay.w-max.f-col
20
             div(v-html="heroText")
20
             div(v-html="heroText")
21
     //- if not hero image then heading overlay to show only in main article
21
     //- if not hero image then heading overlay to show only in main article
22
 
22
 
84
 .hero
84
 .hero
85
     background-color: rebeccapurple
85
     background-color: rebeccapurple
86
     min-height: 35%
86
     min-height: 35%
87
-    width: 100%
88
     &--image
87
     &--image
89
-        width: 100%
90
-        > img
91
-            width: 100%
92
         &--overlay
88
         &--overlay
93
             color: $cia_white
89
             color: $cia_white
94
             position: absolute
90
             position: absolute
95
             /* top: 30% */
91
             /* top: 30% */
96
             margin: 20% 0
92
             margin: 20% 0
97
-            width: 100%
98
             h2 
93
             h2 
99
                 /* need better responsive solution for heading size  */
94
                 /* need better responsive solution for heading size  */
100
                 /* font-size: 1.5vh */
95
                 /* font-size: 1.5vh */
106
         height: 100%
101
         height: 100%
107
 
102
 
108
     .embedded
103
     .embedded
109
-        height: 100%
110
-        width: 100%
104
+        min-height: 210px
111
     .blank
105
     .blank
112
-        img 
113
-            width: 100vw
114
-            
115
         button 
106
         button 
116
             position: absolute
107
             position: absolute
117
             /* height: 7vw */
108
             /* height: 7vw */
119
             height: 7vw
110
             height: 7vw
120
             width: 10vw 
111
             width: 10vw 
121
             border-radius: 1.5vw
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
 </style>
113
 </style>

+ 2
- 2
vue-theme/src/pages/single.vue Parādīt failu

2
 .page--single.f-col.between
2
 .page--single.f-col.between
3
     gallery(v-if="activeGalleryIndex >= 0" :activeImageIndex="activeImageIndex" :images="imagesInGallery" @close="closeGallery")
3
     gallery(v-if="activeGalleryIndex >= 0" :activeImageIndex="activeImageIndex" :images="imagesInGallery" @close="closeGallery")
4
 
4
 
5
-    article(v-if="!post")
5
+    article.w-max(v-if="!post")
6
         header
6
         header
7
             p loading...
7
             p loading...
8
-    article(v-else).f-grow.shadow
8
+    article(v-else).w-max.f-grow.shadow
9
         header
9
         header
10
             //- breadcrumb links at top of page, needs link routing
10
             //- breadcrumb links at top of page, needs link routing
11
             breadcrumb.f-row.start.t-up
11
             breadcrumb.f-row.start.t-up

Notiek ielāde…
Atcelt
Saglabāt