Parcourir la source

feat: adding rows for homepage | feat: new max width sss variable | feat: tweaking some old styles

tags/0.9.0
John Maeda il y a 6 ans
Parent
révision
6a376128f5

+ 2
- 2
vue-theme/src/app.vue Voir le fichier

41
 
41
 
42
         > [class^="page--"]
42
         > [class^="page--"]
43
             background-color: pink
43
             background-color: pink
44
-            max-width: 100em
44
+            max-width: $max-width
45
             width: 90%
45
             width: 90%
46
             padding: $ms 0
46
             padding: $ms 0
47
             align-items: flex-start
47
             align-items: flex-start
71
             /* Single & List Pages */
71
             /* Single & List Pages */
72
             > article
72
             > article
73
                 background-color: lightpink
73
                 background-color: lightpink
74
-                > *
74
+                > * > *
75
                     padding: $ms
75
                     padding: $ms
76
                 > section, > header
76
                 > section, > header
77
                     margin: 0 0 $ms
77
                     margin: 0 0 $ms

+ 10
- 2
vue-theme/src/components/navigation/navigation.vue Voir le fichier

1
 // Replace with calls to menu system
1
 // Replace with calls to menu system
2
 <template lang="pug">
2
 <template lang="pug">
3
-nav.main
3
+nav.main.f-row.center
4
     ul.f-row.between
4
     ul.f-row.between
5
         li
5
         li
6
             a(href="/")
6
             a(href="/")
15
             a(href="/artists") artists
15
             a(href="/artists") artists
16
         li
16
         li
17
             a(href="/episodes") episodes
17
             a(href="/episodes") episodes
18
-</template>
18
+</template>
19
+
20
+<style lang="postcss">
21
+@import '../../sss/variables.sss'
22
+
23
+nav.main
24
+    ul
25
+        width: $max-width
26
+</style>

+ 39
- 32
vue-theme/src/pages/index.vue Voir le fichier

2
 <template lang="pug">
2
 <template lang="pug">
3
 .page--index.f-row.between
3
 .page--index.f-row.between
4
     article.f-grow
4
     article.f-grow
5
-        section(v-if="allEpisodesLoaded").shadow
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
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
16
-            h4 pages
17
-            router-link(:to="`./pages/${Object.values(allPages)[0].slug}`")
18
-                p {{ Object.values(allPages)[0].title }}
19
-        section(v-if="allPostsLoaded").shadow
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 }}
24
-        section
25
-            //- COMPONENT: Looping component
26
-            .post(v-for="post in allPosts")
27
-                h4.post--title {{ post.slug }}
28
-                ul.post--content
29
-                    li.post--content--block(v-for="block in post.blocks" v-html="block")
30
-        footer.f-row
31
-            p icon
5
+        .f-row
6
+            section(v-if="allEpisodesLoaded").shadow
7
+                router-link(:to="`./episodes`")
8
+                    h4 Episodes
9
+                router-link(:to="`./episodes/${Object.values(allEpisodes)[0].slug}`")
10
+                    p {{ Object.values(allEpisodes)[0].title }}
11
+            section(v-if="allArtistsLoaded").shadow
12
+                router-link(:to="`./artists`")
13
+                    h4 artists
14
+                router-link(:to="`./artists/${Object.values(allArtists)[0].slug}`")
15
+                    p {{ Object.values(allArtists)[0].title }}
16
+            section(v-if="allPagesLoaded").shadow
17
+                h4 pages
18
+                router-link(:to="`./pages/${Object.values(allPages)[0].slug}`")
19
+                    p {{ Object.values(allPages)[0].title }}
20
+        .f-row
21
+            section(v-if="allPostsLoaded").shadow
22
+                router-link(:to="`./posts`")
23
+                    h4 posts
24
+                router-link(:to="`./posts/${Object.values(allPosts)[0].slug}`")
25
+                    p {{ Object.values(allPosts)[0].title }}
26
+        .f-row
27
+            section
28
+                //- COMPONENT: Looping component
29
+                .post(v-for="post in allPosts")
30
+                    h4.post--title {{ post.slug }}
31
+                    ul.post--content
32
+                        li.post--content--block(v-for="block in post.blocks" v-html="block")
33
+        .f-row
34
+            footer.f-row
35
+                p icon
32
 </template>
