Fixed 404 on random user button and changed icons
This commit is contained in:
parent
2e7f34608c
commit
e7c7fba0ad
4 changed files with 12 additions and 12 deletions
|
@ -78,7 +78,10 @@ a { color: var(--primary); }
|
|||
background-color: var(--primary-light2) !important;
|
||||
border: var(--primary) solid 0.1px;
|
||||
}
|
||||
|
||||
.primary_banner {
|
||||
min-height: 20vh;
|
||||
object-fit: cover;
|
||||
}
|
||||
.border {
|
||||
border-color: var(--primary) !important;
|
||||
}
|
||||
|
|
|
@ -473,8 +473,7 @@ def random_post(v):
|
|||
@app.get("/random_user")
|
||||
@auth_required
|
||||
def random_user(v):
|
||||
|
||||
u = g.db.query(User.username).filter(User.song != None).order_by(func.random()).first()
|
||||
u = g.db.query(User.username).order_by(func.random()).first()
|
||||
|
||||
if u: u = u[0]
|
||||
else: abort(404)
|
||||
|
|
|
@ -215,10 +215,10 @@
|
|||
{% block Banner %}
|
||||
{% if '@' not in request.path %}
|
||||
{% if sub %}
|
||||
<img alt="/h/{{sub.name}} banner" role="button" data-bs-toggle="modal" data-bs-target="#expandImageModal" onclick="expandDesktopImage('{{sub.banner_url}}')" loading="lazy" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:25vw">
|
||||
<img alt="/h/{{sub.name}} banner" class="primary_banner" role="button" data-bs-toggle="modal" data-bs-target="#expandImageModal" onclick="expandDesktopImage('{{sub.banner_url}}')" loading="lazy" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:25vw">
|
||||
{% else %}
|
||||
<a href="/">
|
||||
<img alt="site banner" src="/assets/images/{{SITE_NAME}}/banner.webp?v=1046" width="100%">
|
||||
<img alt="site banner" class="primary_banner" src="/assets/images/{{SITE_NAME}}/banner.webp?v=1046" width="100%">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
@ -59,16 +59,16 @@
|
|||
{% endif %}
|
||||
|
||||
{% if not err %}
|
||||
<a class="mobile-nav-icon d-md-none" href="/random_user"><i class="fas fa-music align-middle text-gray-500 black"></i></a>
|
||||
<a class="mobile-nav-icon d-md-none" href="/random_post"><i class="fas fa-random align-middle text-gray-500 black"></i></a>
|
||||
<a class="mobile-nav-icon d-md-none" href="/random_user" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Random User"><i class="fas fa-user-circle align-middle text-gray-500 black"></i></a>
|
||||
<a class="mobile-nav-icon d-md-none" href="/random_post" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Random Post"><i class="fas fa-random align-middle text-gray-500 black"></i></a>
|
||||
{% if v and v.admin_level > 1 %}
|
||||
<a class="mobile-nav-icon d-md-none" href="/admin"><i class="fas fa-crown align-middle text-gray-500 black"></i></a>
|
||||
<a class="mobile-nav-icon d-md-none" href="/admin" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Admin"><i class="fas fa-crown align-middle text-gray-500 black"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if v %}
|
||||
<a class="mobile-nav-icon d-md-none" href="{% if sub %}/h/{{sub.name}}{% endif %}/submit"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
|
||||
<a class="mobile-nav-icon d-md-none" href="{% if sub %}/h/{{sub.name}}{% endif %}/submit" data-bs-toggle="tooltip" data-bs-placement="bottom" title="New Post"><i class="fas fa-edit align-middle text-gray-500 black"></i></a>
|
||||
{% else %}
|
||||
<a class="mobile-nav-icon d-md-none" href="/login"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
|
||||
<a class="mobile-nav-icon d-md-none" href="/login" data-bs-toggle="tooltip" data-bs-placement="bottom" title="New Post"><i class="fas fa-edit align-middle text-gray-500 black"></i></a>
|
||||
{% endif %}
|
||||
<button class="navbar-toggler" role="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive"
|
||||
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
@ -196,8 +196,6 @@
|
|||
|
||||
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="https://github.com/themotte/rDrama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a>
|
||||
|
||||
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="{{config('GUMROAD_LINK')}}"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>
|
||||
|
||||
<a class="nav-item nav-link" href="/contact"><i class="fas fa-file-signature fa-fw mr-3"></i>Contact us</a>
|
||||
|
||||
<li class="nav-item border-top border-bottom mt-2 pt-2">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue