Selaa lähdekoodia

:art: responsive layout tweaks for list pages

tags/0.9.0
J 4 vuotta sitten
vanhempi
commit
4bd7c06a77
2 muutettua tiedostoa jossa 44 lisäystä ja 41 poistoa
  1. 7
    6
      vue-theme/src/components/sidebars/sidebar.vue
  2. 37
    35
      vue-theme/src/pages/list.vue

+ 7
- 6
vue-theme/src/components/sidebars/sidebar.vue Näytä tiedosto

138
 @import '../../sss/variables.sss'
138
 @import '../../sss/variables.sss'
139
 @import '../../sss/theme.sss'
139
 @import '../../sss/theme.sss'
140
 aside.sidebar
140
 aside.sidebar
141
-    p, h3
142
-        margin: 0
143
     position: sticky
141
     position: sticky
144
-    /* top: 65px */
145
-    top: $ms-7
146
-    /* background-color: salmon */
147
-    /* margin: 0 0 0 $ms-0 */
142
+    top: 40px
148
     width: 100%
143
     width: 100%
144
+    p, h3
145
+        margin: 0
149
     > section
146
     > section
150
         > *
147
         > *
151
             padding: $ms-0
148
             padding: $ms-0
154
             /* background-color: blue */
151
             /* background-color: blue */
155
     ul
152
     ul
156
         list-style: none  
153
         list-style: none  
154
+        display: flex
157
         li
155
         li
156
+            padding: 0 $ms-0 0 0
158
             img
157
             img
159
                 width: 100%
158
                 width: 100%
160
     .shadow
159
     .shadow
165
     aside.sidebar
164
     aside.sidebar
166
         min-width: 25%
165
         min-width: 25%
167
         width: 25%
166
         width: 25%
167
+        ul
168
+            flex-direction: column
168
 </style>
169
 </style>

+ 37
- 35
vue-theme/src/pages/list.vue Näytä tiedosto

207
 // prettier-ignore
207
 // prettier-ignore
208
 @import '../sss/variables.sss'
208
 @import '../sss/variables.sss'
209
 @import '../sss/theme.sss'
209
 @import '../sss/theme.sss'
210
-.page--list article
211
-    min-width: 375px
212
-    > header
213
-        padding: 1em
214
-        > h1
215
-            margin: 0
216
-        > .content
217
-            padding: 0
218
-            width: 100%
219
-    > footer
220
-        padding: $ms-0
221
-
222
-    /* posts not grid list */
223
-    .posts
224
-        list-style: none
225
-        grid-gap: $ms--2
226
-        .post
227
-            width: 100%
228
-            &.inbetween
229
-                grid-column: span 3
230
-                background: white
231
-                padding: 0.3em 0
232
-                font-size: 1.3em
233
-                > p
234
-                    margin: 0
235
-
236
-    /* posts in grid list */
237
-    .posts.is-grid
238
-        width: 100%
239
-        display: grid
240
-        grid-template-columns: repeat(2, 1fr)
241
-        align-items: start
242
-        /* This is important for how the grid lines up to the page */
243
-        justify-content: right 
244
-        .post img
210
+.page--list 
211
+    flex-direction: column-reverse
212
+    article
213
+        > header
214
+            padding: 1em
215
+            > h1
216
+                margin: 0
217
+            > .content
218
+                padding: 0
219
+                width: 100%
220
+        > footer
221
+            padding: $ms-0
222
+
223
+        /* posts not grid list */
224
+        .posts
225
+            list-style: none
226
+            grid-gap: $ms--2
227
+            .post
228
+                width: 100%
229
+                &.inbetween
230
+                    grid-column: span 3
231
+                    background: white
232
+                    padding: 0.3em 0
233
+                    font-size: 1.3em
234
+                    > p
235
+                        margin: 0
236
+
237
+        /* posts in grid list */
238
+        .posts.is-grid
245
             width: 100%
239
             width: 100%
240
+            min-width: 185px
241
+            display: grid
242
+            grid-template-columns: repeat(2, 1fr)
243
+            align-items: start
244
+            /* This is important for how the grid lines up to the page */
245
+            justify-content: right 
246
+            .post img
247
+                width: 100%
246
 
248
 
247
 @media (min-width: $medium)
249
 @media (min-width: $medium)
248
     .page--list
250
     .page--list

Loading…
Peruuta
Tallenna