Selaa lähdekoodia

feat: links links links

tags/0.9.0
John Maeda 6 vuotta sitten
vanhempi
commit
4831ac4512

+ 28
- 3
vue-theme/src/app.vue Näytä tiedosto

@@ -43,9 +43,10 @@ html > body
43 43
             background-color: pink
44 44
             max-width: 100em
45 45
             width: 90%
46
-            padding: $ms
46
+            padding: $ms 0
47 47
             align-items: flex-start
48 48
             
49
+            /* Block Shadow Thing */
49 50
             .shadow
50 51
                 box-shadow: rgb(34, 36, 37) 0px 0px 4px 0px
51 52
             .b-radius
@@ -76,13 +77,37 @@ html > body
76 77
                     padding: $ms
77 78
                 > section, > header
78 79
                     margin: 0 0 $ms
80
+                > section .block-wrapper
81
+                    img
82
+                        width: 100%
83
+                    .wp-block-gallery
84
+                        .blocks-gallery
85
+                            &-grid
86
+                                list-style: none
87
+                            &-item
88
+                                loat: left
89
+                        &.columns-1
90
+                            .blocks-gallery-item
91
+                                width: 100%
92
+                        &.columns-2
93
+                            .blocks-gallery-item
94
+                                width: 50%
95
+                        &.columns-3
96
+                            .blocks-gallery-item
97
+                                width: 33.33%
98
+                        &.columns-4
99
+                            .blocks-gallery-item
100
+                                width: 25%
101
+                        
79 102
             > aside
80 103
                 background-color: salmon
81 104
                 margin: 0 0 0 $ms
105
+                min-width: 27%
82 106
                 width: 27%
83
-                > *
84
-                    padding: $ms
85 107
                 > section
108
+                    > *
109
+                        padding: $ms
110
+                        margin: 0 0 $ms 0
86 111
                     > .post
87 112
                         background-color: blue
88 113
 

+ 2
- 0
vue-theme/src/components/navigation/navigation.vue Näytä tiedosto

@@ -9,6 +9,8 @@ nav.main
9 9
             p  
10 10
         li
11 11
             a(href="/") home
12
+        li
13
+            a(href="/posts") news
12 14
         li
13 15
             a(href="/artists") artists
14 16
         li

vue-theme/src/components/sidebar/sidebar.vue → vue-theme/src/components/sidebars/sidebar.vue Näytä tiedosto

@@ -1,9 +1,11 @@
1 1
 <template lang="pug">
2
-aside.shadow.b-radius
3
-    header
4
-        h4 this is an aisde for {{ type }}
2
+aside
5 3
     section
6 4
         slot
5
+        .shadow.b-radius(v-if="type === 'artists'")
6
+            p {{ type }} stuff
7
+        .shadow.b-radius(v-else)
8
+            p {{ type }} sidebar
7 9
 </template>
8 10
 
9 11
 <script>

+ 42
- 29
vue-theme/src/pages/index.vue Näytä tiedosto

@@ -1,21 +1,26 @@
1 1
 // Homepage grid
2 2
 <template lang="pug">
3 3
 .page--index.f-row.between
4
-    article.f-grow.shadow.b-radius
5
-        header
6
-            h1 {{ site }}: index
7
-        section(v-if="allEpisodesLoaded")
8
-            h4 Episodes
9
-            p {{ Object.values(allEpisodes).length }}
10
-        section(v-if="allArtistsLoaded")
11
-            h4 artists
12
-            p {{ Object.values(allArtists).length }}
13
-        section(v-if="allPagesLoaded")
4
+    article.f-grow
5
+        section(v-if="allEpisodesLoaded").shadow.b-radius
6
+            router-link(:to="`./episodes`")
7
+                h4 Episodes
8
+            router-link(:to="`./episodes/${Object.values(allEpisodes)[0].slug}`")
9
+                p {{ Object.values(allEpisodes)[0].title }}
10
+        section(v-if="allArtistsLoaded").shadow.b-radius
11
+            router-link(:to="`./artists`")
12
+                h4 artists
13
+            router-link(:to="`./artists/${Object.values(allArtists)[0].slug}`")
14
+                p {{ Object.values(allArtists)[0].title }}
15
+        section(v-if="allPagesLoaded").shadow.b-radius
14 16
             h4 pages
15
-            p {{ Object.values(allPages).length }}
16
-        section(v-if="allPostsLoaded")
17
-            h4 posts
18
-            p {{ Object.values(allPosts).length }}
17
+            router-link(:to="`./pages/${Object.values(allPages)[0].slug}`")
18
+                p {{ Object.values(allPages)[0].title }}
19
+        section(v-if="allPostsLoaded").shadow.b-radius
20
+            router-link(:to="`./posts`")
21
+                h4 posts
22
+            router-link(:to="`./posts/${Object.values(allPosts)[0].slug}`")
23
+                p {{ Object.values(allPosts)[0].title }}
19 24
         section
20 25
             //- COMPONENT: Looping component
21 26
             .post(v-for="post in allPosts")
@@ -24,18 +29,6 @@
24 29
                     li.post--content--block(v-for="block in post.blocks" v-html="block")
25 30
         footer.f-row
26 31
             p icon
