diff options
Diffstat (limited to 'src/url-spec.js')
-rw-r--r-- | src/url-spec.js | 146 |
1 files changed, 84 insertions, 62 deletions
diff --git a/src/url-spec.js b/src/url-spec.js index 22b3bc8..ea5337a 100644 --- a/src/url-spec.js +++ b/src/url-spec.js @@ -1,92 +1,114 @@ -import {withEntries} from './util/sugar.js'; +import {withEntries} from '#sugar'; const urlSpec = { - data: { - prefix: 'data/', + data: { + prefix: 'data/', - paths: { - root: '', - path: '<>', + paths: { + root: '', + path: '<>', - album: 'album/<>', - artist: 'artist/<>', - track: 'track/<>' - } + album: 'album/<>', + artist: 'artist/<>', + track: 'track/<>', }, + }, - localized: { - // TODO: Implement this. - // prefix: '_languageCode', + localized: { + // TODO: Implement this. + // prefix: '_languageCode', - paths: { - root: '', - path: '<>', + paths: { + root: '', + path: '<>', + page: '<>/', - home: '', + home: '', - album: 'album/<>/', - albumCommentary: 'commentary/album/<>/', + album: 'album/<>/', + albumCommentary: 'commentary/album/<>/', + albumGallery: 'album/<>/gallery/', - artist: 'artist/<>/', - artistGallery: 'artist/<>/gallery/', + artist: 'artist/<>/', + artistGallery: 'artist/<>/gallery/', - commentaryIndex: 'commentary/', + commentaryIndex: 'commentary/', - flashIndex: 'flash/', - flash: 'flash/<>/', + flashIndex: 'flash/', - groupInfo: 'group/<>/', - groupGallery: 'group/<>/gallery/', + flash: 'flash/<>/', - listingIndex: 'list/', - listing: 'list/<>/', + flashActGallery: 'flash-act/<>/', - newsIndex: 'news/', - newsEntry: 'news/<>/', + groupInfo: 'group/<>/', + groupGallery: 'group/<>/gallery/', - staticPage: '<>/', - tag: 'tag/<>/', - track: 'track/<>/' - } + listingIndex: 'list/', + + listing: 'list/<>/', + + newsIndex: 'news/', + + newsEntry: 'news/<>/', + + staticPage: '<>/', + + tag: 'tag/<>/', + + track: 'track/<>/', + }, + }, + + shared: { + paths: { + root: '', + path: '<>', + + utilityRoot: 'util', + staticRoot: 'static', + + utilityFile: 'util/<>', + staticFile: 'static/<>?<>', + + staticIcon: 'static/icons.svg#icon-<>', }, + }, + + media: { + prefix: 'media/', - shared: { - paths: { - root: '', - path: '<>', + paths: { + root: '', + path: '<>', - utilityRoot: 'util', - staticRoot: 'static', + albumAdditionalFile: 'album-additional/<>/<>', + albumBanner: 'album-art/<>/banner.<>', + albumCover: 'album-art/<>/cover.<>', + albumWallpaper: 'album-art/<>/bg.<>', - utilityFile: 'util/<>', - staticFile: 'static/<>' - } + artistAvatar: 'artist-avatar/<>.<>', + + flashArt: 'flash-art/<>.<>', + + trackCover: 'album-art/<>/<>.<>', }, + }, - media: { - prefix: 'media/', - - paths: { - root: '', - path: '<>', - - albumCover: 'album-art/<>/cover.jpg', - albumWallpaper: 'album-art/<>/bg.jpg', - albumBanner: 'album-art/<>/banner.jpg', - trackCover: 'album-art/<>/<>.jpg', - artistAvatar: 'artist-avatar/<>.jpg', - flashArt: 'flash-art/<>.jpg' - } - } + thumb: { + prefix: 'thumb/', + + paths: { + root: '', + path: '<>', + }, + }, }; // This gets automatically switched in place when working from a baseDirectory, // so it should never be referenced manually. urlSpec.localizedWithBaseDirectory = { - paths: withEntries( - urlSpec.localized.paths, - entries => entries.map(([key, path]) => [key, '<>/' + path]) - ) + paths: withEntries(urlSpec.localized.paths, (entries) => + entries.map(([key, path]) => [key, '<>/' + path])), }; export default urlSpec; |