Added help to menu

This commit is contained in:
Eduard Urbach 2017-07-20 02:54:53 +02:00
parent 983c9f4ed6
commit 43a58b8f46
4 changed files with 42 additions and 41 deletions

View File

@ -30,44 +30,4 @@ component Layout(app *aero.Application, ctx *aero.Context, user *arn.User, openG
Sidebar(user) Sidebar(user)
if user != nil if user != nil
#user(data-id=user.ID) #user(data-id=user.ID)
script(src="/scripts") script(src="/scripts")
component Sidebar(user *arn.User)
.user-image-container
if user != nil
Avatar(user)
else
img.user-image.lazy(data-src="/images/brand/64", alt="Anime Notifier")
SidebarButton("Home", "/", "home")
SidebarButton("Forum", "/forum", "comment")
SidebarButton("Explore", "/explore", "th")
SidebarButton("Soundtracks", "/soundtracks", "headphones")
SidebarButton("Users", "/users", "globe")
if user != nil
if user.Role != ""
SidebarButton("Statistics", "/statistics", "pie-chart")
SidebarButton("Settings", "/settings", "cog")
SidebarButtonNoAJAX("Logout", "/logout", "sign-out")
else
SidebarButton("Login", "/login", "sign-in")
component StatusMessage
#status-message.fade.fade-out
#status-message-text
a.status-message-action.action(href="#", data-trigger="click", data-action="closeStatusMessage", aria-label="Close status message")
RawIcon("close")
component LoadingAnimation
#loading.sk-cube-grid.fade
.sk-cube.hide
.sk-cube
.sk-cube.hide
.sk-cube
.sk-cube.sk-cube-center
.sk-cube
.sk-cube.hide
.sk-cube
.sk-cube.hide

View File

@ -0,0 +1,11 @@
component LoadingAnimation
#loading.sk-cube-grid.fade
.sk-cube.hide
.sk-cube
.sk-cube.hide
.sk-cube
.sk-cube.sk-cube-center
.sk-cube
.sk-cube.hide
.sk-cube
.sk-cube.hide

25
mixins/Sidebar.pixy Normal file
View File

@ -0,0 +1,25 @@
component Sidebar(user *arn.User)
.user-image-container
if user != nil
Avatar(user)
else
img.user-image.lazy(data-src="/images/brand/64", alt="Anime Notifier")
SidebarButton("Home", "/", "home")
SidebarButton("Forum", "/forum", "comment")
SidebarButton("Explore", "/explore", "th")
SidebarButton("Soundtracks", "/soundtracks", "headphones")
SidebarButton("Users", "/users", "globe")
if user != nil
if user.Role != ""
SidebarButton("Statistics", "/statistics", "pie-chart")
SidebarButton("Settings", "/settings", "cog")
SidebarButton("Help", "/thread/I3MMiOtzR", "question")
if user != nil
SidebarButtonNoAJAX("Logout", "/logout", "sign-out")
else
SidebarButton("Login", "/login", "sign-in")

View File

@ -0,0 +1,5 @@
component StatusMessage
#status-message.fade.fade-out
#status-message-text
a.status-message-action.action(href="#", data-trigger="click", data-action="closeStatusMessage", aria-label="Close status message")
RawIcon("close")