Updated sidebar interface

This commit is contained in:
Eduard Urbach 2018-02-28 12:12:58 +01:00
parent b77229595e
commit 84783c871c
3 changed files with 30 additions and 1 deletions

View File

@ -6,6 +6,13 @@ component Sidebar(user *arn.User)
Avatar(user)
else
img.user-image.lazy(src=utils.EmptyImage(), data-src="/images/brand/64.png", data-webp="true", alt="Anime Notifier")
if user != nil
a.badge.left-badge.ajax(href="/settings")
RawIcon("cog")
a.badge.right-badge.ajax(href="/notifications")
RawIcon("bell")
//- Sidebar buttons
if user != nil
@ -22,7 +29,7 @@ component Sidebar(user *arn.User)
if user != nil
SidebarButton("Shop", "/shop", "shopping-cart")
SidebarButton("Settings", "/settings", "cog")
//- SidebarButton("Settings", "/settings", "cog")
//- Disabled:
//- SidebarButton("Dash", "/dashboard", "tachometer")

View File

@ -21,6 +21,7 @@ sidebar-spacing-y = 0.7rem
.user-image-container
horizontal
position relative
justify-content center
margin 0.8rem 0
flex-shrink 0
@ -64,3 +65,23 @@ sidebar-spacing-y = 0.7rem
.icon
font-size 1rem
margin-right 0.75rem
.badge
position absolute
top 50%
background reverse-light-color
border-radius 50%
transform translateY(-50%)
padding 0.5rem
color text-color
:active
transform translateY(-50%) translateY(3px)
.left-badge
left 12%
.right-badge
right 12%

View File

@ -13,6 +13,7 @@
img
width 64px
height 64px
object-fit cover
.notification-info
vertical