Bläddra i källkod

feat: links links links

tags/0.9.0
John Maeda 6 år sedan
förälder
incheckning
4831ac4512

+ 28
- 3
vue-theme/src/app.vue Visa fil

43
             background-color: pink
43
             background-color: pink
44
             max-width: 100em
44
             max-width: 100em
45
             width: 90%
45
             width: 90%
46
-            padding: $ms
46
+            padding: $ms 0
47
             align-items: flex-start
47
             align-items: flex-start
48
             
48
             
49
+            /* Block Shadow Thing */
49
             .shadow
50
             .shadow
50
                 box-shadow: rgb(34, 36, 37) 0px 0px 4px 0px
51
                 box-shadow: rgb(34, 36, 37) 0px 0px 4px 0px
51
             .b-radius
52
             .b-radius
76
                     padding: $ms
77
                     padding: $ms
77
                 > section, > header
78
                 > section, > header
78
                     margin: 0 0 $ms
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
             > aside
102
             > aside
80
                 background-color: salmon
103
                 background-color: salmon
81
                 margin: 0 0 0 $ms
104
                 margin: 0 0 0 $ms
105
+                min-width: 27%
82
                 width: 27%
106
                 width: 27%
83
-                > *
84
-                    padding: $ms
85
                 > section
107
                 > section
108
+                    > *
109
+                        padding: $ms
110
+                        margin: 0 0 $ms 0
86
                     > .post
111
                     > .post
87
                         background-color: blue
112
                         background-color: blue
88
 
113
 

+ 2
- 0
vue-theme/src/components/navigation/navigation.vue Visa fil

9
             p  
9
             p  
10
         li
10
         li
11
             a(href="/") home
11
             a(href="/") home
12
+        li
13
+            a(href="/posts") news
12
         li
14
         li
13
             a(href="/artists") artists
15
             a(href="/artists") artists
14
         li
16
         li

vue-theme/src/components/sidebar/sidebar.vue → vue-theme/src/components/sidebars/sidebar.vue Visa fil

1
 <template lang="pug">
1
 <template lang="pug">
2
-aside.shadow.b-radius
3
-    header
4
-        h4 this is an aisde for {{ type }}
2
+aside
5
     section
3
     section
6
         slot
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
 </template>
9
 </template>
8
 
10
 
9
 <script>
11
 <script>

+ 42
- 29
vue-theme/src/pages/index.vue Visa fil

1
 // Homepage grid
1
 // Homepage grid
2
 <template lang="pug">
2
 <template lang="pug">
3
 .page--index.f-row.between
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
             h4 pages
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
         section
24
         section
20
             //- COMPONENT: Looping component
25
             //- COMPONENT: Looping component
21
             .post(v-for="post in allPosts")
26
             .post(v-for="post in allPosts")
24
                     li.post--content--block(v-for="block in post.blocks" v-html="block")
29
                     li.post--content--block(v-for="block in post.blocks" v-html="block")
25
         footer.f-row
30
         footer.f-row
26
             p icon
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
 </template>
32
 </template>
40
 
33
 
41
 <script>
34
 <script>
46
         ...mapGetters({
39
         ...mapGetters({
47
             somePages: 'somePages',
40
             somePages: 'somePages',
48
             allPages: 'allPages',
41
             allPages: 'allPages',
49
-            allPostsLoaded: 'allPostsLoaded',
50
-            allPosts: 'allPosts',
51
             allPagesLoaded: 'allPagesLoaded',
42
             allPagesLoaded: 'allPagesLoaded',
43
+
44
+            allPosts: 'allPosts',
45
+            allPostsLoaded: 'allPostsLoaded',
46
+            
52
             allArtists: 'allArtists',
47
             allArtists: 'allArtists',
53
             allArtistsLoaded: 'allArtistsLoaded',
48
             allArtistsLoaded: 'allArtistsLoaded',
49
+            
54
             allEpisodes: 'allEpisodes',
50
             allEpisodes: 'allEpisodes',
55
             allEpisodesLoaded: 'allEpisodesLoaded',
51
             allEpisodesLoaded: 'allEpisodesLoaded',
56
         }),
52
         }),
72
         this.$store.dispatch('getAllEpisodes')
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 Visa fil

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

+ 8
- 2
vue-theme/src/pages/single.vue Visa fil

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

+ 3
- 0
vue-theme/src/sss/_helpers.sss Visa fil

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

Laddar…
Avbryt
Spara