Wrapped top-bar properly
This commit is contained in:
parent
f0904fff63
commit
03cdb9bfd9
1 changed files with 49 additions and 45 deletions
|
|
@ -1,47 +1,51 @@
|
||||||
nav.top-bar
|
nav.top-bar
|
||||||
.row
|
.grid-container style="flex-grow:1;"
|
||||||
.top-bar-left
|
// https://foundation.zurb.com/forum/posts/53446-top-bar-and-xy-grid
|
||||||
ul.menu
|
.grid-x
|
||||||
li
|
.top-bar-left
|
||||||
img src="/images/logos/debian.svg" width="38" alt="Debian logo"
|
ul.menu
|
||||||
li.menu-text
|
li
|
||||||
a href='/'
|
img src="/images/logos/debian.svg" width="38" alt="Debian logo"
|
||||||
// TODO: Make the logo depend on the virtual host
|
li.menu-text
|
||||||
// TODO: Use proper distribution name
|
a href='/'
|
||||||
' Debian Screenshots >
|
// TODO: Make the logo depend on the virtual host
|
||||||
|
// TODO: Use proper distribution name
|
||||||
|
' Debian Screenshots >
|
||||||
|
|
||||||
/ .top-bar-right
|
/ .top-bar-right
|
||||||
/ ul.menu
|
/ ul.menu
|
||||||
li.menu-text class=('active' if controller_name=='welcome' and action_name=='home')
|
li.menu-text class=('active' if controller_name=='welcome' and action_name=='home')
|
||||||
a href="/" Home
|
a href="/" Home
|
||||||
li.menu-text class=('active' if controller_name=='packages')
|
li.menu-text class=('active' if controller_name=='packages')
|
||||||
a href="/packages" Explore
|
a href="/packages" Explore
|
||||||
//li.has-dropdown
|
//li.has-dropdown
|
||||||
//a href="#" Distributions
|
//a href="#" Distributions
|
||||||
//ul.dropdown
|
//ul.dropdown
|
||||||
//// TODO: Use proper distribution list
|
//// TODO: Use proper distribution list
|
||||||
//li
|
//li
|
||||||
//a href="#" Debian
|
//a href="#" Debian
|
||||||
//li
|
//li
|
||||||
//a href="#" Ubuntu
|
//a href="#" Ubuntu
|
||||||
li.menu-text class=('active' if controller_name=='welcome' and action_name=='about')
|
li.menu-text class=('active' if controller_name=='welcome' and action_name=='about')
|
||||||
a href="/about" About
|
a href="/about" About
|
||||||
// Add link if user has uploaded screenshots
|
// Add link if user has uploaded screenshots
|
||||||
- if @current_users_screenshots and @current_users_screenshots.any?
|
- if @current_users_screenshots and @current_users_screenshots.any?
|
||||||
li.menu-text class=('active' if controller_name=='my' and action_name=='uploads')
|
li.menu-text class=('active' if controller_name=='my' and action_name=='uploads')
|
||||||
= link_to my_uploads_path
|
= link_to my_uploads_path
|
||||||
' My uploads
|
' My uploads
|
||||||
span.badge.secondary
|
span.badge.secondary
|
||||||
= @current_users_screenshots.count
|
= @current_users_screenshots.count
|
||||||
// TODO: Check correct classes in Zurb/Foundation for top bar!
|
// TODO: Check correct classes in Zurb/Foundation for top bar!
|
||||||
- if user_signed_in? and current_user.is_admin?
|
- if user_signed_in? and current_user.is_admin?
|
||||||
li.menu-text
|
li.menu-text
|
||||||
a href='#' Admin
|
a href='#' Admin
|
||||||
/ ul.menu.vertical
|
/ ul.menu.vertical
|
||||||
/ li = link_to 'Moderate', moderate_path
|
/ li = link_to 'Moderate', moderate_path
|
||||||
/ li = link_to 'Logs', logs_path
|
/ li = link_to 'Logs', logs_path
|
||||||
li.menu-text class=('active' if controller_name=='my')
|
.top-bar-right
|
||||||
- if user_signed_in?
|
ul.menu
|
||||||
= link_to "My", my_profile_path
|
li.menu-text class=('active' if controller_name=='my')
|
||||||
- else
|
- if user_signed_in?
|
||||||
= link_to 'Login', new_user_session_path
|
= link_to "My", my_profile_path
|
||||||
|
- else
|
||||||
|
= link_to 'Login', new_user_session_path
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue