瀏覽代碼

messing with font sizes | reset some default WP block style

tags/0.9.0
J 6 年之前
父節點
當前提交
ed71b67c13
共有 3 個文件被更改,包括 55 次插入13 次删除
  1. 31
    5
      vue-theme/src/app.vue
  2. 22
    7
      vue-theme/src/pages/index.vue
  3. 2
    1
      vue-theme/src/sss/variables.sss

+ 31
- 5
vue-theme/src/app.vue 查看文件

@@ -28,9 +28,14 @@ export default {
28 28
 
29 29
 html > body
30 30
     font-family: $sans
31
+    font-size: $base
31 32
     main 
32 33
         background-color: green
33 34
         width: 100%
35
+        
36
+        :--headings
37
+            color: red
38
+
34 39
         > [class^="page--"]
35 40
             background-color: pink
36 41
             max-width: 100em
@@ -38,17 +43,38 @@ html > body
38 43
             padding: $ms
39 44
             align-items: flex-start
40 45
             
41
-            /* Single &List Pages */
46
+            /* Content Pieces */
47
+            .post
48
+                background-color: teal
49
+                margin: 0 0 $ms
50
+                &--title
51
+                    color: yellow
52
+                    padding: 0 0 $ms
53
+                &--content
54
+                    color: orange
55
+                    &--block > p
56
+                        color: white
57
+                    .wp-block-image
58
+                        margin: 0
59
+                > ul
60
+                    list-style: none
61
+            
62
+            /* Single & List Pages */
42 63
             > article
43 64
                 background-color: lightpink
44
-                padding: $ms
65
+                > *
66
+                    padding: $ms
67
+                > section, > header
68
+                    margin: 0 0 $ms
45 69
             > aside
46 70
                 background-color: salmon
47
-                padding: $ms
48 71
                 margin: 0 0 0 $ms
49 72
                 width: 27%
50
-        :--headings
51
-            color: red
73
+                > *
74
+                    padding: $ms
75
+                > section
76
+                    > .post
77
+                        background-color: blue
52 78
 
53 79
     nav, footer
54 80
         &.main

+ 22
- 7
vue-theme/src/pages/index.vue 查看文件

@@ -1,19 +1,34 @@
1 1
 <template lang="pug">
2 2
 .page--index.f-row.between
3
-    article.page--index.f-grow
4
-        h1 {{ site }}: index
3
+    article.f-grow
4
+        header
5
+            h1 {{ site }}: index
5 6
         section(v-if="allPagesLoaded")
6 7
             h4 pages
7 8
             p {{ Object.values(allPages).length }}
8 9
         section(v-if="allPostsLoaded")
9 10
             h4 posts
10 11
             p {{ Object.values(allPosts).length }}
11
-            hr
12
-            div(v-for="post in allPosts")
13
-                h4 {{ post.slug }}
14
-                div(v-for="block in post.blocks" v-html="block")
12
+        section
13
+            //- COMPONENT: Looping component
14
+            .post(v-for="post in allPosts")
15
+                h4.post--title {{ post.slug }}
16
+                ul.post--content
17
+                    li.post--content--block(v-for="block in post.blocks" v-html="block")
18
+        footer.f-row
19
+            p icon
20
+
21
+    //- COMPONENT: Make this with a prop
15 22
     aside
16
-        h4 this is some other stuff
23
+        header
24
+            h4 this is some other stuff
25
+        section(v-if="allPostsLoaded")
26
+            //- COMPONENT: See above
27
+            .post(v-for="post in allPosts")
28
+                h4.post--title {{ post.slug }}
29
+                ul.post--content
30
+                    li.post--content--block(v-for="block in post.blocks" v-html="block")
31
+
17 32
 </template>
18 33
 
19 34
 <script>

+ 2
- 1
vue-theme/src/sss/variables.sss 查看文件

@@ -18,7 +18,8 @@ $serif: 'serif'
18 18
 $mono: 'monospace'
19 19
 
20 20
 // Proportion (to be replaced with modular scale)
21
-$ms: 0.7em
21
+$ms: 1vw
22
+$base: 1em
22 23
 
23 24
 // Circles for add page
24 25
 $radius: 2.5vw

Loading…
取消
儲存