Two column layout for hamburger

This commit is contained in:
Robin Ward 2015-09-03 15:57:00 -04:00
parent 0818a502f3
commit 035e263356
3 changed files with 31 additions and 16 deletions

View File

@ -1,6 +1,6 @@
{{#menu-panel visible=visible}} {{#menu-panel visible=visible}}
{{#if currentUser.staff}} {{#if currentUser.staff}}
<ul class="menu-links"> {{#menu-links class="columned"}}
<li>{{d-link route="admin" class="admin-link" icon="wrench" label="admin_title"}}</li> <li>{{d-link route="admin" class="admin-link" icon="wrench" label="admin_title"}}</li>
<li> <li>
{{#d-link route="adminFlags" class="flagged-posts-link"}} {{#d-link route="adminFlags" class="flagged-posts-link"}}
@ -24,12 +24,18 @@
<li>{{d-link route="adminSiteSettings" icon="gear" label="admin.site_settings.title"}}</li> <li>{{d-link route="adminSiteSettings" icon="gear" label="admin.site_settings.title"}}</li>
{{plugin-outlet "hamburger-admin"}} {{plugin-outlet "hamburger-admin"}}
</ul> {{/menu-links}}
<hr>
{{/if}} {{/if}}
<ul class="menu-links"> {{#menu-links}}
<li>{{d-link route="discovery.latest" class="latest-topics-link" label="filters.latest.title.zero"}}</li> <li>{{d-link route="discovery.latest" class="latest-topics-link" label="filters.latest.title.zero"}}</li>
{{#if currentUser}}
<li>{{d-link route="discovery.new" class="new-topics-link" label="filters.new.title.zero"}}</li>
<li>{{d-link route="discovery.unread" class="unread-topics-link" label="filters.unread.title.zero"}}</li>
{{/if}}
<li>{{d-link route="discovery.top" class="top-topics-link" label="filters.top.title"}}</li>
{{#if siteSettings.enable_badges}} {{#if siteSettings.enable_badges}}
<li>{{d-link route="badges" class="badge-link" label="badges.title"}}</li> <li>{{d-link route="badges" class="badge-link" label="badges.title"}}</li>
{{/if}} {{/if}}
@ -40,16 +46,12 @@
{{plugin-outlet "site-map-links"}} {{plugin-outlet "site-map-links"}}
<li>{{d-link path=faqUrl class="faq-link" label="faq"}}</li>
<li>{{d-link route="about" class="about-link" label="about.simple_title"}}</li>
{{#if showMobileToggle}} {{#if showMobileToggle}}
<li>{{d-link action="toggleMobileView" class="mobile-toggle-link" label=mobileViewLinkTextKey}}</li> <li>{{d-link action="toggleMobileView" class="mobile-toggle-link" label=mobileViewLinkTextKey}}</li>
{{/if}} {{/if}}
{{plugin-outlet "site-map-links-last"}} {{plugin-outlet "site-map-links-last"}}
</ul> {{/menu-links}}
<hr>
{{#if categories}} {{#if categories}}
<ul class="category-links clearfix"> <ul class="category-links clearfix">
@ -64,12 +66,14 @@
{{/each}} {{/each}}
</ul> </ul>
{{/if}} {{/if}}
<hr> <hr>
<ul class="menu-links"> {{#menu-links omitRule="true"}}
<li>{{d-link route="about" class="about-link" label="about.simple_title"}}</li>
<li>{{d-link path=faqUrl class="faq-link" label="faq"}}</li>
{{#if showKeyboardShortcuts}} {{#if showKeyboardShortcuts}}
<li>{{d-link action="keyboardShortcuts" class="keyboard-shortcuts-link" label="keyboard_shortcuts_help.title"}}</li> <li>{{d-link action="keyboardShortcuts" class="keyboard-shortcuts-link" label="keyboard_shortcuts_help.title"}}</li>
{{/if}} {{/if}}
</ul> {{/menu-links}}
{{/menu-panel}} {{/menu-panel}}

View File

@ -0,0 +1,7 @@
<ul class="menu-links columned">
{{yield}}
<div class="clearfix"></div>
</ul>
{{#unless omitRule}}
<hr>
{{/unless}}

View File

@ -46,6 +46,13 @@
} }
.menu-links.columned {
li {
width: 50%;
float: left;
}
}
.menu-panel { .menu-panel {
ul.menu-links li, ul li.heading { ul.menu-links li, ul li.heading {
a { a {
@ -278,6 +285,3 @@ div.menu-links-header {
margin-right: 0.2em; margin-right: 0.2em;
} }
} }