Bigly UI improvements (#290)

* fuck u bootstrap

* cleanup

* Improve CSS

* Vote and reply animations
remotes/1693045480750635534/spooky-22
Nekobit 2022-05-29 00:28:36 -04:00 committed by GitHub
parent b038ceaea6
commit c081c2bec2
3 changed files with 11 additions and 14 deletions

View File

@ -99,13 +99,8 @@ def before_request():
if not app.config['SETTINGS']['Bots'] and request.headers.get("Authorization"): abort(503)
g.db = db_session()
if '; wv) ' in ua: g.webview = True
else: g.webview = False
if 'iphone' in ua or 'ipad' in ua or 'ipod' in ua or 'mac os' in ua or ' firefox/' in ua: g.inferior_browser = True
else: g.inferior_browser = False
g.webview = '; wv) ' in ua
g.inferior_browser = 'iphone' in ua or 'ipad' in ua or 'ipod' in ua or 'mac os' in ua or ' firefox/' in ua
@app.teardown_appcontext
def teardown_request(error):
@ -125,4 +120,4 @@ if app.config["SERVER_NAME"] == 'localhost':
elif "load_chat" in argv:
from files.routes.chat import *
else:
from files.routes import *
from files.routes import *

View File

@ -1,5 +1,5 @@
<nav class="shadow shadow-md fixed-top">
<nav class=" shadow-md fixed-top">
<style>
body {padding-top: 85.88px !important}
@media (max-width: 767.98px) {
@ -44,9 +44,11 @@
}
{% endif %}
</style>
<a href="/" class="flex-grow-1">
<div class="flex-grow-1">
<a href="/">
<img class="ml-1" id="logo" alt="logo" src="/assets/images/{{SITE_NAME}}/logo.webp?v=1013" width=70>
</a>
</div>
{% endif %}
<div class="flex-grow-1 d-fl d-none d-md-block {% if not v %}pad{% endif %}">
@ -158,7 +160,7 @@
</div>
</div>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-lg-left border-0 shadow fade px-0">
<div class="dropdown-menu dropdown-menu-right dropdown-menu-lg-left shadow fade px-0">
<div class="px-2">
<a class="dropdown-item" href="{{v.url}}"><i class="fas fa-user-circle fa-fw mr-3"></i>My
profile</a>

View File

@ -83,7 +83,7 @@
{% endif %}
{{t | capitalize}}
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px);">
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px;">
{% if t != "hour" %}<a class="dropdown-item" href="?sort={{sort}}&t=hour&ccmode={{ccmode}}"><i class="fas fa-clock mr-2 "></i>Hour</a>{% endif %}
{% if t != "day" %}<a class="dropdown-item" href="?sort={{sort}}&t=day&ccmode={{ccmode}}"><i class="fas fa-calendar-day mr-2 "></i>Day</a>{% endif %}
{% if t != "week" %}<a class="dropdown-item" href="?sort={{sort}}&t=week&ccmode={{ccmode}}"><i class="fas fa-calendar-week mr-2 "></i>Week</a>{% endif %}
@ -105,7 +105,7 @@
{% if sort=="comments" %}<i class="fas fa-comments mr-2 "></i>{% endif %}
{{sort | capitalize}}
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton2" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px);">
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton2" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px;">
{% if sort != "hot" %}<a class="dropdown-item" href="?sort=hot&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-fire mr-2 "></i>Hot</a>{% endif %}
{% if sort != "bump" %}<a class="dropdown-item" href="?sort=bump&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-arrow-up mr-2 "></i>Bump</a>{% endif %}
{% if sort != "top" %}<a class="dropdown-item" href="?sort=top&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-arrow-alt-circle-up mr-2 "></i>Top</a>{% endif %}
@ -236,4 +236,4 @@
</style>
{% endif %}
{% endblock %}
{% endblock %}