autoindex/conf.py

32 lines
878 B
Python
Raw Permalink Normal View History

2019-03-08 15:35:21 +00:00
BASE_HOSTS = [
'drop.bakatrouble.pw',
'drop.bakatrouble.me',
2022-12-14 12:09:11 +00:00
'drop.home.bakatrouble.me',
2022-12-14 17:20:49 +00:00
'drop.htpc.lan',
2019-03-08 15:35:21 +00:00
'127.0.0.1.xip.io:8080',
'localhost:8080',
]
SORT_KEYS = {
'name': lambda item: (not item.is_dir, item.name.lower()),
'-name': lambda item: (item.is_dir, item.name.lower()),
'size': lambda item: (not item.is_dir, item.size),
'-size': lambda item: (item.is_dir, item.size),
'created': lambda item: (not item.is_dir, item.created),
'-created': lambda item: (item.is_dir, item.created),
}
ICONS = {
'sort_asc': 'icon-up-dir',
'sort_desc': 'icon-down-dir',
'types': {
'parent': 'icon-level-up',
'dir': 'icon-folder',
'file': 'icon-doc',
'text': 'icon-doc-text',
'image': 'icon-picture-outline',
'music': 'icon-music-outline',
'video': 'icon-video',
},
}