Added visibility toggle to stash tile. Collapsed stash page directory structure.
This commit is contained in:
24
pages/stashes/scenes/+route.js
Normal file
24
pages/stashes/scenes/+route.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { match } from 'path-to-regexp';
|
||||
// import { resolveRoute } from 'vike/routing'; // eslint-disable-line import/extensions
|
||||
|
||||
const path = '/stash/:username/:stashSlug/:domain?/:scope?/:page?';
|
||||
const urlMatch = match(path, { decode: decodeURIComponent });
|
||||
|
||||
export default (pageContext) => {
|
||||
const matched = urlMatch(pageContext.urlPathname);
|
||||
|
||||
if (matched) {
|
||||
return {
|
||||
routeParams: {
|
||||
username: matched.params.username,
|
||||
stashSlug: matched.params.stashSlug,
|
||||
domain: matched.params.domain || 'scenes',
|
||||
scope: matched.params.scope || 'stashed',
|
||||
page: matched.params.page || '1',
|
||||
path,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
Reference in New Issue
Block a user