From 43a58b8f46edc36501b7c73d47222c03b3e9f108 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 20 Jul 2017 02:54:53 +0200 Subject: [PATCH] Added help to menu --- layout/layout.pixy | 42 +----------------------------------- mixins/LoadingAnimation.pixy | 11 ++++++++++ mixins/Sidebar.pixy | 25 +++++++++++++++++++++ mixins/StatusMessage.pixy | 5 +++++ 4 files changed, 42 insertions(+), 41 deletions(-) create mode 100644 mixins/LoadingAnimation.pixy create mode 100644 mixins/Sidebar.pixy create mode 100644 mixins/StatusMessage.pixy diff --git a/layout/layout.pixy b/layout/layout.pixy index 96d77b14..21ce0324 100644 --- a/layout/layout.pixy +++ b/layout/layout.pixy @@ -30,44 +30,4 @@ component Layout(app *aero.Application, ctx *aero.Context, user *arn.User, openG Sidebar(user) if user != nil #user(data-id=user.ID) - 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 \ No newline at end of file + script(src="/scripts") \ No newline at end of file diff --git a/mixins/LoadingAnimation.pixy b/mixins/LoadingAnimation.pixy new file mode 100644 index 00000000..2489c239 --- /dev/null +++ b/mixins/LoadingAnimation.pixy @@ -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 \ No newline at end of file diff --git a/mixins/Sidebar.pixy b/mixins/Sidebar.pixy new file mode 100644 index 00000000..b26deaee --- /dev/null +++ b/mixins/Sidebar.pixy @@ -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") \ No newline at end of file diff --git a/mixins/StatusMessage.pixy b/mixins/StatusMessage.pixy new file mode 100644 index 00000000..d5397a27 --- /dev/null +++ b/mixins/StatusMessage.pixy @@ -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") \ No newline at end of file