Procházet zdrojové kódy

sidebar option for type articles and releases

tags/1.0.0^2^2
Alej před 3 roky
rodič
revize
44c5a2de11
1 změnil soubory, kde provedl 36 přidání a 9 odebrání
  1. 36
    9
      vue-theme/src/components/sidebars/sidebar.vue

+ 36
- 9
vue-theme/src/components/sidebars/sidebar.vue Zobrazit soubor

@@ -8,8 +8,22 @@ aside.sidebar
8 8
                 li(v-for="option in sortOptions")
9 9
                     router-link(:to="`/${type}/sorted/${sortTypes[option]}`")
10 10
                         p {{ option }}
11
+                
12
+                li 
13
+                    //- ?type=articles //
14
+                    router-link(v-if="type === 'post' && layout !== 'single'" :to="`/${type}/?type=${sortTypes[option]}`")
15
+                        p articles2
16
+                li 
17
+                    //- ?type=articles //
18
+                    router-link(v-if="type === 'post' && layout !== 'single'" :to="`/${type}/?type=articles`")
19
+                        p articles
20
+                li 
21
+                    //- ?type=releases //
22
+                    router-link(v-if="type === 'post' && layout !== 'single'" :to="`/post/?type=releases`")
23
+                        //- p {{ option }}
24
+                        p releases
11 25
                 li
12
-                    router-link(:to="`/${type}`")
26
+                    router-link(:to="`/${type}/sorted/by-date`")
13 27
                         p by all
14 28
                 li
15 29
                     router-link(v-if="shouldShowDateSort.includes(type) && layout !== 'single'" :to="`/${type}/sorted/by-current-and-upcoming`")
@@ -85,10 +99,13 @@ export default {
85 99
     data() {
86 100
         return {
87 101
             sortTypes: {
88
-                alphabetized: `${sortTypes.alpha}`,       //:0
89
-                'by material': `${sortTypes.material}`,   //:1
90
-                'by artist': `${sortTypes.artist}`,       //:2
91
-                'by episode': `${sortTypes.episode}`,     //:3
102
+                alphabetized: `${sortTypes.alpha}`,     //:0
103
+                'by material': `${sortTypes.material}`, //:1
104
+                'by artist': `${sortTypes.artist}`,     //:2
105
+                'by episode': `${sortTypes.episode}`,   //:3
106
+                'by type': `${sortTypes.subtype}`,      //:4
107
+                'by articles': `?type=articles`,        //:5
108
+                subtype: 'by-type',
92 109
             },
93 110
             charaSets: [
94 111
                 '0 a b', 'c d e', 'f g h',
@@ -102,7 +119,7 @@ export default {
102 119
                 'publication', 'technique', 'post'
103 120
             ],
104 121
             shouldShowMaterialSort: [
105
-                'artist', 
122
+                'artist', 'exhibition',
106 123
                 'short', 'guide', 'object',
107 124
                 'technique',
108 125
             ],
@@ -114,7 +131,7 @@ export default {
114 131
             ],
115 132
             shouldShowTypeSort: [
116 133
                 'short', 'guide', 'object',
117
-                'publication', 'technique', 'post'
134
+                'publication', 'technique', 'post', 'event'
118 135
             ]
119 136
         }
120 137
     },
@@ -130,9 +147,17 @@ export default {
130 147
                         `by ${this.type} type`,
131 148
                     ]
132 149
                     break
150
+                case 'exhibition':
151
+                    opts = [
152
+                        Object.keys(this.sortTypes)[1],
153
+                    ]
154
+                    break
133 155
                 case 'post':
134 156
                     opts = [
157
+                        Object.keys(this.sortTypes)[4],
135 158
                         `by ${this.type} type`,
159
+                        // Object.keys(this.sortTypes)[5],
160
+                        // `by articles`
136 161
                     ]
137 162
                     break
138 163
                 case 'short':
@@ -176,7 +201,7 @@ export default {
176 201
 @import '../../sss/theme.sss'
177 202
 aside.sidebar
178 203
     /* need to solve for mobile as the sticky creates scroll issues */
179
-    /* position: sticky */
204
+    position: sticky
180 205
     top: 40px
181 206
     width: 100%
182 207
     p, h3
@@ -196,9 +221,11 @@ aside.sidebar
196 221
         flex-direction: column
197 222
         flex-wrap: wrap 
198 223
         li
199
-            padding: 0 0 $ms-0 0
224
+            /* padding: 0 0 $ms-0 0 */
200 225
             img
201 226
                 display: none
227
+                padding: $ms-0 0 $ms--4 0
228
+
202 229
     .shadow
203 230
         background-color: white
204 231
 

Načítá se…
Zrušit
Uložit