27
-
28
-    //- COMPONENT: Make this with a prop
29
-    aside.shadow.b-radius
30
-        header
31
-            h4 this is some other stuff
32
-        section(v-if="allPostsLoaded")
33
-            //- COMPONENT: See above
34
-            .post(v-for="post in allPosts")
35
-                h4.post--title {{ post.slug }}
36
-                ul.post--content
37
-                    li.post--content--block(v-for="block in post.blocks" v-html="block")
38
-
39 32
 </template>
40 33
 
41 34
 <script>
@@ -46,11 +39,14 @@ export default {
46 39
         ...mapGetters({
47 40
             somePages: 'somePages',
48 41
             allPages: 'allPages',
49
-            allPostsLoaded: 'allPostsLoaded',
50
-            allPosts: 'allPosts',
51 42
             allPagesLoaded: 'allPagesLoaded',
43
+
44
+            allPosts: 'allPosts',
45
+            allPostsLoaded: 'allPostsLoaded',
46
+            
52 47
             allArtists: 'allArtists',
53 48
             allArtistsLoaded: 'allArtistsLoaded',
49
+            
54 50
             allEpisodes: 'allEpisodes',
55 51
             allEpisodesLoaded: 'allEpisodesLoaded',
56 52
         }),
@@ -72,4 +68,21 @@ export default {
72 68
         this.$store.dispatch('getAllEpisodes')
73 69
     }
74 70
 }
75
-</script>
71
+</script>
72
+
73
+<style lang="postcss">
74
+@import '../sss/variables.sss'
75
+
76
+.page--index
77
+    article
78
+        section
79
+            float: left
80
+            width: 25%
81
+            &:nth-of-type(1)
82
+                width: 49.7%
83
+            &:nth-of-type(2), &:nth-of-type(3)
84
+                margin: 0 0 0 $ms
85
+                width: 24%
86
+            &:nth-of-type(4), &:nth-of-type(5)
87
+                width: 100%
88
+</style>

+ 18
- 7
vue-theme/src/pages/list.vue Näytä tiedosto

@@ -1,22 +1,27 @@
1 1
 <template lang="pug">
2 2
 .page--list.f-row.between
3 3
     article.f-grow
4
-        header
5
-            h1 {{ $route.params.type }} list
6
-        section
7
-            h4 {{ $route.params.type }}
4
+        header.f-row.center
5
+            h1 {{ type }} list
6
+        section.shadow.b-radius
7
+            h4 {{ type }}
8 8
             p {{ Object.values(posts).length }}
9 9
             p {{ sidebar }}
10
-        section(v-for="post in posts")
10
+        section(v-for="post in posts").shadow.b-radius
11 11
             router-link(:to="`./${type}/${post.slug}`")
12 12
                 h4 {{ post.title }}
13
+
13 14
     sidebar(v-if="sidebar" :type="`${type}`")
14
-        h1 slots
15
+        .shadow.b-radius
16
+            h1 slots stuff
17
+            div
18
+                p more body whatever
19
+                p another line of stuff
15 20
 </template>
16 21
 
17 22
 <script>
18 23
 import { mapGetters } from 'vuex'
19
-import sidebar from '@/components/sidebar/sidebar'
24
+import sidebar from '@/components/sidebars/sidebar'
20 25
 
21 26
 export default {
22 27
     props: {
@@ -29,6 +34,12 @@ export default {
29 34
     },
30 35
     computed: {
31 36
         ...mapGetters({
37
+            allPages: 'allPages',
38
+            allPagesLoaded: 'allPagesLoaded',
39
+
40
+            allPosts: 'allPosts',
41
+            allPostsLoaded: 'allPostsLoaded',
42
+            
32 43
             allArtists: 'allArtists',
33 44
             allArtistsLoaded: 'allArtistsLoaded',
34 45
 

+ 8
- 2
vue-theme/src/pages/single.vue Näytä tiedosto

@@ -2,7 +2,7 @@
2 2
 .page--single.f-row.between
3 3
     article.f-grow
4 4
         header
5
-            h1 {{ $route.params.type }}:{{ $route.params.slug }} single
5
+            h1 {{ type }}:{{ $route.params.slug }} single
6 6
         section
7 7
             h4 {{ posts[$route.params.slug].title }}
8 8
             .block-wrapper(v-for="block in posts[$route.params.slug].blocks" v-html="block")
@@ -11,7 +11,7 @@
11 11
 
12 12
 <script>
13 13
 import { mapGetters } from 'vuex'
14
-import sidebar from '@/components/sidebar/sidebar'
14
+import sidebar from '@/components/sidebars/sidebar'
15 15
 
16 16
 export default {
17 17
     props: {
@@ -24,6 +24,12 @@ export default {
24 24
     },
25 25
     computed: {
26 26
         ...mapGetters({
27
+            allPages: 'allPages',
28
+            allPagesLoaded: 'allPagesLoaded',
29
+
30
+            allPosts: 'allPosts',
31
+            allPostsLoaded: 'allPostsLoaded',
32
+            
27 33
             allArtists: 'allArtists',
28 34
             allArtistsLoaded: 'allArtistsLoaded',
29 35
 

+ 3
- 0
vue-theme/src/sss/_helpers.sss Näytä tiedosto

@@ -19,6 +19,9 @@
19 19
             justify-content: space-between
20 20
         &.around
21 21
             justify-content: space-around
22
+        &.center
23
+            justify-content: center
24
+            align-items: center
22 25
     &-row
23 26
         flex-direction: row
24 27
     &-col

Loading…
Peruuta
Tallenna