Bläddra i källkod

:sparkles: rudimentary click mobile menu added

tags/0.9.0
J 5 år sedan
förälder
incheckning
d9b1ce5084
2 ändrade filer med 108 tillägg och 87 borttagningar
  1. 86
    81
      vue-theme/src/app.vue
  2. 22
    6
      vue-theme/src/components/navigation/navigation.vue

+ 86
- 81
vue-theme/src/app.vue Visa fil

@@ -22,91 +22,96 @@ export default {
22 22
 <style lang="postcss">
23 23
 @import './sss/variables.sss'
24 24
 
25
-html > body
26
-    font-family: $sans
27
-    font-size: $base
28
-    main 
29
-        background-color: green
30
-        width: 100%
31
-        
32
-        :--headings
33
-            color: yellow
34
-
35
-        > [class^="page--"]
36
-            background-color: lightblue
37
-            max-width: $max-width
38
-            width: 90%
39
-            padding: $ms 0
40
-            align-items: flex-start
41
-            
42
-            /* Block Shadow Thing */
43
-            .shadow
44
-                box-shadow: rgb(34, 36, 37) 0px 0px 4px 0px
45
-                border-radius: 8px
46
-    
47
-            /* Content Pieces */
48
-            .post
49
-                background-color: teal
50
-                margin: 0 0 $ms
51
-                &--title
52
-                    color: yellow
53
-                    padding: 0 0 $ms
54
-                &--content
55
-                    color: orange
56
-                    &--block > p
57
-                        color: white
58
-                    .wp-block-image
59
-                        margin: 0
60
-                        img
61
-                            width: 100%
62
-                > ul
63
-                    list-style: none
25
+html 
26
+    /* Hide the wpadminbar */
27
+    margin-top: 0 !important
28
+    #wpadminbar
29
+        display: none !important
30
+    > body
31
+        font-family: $sans
32
+        font-size: $base
33
+        main 
34
+            background-color: green
35
+            width: 100%
64 36
             
65
-            /* Single & List Pages */
66
-            > article
67
-                background-color: lightpink
68
-                > * > * 
69
-                    padding: $ms
70
-                > section, > header
37
+            :--headings
38
+                color: yellow
39
+
40
+            > [class^="page--"]
41
+                background-color: lightblue
42
+                max-width: $max-width
43
+                width: 90%
44
+                padding: $ms 0
45
+                align-items: flex-start
46
+                
47
+                /* Block Shadow Thing */
48
+                .shadow
49
+                    box-shadow: rgb(34, 36, 37) 0px 0px 4px 0px
50
+                    border-radius: 8px
51
+        
52
+                /* Content Pieces */
53
+                .post
54
+                    background-color: teal
71 55
                     margin: 0 0 $ms
72
-                .block-wrapper
73
-                    .wp-block-gallery
74
-                        .blocks-gallery
75
-                            /* &-grid
76
-                                list-style: none
77
-                            &-item
78
-                                float: left
79
-                        &.columns-1
80
-                            .blocks-gallery-item
56
+                    &--title
57
+                        color: yellow
58
+                        padding: 0 0 $ms
59
+                    &--content
60
+                        color: orange
61
+                        &--block > p
62
+                            color: white
63
+                        .wp-block-image
64
+                            margin: 0
65
+                            img
81 66
                                 width: 100%
82
-                        &.columns-2
83
-                            .blocks-gallery-item
84
-                                width: 50%
85
-                        &.columns-3
86
-                            .blocks-gallery-item
87
-                                width: 33.33%
88
-                        &.columns-4
89
-                            .blocks-gallery-item
90
-                                width: 25% */
91
-            
92
-            /* Sidebar */
93
-            > aside
94
-                background-color: salmon
95
-                margin: 0 0 0 $ms
96
-                min-width: 27%
97
-                width: 27%
98
-                > section
99
-                    > *
67
+                    > ul
68
+                        list-style: none
69
+                
70
+                /* Single & List Pages */
71
+                > article
72
+                    background-color: lightpink
73
+                    > * > * 
100 74
                         padding: $ms
101
-                        margin: 0 0 $ms 0
102
-                    > .post
103
-                        background-color: blue
75
+                    > section, > header
76
+                        margin: 0 0 $ms
77
+                    .block-wrapper
78
+                        .wp-block-gallery
79
+                            .blocks-gallery
80
+                                /* &-grid
81
+                                    list-style: none
82
+                                &-item
83
+                                    float: left
84
+                            &.columns-1
85
+                                .blocks-gallery-item
86
+                                    width: 100%
87
+                            &.columns-2
88
+                                .blocks-gallery-item
89
+                                    width: 50%
90
+                            &.columns-3
91
+                                .blocks-gallery-item
92
+                                    width: 33.33%
93
+                            &.columns-4
94
+                                .blocks-gallery-item
95
+                                    width: 25% */
96
+                
97
+                /* Sidebar */
98
+                > aside
99
+                    background-color: salmon
100
+                    margin: 0 0 0 $ms
101
+                    min-width: 27%
102
+                    width: 27%
103
+                    > section
104
+                        > *
105
+                            padding: $ms
106
+                            margin: 0 0 $ms 0
107
+                        > .post
108
+                            background-color: blue
104 109
 
105
-    nav, footer
106
-        &.main
107
-            background-color: pink
108
-            padding: 0 $ms
109
-            width: 100%
110
-            ul > li
110
+        nav, footer
111
+            &.main
112
+                background-color: pink
111 113
                 padding: 0 $ms
114
+                width: 100%
115
+                ul > li
116
+                    padding: 0 $ms
112 117
 </style>

+ 22
- 6
vue-theme/src/components/navigation/navigation.vue Visa fil

@@ -1,13 +1,14 @@
1 1
 // Replace with calls to menu system
2 2
 <template lang="pug">
3 3
 nav.main
4
+    router-link(to="/")
5
+        h1.t-serif.t-up x
6
+            span &nbsp;logotype
7
+    
8
+    label(for="toggle-mobile-menu" aria-label="Menu") &#9776;
9
+    input(id="toggle-mobile-menu" type="checkbox").hide
10
+
4 11
     ul
5
-        li
6
-            router-link(to="/")
7
-                h1.t-serif x
8
-                    span &nbsp;logotype
9
-        li
10
-            h5 &nbsp;
11 12
         li
12 13
             router-link(:to="`/`")
13 14
                 h5 home
@@ -45,9 +46,24 @@ nav.main
45 46
 
46 47
 nav.main
47 48
     background-color: lightblue
49
+    a > h1
50
+        margin: 0
51
+    label
52
+        position: absolute
53
+        right: 3vw
54
+        top: 10px
55
+    input
56
+        &.hide
57
+            display: none
58
+            cursor: pointer
59
+            &:checked + ul
60
+                display: block 
61
+                clear: both 
62
+                position: fixed
48 63
     ul
49 64
         width: 100%
50 65
         background-color: grey
66
+        display: none
51 67
         li
52 68
             h5
53 69
                 color: $cia_black

Laddar…
Avbryt
Spara