Refactured navigation

This commit is contained in:
2017-11-10 12:18:05 +01:00
parent e9a73ea5cb
commit 93a77e12a4
12 changed files with 135 additions and 41 deletions
+7
View File
@@ -20,6 +20,7 @@
@import "footnotes"
@import "statements"
@import "donations"
@import "nav"
.alert-alert
@extend .alert-danger
@@ -58,6 +59,12 @@ body
.container
padding-left: 0px
header > .row
margin-bottom: 12px
main > h1
margin-top: 0px
ul#topnav
font-size: 1.2em
+25
View File
@@ -0,0 +1,25 @@
@import "variables"
nav#mainnav
marign-top: 12px
font-size: 16pt
a
color: $brand-success
a.selected
font-weight: bold
ul
list-style: none
li
padding-bottom: 6px
ul
padding-left: 20px
padding-top: 12px
li
font-size: 12pt
+5 -2
View File
@@ -65,8 +65,11 @@ html lang="#{I18n.locale}"
.container.content
= render 'shared/flashes'
= render 'shared/header'
= render 'shared/topnavigation'
= yield
.row
.col-xs-12.col-sm-3
nav#mainnav = render_navigation
.col-xs-12.col-sm-9
main= yield
hr
footer.row
.col-xs-12.col-sm-6
-19
View File
@@ -1,19 +0,0 @@
= navbar do
= navbar_header
= navbar_collapse do
= navbar_group id: 'topnav' do
= navbar_item "Home", "/#{I18n.locale}"
= navbar_dropdown t('.initiative') do
= navbar_item t('.initiative_text'), initiative_text_path
= navbar_item t('.arguments'), arguments_path
= navbar_item t('.faq'), faq_path
= navbar_item t('.numbers'), numbers_path
= navbar_item t('.collection_concept'), collection_concept_path
= navbar_item t('.statements'), statements_path
= navbar_item t('donation'), donation_path
= navbar_item 'Blog', 'http://blog.cannabis-initiative.ch'
= navbar_item t('.sign_in'), new_supporter_session_path unless supporter_signed_in?
= navbar_item t('.sign_out'), destroy_supporter_session_path, nil, 'data-method' => :delete if supporter_signed_in?
- if supporter_signed_in? && current_supporter.admin?
= navbar_dropdown t('admin.title') do
= navbar_item t('admin.publicities.index.title'), admin_publicities_path
@@ -21,7 +21,6 @@
= f.input :language, as: :radio_buttons, collection: t('languages').map{ |x| [x.first, raw(x.last)]}, label_method: :last, value_method: :first
.form-actions
= f.button :submit, t("devise.registrations.edit.update"), class: 'btn btn-primary'
p = link_to t("devise.shared.links.back"), :back
hr
p = link_to t("devise.registrations.edit.cancel_my_account"), registration_path(resource_name), data: { confirm: t("devise.registrations.edit.are_you_sure") }, method: :delete, class: 'btn btn-danger btn-sm pull-right'