mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Add profile picture to nav bar
This commit is contained in:
parent
2673026880
commit
4982914aa8
2 changed files with 25 additions and 3 deletions
|
@ -56,11 +56,22 @@
|
||||||
|
|
||||||
> i
|
> i
|
||||||
padding: 0.5rem
|
padding: 0.5rem
|
||||||
|
|
||||||
font-size: 1.3rem
|
font-size: 1.3rem
|
||||||
border-radius: $rad-inner
|
border-radius: $rad-inner
|
||||||
color: RGB($fg-white)
|
color: RGB($fg-white)
|
||||||
|
|
||||||
|
> .nav-pfp
|
||||||
|
padding: 0.4rem
|
||||||
|
width: 2.3rem
|
||||||
|
height: 2.3rem
|
||||||
|
border-radius: $rad-inner
|
||||||
|
|
||||||
|
img
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
|
object-fit: cover
|
||||||
|
border-radius: $rad-inner
|
||||||
|
|
||||||
.tool-tip
|
.tool-tip
|
||||||
padding: 0.4rem 0.7rem
|
padding: 0.4rem 0.7rem
|
||||||
|
|
||||||
|
@ -96,7 +107,7 @@
|
||||||
color: RGB($bg-100)
|
color: RGB($bg-100)
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
> i
|
> i, .nav-pfp
|
||||||
background: RGBA($fg-white, 0.1)
|
background: RGBA($fg-white, 0.1)
|
||||||
|
|
||||||
span
|
span
|
||||||
|
|
|
@ -88,7 +88,18 @@
|
||||||
|
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
<a href="{{ url_for('profile.profile') }}" class="navigation-item {% block nav_profile %}{% endblock %}">
|
<a href="{{ url_for('profile.profile') }}" class="navigation-item {% block nav_profile %}{% endblock %}">
|
||||||
|
{% if current_user.picture %}
|
||||||
|
<span class="nav-pfp">
|
||||||
|
<img
|
||||||
|
src="{{ url_for('api.media', path='pfp/' + current_user.picture) }}?r=icon"
|
||||||
|
alt="Profile picture"
|
||||||
|
onload="imgFade(this)"
|
||||||
|
style="opacity:0;"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
{% else %}
|
||||||
<i class="ph-fill ph-folder-simple-user"></i>
|
<i class="ph-fill ph-folder-simple-user"></i>
|
||||||
|
{% endif %}
|
||||||
<span class="tool-tip">Profile<i class="ph-fill ph-caret-left"></i></span>
|
<span class="tool-tip">Profile<i class="ph-fill ph-caret-left"></i></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue