Sfoglia il codice sorgente

:art: styling changes for image hovers

tags/0.9.0
j 4 anni fa
parent
commit
7d2a4ab40e

+ 7
- 2
vue-theme/src/app.vue Vedi File

36
             width: 100%
36
             width: 100%
37
             margin: 0 0 3vh 0
37
             margin: 0 0 3vh 0
38
             
38
             
39
-            :--headings
40
-                color: yellow
39
+            :--headings, a
40
+                color: $cia_red
41
+            img
42
+                transition: $transition ease-in
43
+                &:hover
44
+                    filter: grayscale(100%) brightness(85%)
45
+                    cursor: pointer
41
 
46
 
42
             > [class^="page--"]
47
             > [class^="page--"]
43
                 background-color: lightblue
48
                 background-color: lightblue

+ 7
- 3
vue-theme/src/components/card.vue Vedi File

1
 <template lang="pug">
1
 <template lang="pug">
2
 .card(v-if="content")
2
 .card(v-if="content")
3
-    router-link(:to="`/${type}`")
4
-        p.t-up {{type}}
5
-    .card--info(:class="{ 'wide': wide }")
3
+    header
4
+        router-link(:to="`/${type}`")
5
+            p.t-up {{type}}
6
+    article.card--info(:class="{ 'wide': wide }")
6
         router-link(:to="`/${type}/${content.slug}`")
7
         router-link(:to="`/${type}/${content.slug}`")
7
             featured-image(:post="content")
8
             featured-image(:post="content")
8
         .f-col.w-max
9
         .f-col.w-max
28
     text-overflow: clip
29
     text-overflow: clip
29
     &--info
30
     &--info
30
         justify-content: center
31
         justify-content: center
32
+    header
33
+        a
34
+            text-decoration: none
31
     img
35
     img
32
         width: 100%
36
         width: 100%
33
         height: auto
37
         height: auto

+ 0
- 3
vue-theme/src/components/featured-image.vue Vedi File

27
         getThumbnailFromYt(url) {
27
         getThumbnailFromYt(url) {
28
             return ytThumbnail(url, 'medium')
28
             return ytThumbnail(url, 'medium')
29
         }
29
         }
30
-    },
31
-    created() {
32
-        console.log(this.post)
33
     }
30
     }
34
 }
31
 }
35
 </script>
32
 </script>

+ 10
- 3
vue-theme/src/pages/index.vue Vedi File

10
 
10
 
11
         section
11
         section
12
             ul
12
             ul
13
-                li.shadow(v-for="type in ['episodes', 'exhibitions', 'events', 'artists', 'posts']")
13
+                li.shadow(v-for="type in firstRow")
14
                     card(:content="firstPostOfType(type)" :type="type")
14
                     card(:content="firstPostOfType(type)" :type="type")
15
 
15
 
16
         section.max
16
         section.max
17
             ul.w-max
17
             ul.w-max
18
-                li.shadow(v-for="post in [randomPostOfType('artists')]")
18
+                li.shadow(v-for="post in [randomPostOfType(secondRow)]")
19
                     card(v-if="post" :content="post" :type="`${post.type}s`" :wide="true")
19
                     card(v-if="post" :content="post" :type="`${post.type}s`" :wide="true")
20
 
20
 
21
         section
21
         section
22
             ul.flipped
22
             ul.flipped
23
-                li.shadow(v-for="type in ['episodes', 'exhibitions', 'events', 'artists', 'artists']")
23
+                li.shadow(v-for="type in thirdRow")
24
                     .random--wrapper(v-for="post in [randomPostOfType(type)]")
24
                     .random--wrapper(v-for="post in [randomPostOfType(type)]")
25
                         card(:content="post" :type="type")
25
                         card(:content="post" :type="type")
26
 </template>
26
 </template>
34
 export default {
34
 export default {
35
     mixins: [postTypeGetters, scrollTop],
35
     mixins: [postTypeGetters, scrollTop],
36
     components: { card },
36
     components: { card },
37
+    data() { 
38
+        return {
39
+            firstRow: ['episodes', 'exhibitions', 'events', 'artists', 'posts'],
40
+            secondRow: 'artists', // This is only ONE post
41
+            thirdRow: ['episodes', 'exhibitions', 'events', 'artists', 'artists']
42
+        }
43
+    },
37
     created() {
44
     created() {
38
         // console.log(wp)
45
         // console.log(wp)
39
         postTypes.forEach(type => {
46
         postTypes.forEach(type => {

+ 3
- 3
vue-theme/src/pages/list.vue Vedi File

155
         ul
155
         ul
156
             img
156
             img
157
                 max-width: 50%
157
                 max-width: 50%
158
-            li
159
-                
158
+
160
         .is-grid
159
         .is-grid
161
             display: flex
160
             display: flex
162
             flex-direction: row
161
             flex-direction: row
163
             flex-wrap: wrap
162
             flex-wrap: wrap
163
+            justify-content: space-between
164
             section
164
             section
165
-                width: 33%
165
+                width: 32.5%
166
             ul
166
             ul
167
                 flex-wrap: wrap
167
                 flex-wrap: wrap
168
                 list-style: none
168
                 list-style: none

+ 1
- 1
vue-theme/src/sss/variables.sss Vedi File

1
 @import './_ratios.sss'
1
 @import './_ratios.sss'
2
 
2
 
3
-$transition: 300ms
3
+$transition: 500ms
4
 
4
 
5
 $min-width: 20em
5
 $min-width: 20em
6
 $max-width: 77em
6
 $max-width: 77em

Loading…
Annulla
Salva