瀏覽代碼

:art: making single and list layouts responsive | making sidebar responsive

tags/0.9.0
j 4 年之前
父節點
當前提交
4e54fab919
共有 4 個檔案被更改,包括 28 行新增22 行删除
  1. 0
    13
      vue-theme/src/app.vue
  2. 17
    1
      vue-theme/src/components/sidebars/sidebar.vue
  3. 6
    2
      vue-theme/src/pages/list.vue
  4. 5
    6
      vue-theme/src/pages/single.vue

+ 0
- 13
vue-theme/src/app.vue 查看文件

95
                                 .blocks-gallery-item
95
                                 .blocks-gallery-item
96
                                     width: 25% */
96
                                     width: 25% */
97
                 
97
                 
98
-                /* Sidebar */
99
-                > aside
100
-                    background-color: salmon
101
-                    margin: 0 0 0 $ms-0
102
-                    min-width: 27%
103
-                    width: 27%
104
-                    > section
105
-                        > *
106
-                            padding: $ms-0
107
-                            margin: 0 0 $ms-0 0
108
-                        > .post
109
-                            background-color: blue
110
-
111
         nav, footer
98
         nav, footer
112
             &.main
99
             &.main
113
                 background-color: pink
100
                 background-color: pink

+ 17
- 1
vue-theme/src/components/sidebars/sidebar.vue 查看文件

93
 </script>
93
 </script>
94
 
94
 
95
 <style lang="postcss">
95
 <style lang="postcss">
96
+@import '../../sss/variables.sss'
97
+@import '../../sss/theme.sss'
96
 aside.sidebar
98
 aside.sidebar
97
     position: sticky
99
     position: sticky
98
     top: 65px
100
     top: 65px
101
+    background-color: salmon
102
+    margin: 0 0 0 $ms-0
103
+    width: 100%
104
+    > section
105
+        > *
106
+            padding: $ms-0
107
+            margin: 0 0 $ms-0 0
108
+        > .post
109
+            background-color: blue
99
     ul
110
     ul
100
-        list-style: none
111
+        list-style: none      
112
+
113
+@media (min-width: $medium)
114
+    aside.sidebar
115
+        min-width: 27%
116
+        width: 27%
101
 </style>
117
 </style>

+ 6
- 2
vue-theme/src/pages/list.vue 查看文件

1
 <template lang="pug">
1
 <template lang="pug">
2
-.page--list.f-row.between
2
+.page--list.f-col.between
3
     article.f-grow
3
     article.f-grow
4
         header.f-col.center.t-up
4
         header.f-col.center.t-up
5
             .title.f-row
5
             .title.f-row
133
 </script>
133
 </script>
134
 
134
 
135
 <style lang="postcss">
135
 <style lang="postcss">
136
+@import '../sss/variables.sss'
137
+@import '../sss/theme.sss'
136
 .page--list
138
 .page--list
137
     article
139
     article
138
         > header
140
         > header
159
                 list-style: none
161
                 list-style: none
160
                 img
162
                 img
161
                     max-width: 100%
163
                     max-width: 100%
162
-                
164
+@media (min-width: $medium)
165
+    .page--list.f-col
166
+        flex-direction: row
163
 </style>
167
 </style>

+ 5
- 6
vue-theme/src/pages/single.vue 查看文件

1
 <template lang="pug">
1
 <template lang="pug">
2
-.page--single.f-row.between
2
+.page--single.f-col.between
3
     gallery(v-if="activeGalleryIndex >= 0" :activeImageIndex="activeImageIndex" :images="imagesInGallery" @close="closeGallery")
3
     gallery(v-if="activeGalleryIndex >= 0" :activeImageIndex="activeImageIndex" :images="imagesInGallery" @close="closeGallery")
4
 
4
 
5
     article(v-if="!post")
5
     article(v-if="!post")
222
             left: 0px 
222
             left: 0px 
223
             width: 100% 
223
             width: 100% 
224
             height: 100%  */
224
             height: 100%  */
225
-
226
-    @media (--large-viewport)
227
-        .sidebar
228
-            background-color: purple
229
-
225
+        
226
+@media (min-width: $medium)
227
+    .page--single.f-col
228
+        flex-direction: row
230
 </style>
229
 </style>

Loading…
取消
儲存