36
 </template>
33
 
37
 
34
 <script>
38
 <script>
75
 
79
 
76
 .page--index
80
 .page--index
77
     article
81
     article
82
+        .f-row
83
+            &:nth-of-type(2)
84
+                margin: $ms 0
78
         section
85
         section
79
-            float: left
80
-            width: 25%
86
+            flex-grow: 1
81
             &:nth-of-type(1)
87
             &:nth-of-type(1)
82
-                width: 49.7%
88
+                flex-grow: 3
83
             &:nth-of-type(2), &:nth-of-type(3)
89
             &:nth-of-type(2), &:nth-of-type(3)
90
+                flex-grow: 1
84
                 margin: 0 0 0 $ms
91
                 margin: 0 0 0 $ms
85
-                width: 24%
86
             &:nth-of-type(4), &:nth-of-type(5)
92
             &:nth-of-type(4), &:nth-of-type(5)
87
-                width: 100%
93
+                flex-grow: 4
94
+            
88
 </style>
95
 </style>

+ 2
- 0
vue-theme/src/pages/list.vue Voir le fichier

5
             h1 {{ type }} list
5
             h1 {{ type }} list
6
             span(v-if="sortBy")
6
             span(v-if="sortBy")
7
                 h1 &nbsp;sorted by {{ sortBy.replace('-', ' ') }}
7
                 h1 &nbsp;sorted by {{ sortBy.replace('-', ' ') }}
8
+        
8
         section.shadow
9
         section.shadow
9
             h4 {{ type }}
10
             h4 {{ type }}
10
             p {{ Object.values(posts).length }}
11
             p {{ Object.values(posts).length }}
11
             p {{ sidebar }}
12
             p {{ sidebar }}
13
+
12
         section(v-for="post in posts").shadow
14
         section(v-for="post in posts").shadow
13
             router-link(:to="`/${type}/${post.slug}`")
15
             router-link(:to="`/${type}/${post.slug}`")
14
                 h4 {{ post.title }}
16
                 h4 {{ post.title }}

+ 6
- 0
vue-theme/src/pages/single.vue Voir le fichier

3
     article.f-grow.shadow
3
     article.f-grow.shadow
4
         header
4
         header
5
             h1 {{ type }}:{{ $route.params.slug }} single
5
             h1 {{ type }}:{{ $route.params.slug }} single
6
+
6
         section
7
         section
7
             h4 {{ posts[$route.params.slug].title }}
8
             h4 {{ posts[$route.params.slug].title }}
8
             .block-wrapper(v-for="block in posts[$route.params.slug].blocks" v-html="block")
9
             .block-wrapper(v-for="block in posts[$route.params.slug].blocks" v-html="block")
10
+    
9
     sidebar(v-if="sidebar" :type="`${type}`")
11
     sidebar(v-if="sidebar" :type="`${type}`")
12
+        .shadow
13
+            h1.t-up single slot
14
+            div
15
+                p body whatever
10
 </template>
16
 </template>
11
 
17
 
12
 <script>
18
 <script>

+ 2
- 0
vue-theme/src/sss/variables.sss Voir le fichier

21
 $ms: 1vw
21
 $ms: 1vw
22
 $base: 1em
22
 $base: 1em
23
 
23
 
24
+$max-width: 70em
25
+
24
 // Circles for add page
26
 // Circles for add page
25
 $radius: 2.5vw
27
 $radius: 2.5vw
26
 $path: 4px
28
 $path: 4px

Chargement…
Annuler
Enregistrer