mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 11:36:16 +00:00
Change default thumbnail size
Change text color in the upload panel
This commit is contained in:
parent
ad547c4ccf
commit
33f475e828
5 changed files with 7 additions and 16 deletions
|
@ -21,7 +21,6 @@ from yaml import safe_load
|
||||||
|
|
||||||
|
|
||||||
USER_DIR = platformdirs.user_config_dir('onlylegs')
|
USER_DIR = platformdirs.user_config_dir('onlylegs')
|
||||||
Bundle.cache = False
|
|
||||||
|
|
||||||
|
|
||||||
def create_app(test_config=None):
|
def create_app(test_config=None):
|
||||||
|
@ -38,9 +37,9 @@ def create_app(test_config=None):
|
||||||
print("Loaded environment variables")
|
print("Loaded environment variables")
|
||||||
|
|
||||||
# Get config file
|
# Get config file
|
||||||
with open(os.path.join(USER_DIR, 'conf.yml'), encoding='utf-8') as file:
|
with open(os.path.join(USER_DIR, 'conf.yml'), encoding='utf-8', mode='r') as file:
|
||||||
conf = safe_load(file)
|
conf = safe_load(file)
|
||||||
print("Loaded gallery config")
|
print("Loaded config")
|
||||||
|
|
||||||
# App configuration
|
# App configuration
|
||||||
app.config.from_mapping(
|
app.config.from_mapping(
|
||||||
|
@ -58,6 +57,7 @@ def create_app(test_config=None):
|
||||||
app.config.from_mapping(test_config)
|
app.config.from_mapping(test_config)
|
||||||
|
|
||||||
# Load JS assets
|
# Load JS assets
|
||||||
|
# TODO: disable caching for sass files as it makes it hard to work on when it is enabled
|
||||||
assets.register('js_pre', Bundle('js/pre/*.js', output='gen/pre_packed.js'))
|
assets.register('js_pre', Bundle('js/pre/*.js', output='gen/pre_packed.js'))
|
||||||
assets.register('js_post', Bundle('js/post/*.js', output='gen/post_packed.js'))
|
assets.register('js_post', Bundle('js/post/*.js', output='gen/post_packed.js'))
|
||||||
assets.register('styles', Bundle('sass/*.sass', filters='libsass', output='gen/styles.css'))
|
assets.register('styles', Bundle('sass/*.sass', filters='libsass', output='gen/styles.css'))
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
height: 100vh
|
height: 100vh
|
||||||
|
|
||||||
background-color: transparent
|
background-color: transparent
|
||||||
|
color: RGB($fg-white)
|
||||||
|
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
z-index: 68
|
z-index: 68
|
||||||
|
@ -20,9 +21,6 @@
|
||||||
|
|
||||||
font-size: 1.5rem
|
font-size: 1.5rem
|
||||||
font-weight: 700
|
font-weight: 700
|
||||||
|
|
||||||
color: RGB($primary)
|
|
||||||
|
|
||||||
p
|
p
|
||||||
margin: 0
|
margin: 0
|
||||||
padding: 0
|
padding: 0
|
||||||
|
@ -30,8 +28,6 @@
|
||||||
font-size: 1rem
|
font-size: 1rem
|
||||||
font-weight: 500
|
font-weight: 500
|
||||||
|
|
||||||
color: RGB($fg-white)
|
|
||||||
|
|
||||||
form
|
form
|
||||||
margin: 0
|
margin: 0
|
||||||
padding: 0
|
padding: 0
|
||||||
|
|
|
@ -91,12 +91,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="image-fullscreen" onclick="imageFullscreenOff()">
|
<div class="image-fullscreen" onclick="imageFullscreenOff()">
|
||||||
<img
|
<img src="" alt="{{ image.post_alt }}"/>
|
||||||
src=""
|
|
||||||
alt="{{ image.post_alt }}"
|
|
||||||
onload="imgFade(this);"
|
|
||||||
style="opacity:0;"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="image-grid">
|
<div class="image-grid">
|
||||||
|
|
|
@ -136,7 +136,7 @@
|
||||||
<input class="input-block" type="text" placeholder="alt" id="alt"/>
|
<input class="input-block" type="text" placeholder="alt" id="alt"/>
|
||||||
<input class="input-block" type="text" placeholder="description" id="description"/>
|
<input class="input-block" type="text" placeholder="description" id="description"/>
|
||||||
<input class="input-block" type="text" placeholder="tags" id="tags"/>
|
<input class="input-block" type="text" placeholder="tags" id="tags"/>
|
||||||
<button class="btn-block primary" type="submit">Upload</button>
|
<button class="btn-block" type="submit">Upload</button>
|
||||||
</form>
|
</form>
|
||||||
<div class="upload-jobs"></div>
|
<div class="upload-jobs"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -37,7 +37,7 @@ def generate_thumbnail(file_name, resolution, ext=None):
|
||||||
if resolution in ['prev', 'preview']:
|
if resolution in ['prev', 'preview']:
|
||||||
res_x, res_y = (1920, 1080)
|
res_x, res_y = (1920, 1080)
|
||||||
elif resolution in ['thumb', 'thumbnail']:
|
elif resolution in ['thumb', 'thumbnail']:
|
||||||
res_x, res_y = (400, 400)
|
res_x, res_y = (350, 350)
|
||||||
elif resolution in ['icon', 'favicon']:
|
elif resolution in ['icon', 'favicon']:
|
||||||
res_x, res_y = (10, 10)
|
res_x, res_y = (10, 10)
|
||||||
elif len(resolution.split('x')) == 2:
|
elif len(resolution.split('x')) == 2:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue