Navigation

This commit is contained in:
2017-03-22 22:57:01 +01:00
parent 2e31528deb
commit 20cd9aeeaf
12 changed files with 73 additions and 30 deletions
+2
View File
@@ -20,6 +20,8 @@ gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'rails_bootstrap_navbar'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
+8 -1
View File
@@ -42,6 +42,8 @@ GEM
execjs
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-navbar (2.4.0)
gem_config (~> 0.3)
bootstrap-sass (3.3.6)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
@@ -75,6 +77,7 @@ GEM
execjs (2.7.0)
font-awesome-rails (4.6.3.0)
railties (>= 3.2, < 5.1)
gem_config (0.3.1)
geocoder (1.3.7)
globalid (0.3.6)
activesupport (>= 4.1.0)
@@ -183,6 +186,9 @@ GEM
remotipart (~> 1.0)
safe_yaml (~> 1.0)
sass-rails (>= 4.0, < 6)
rails_bootstrap_navbar (2.0.1)
bootstrap-navbar (~> 2.0)
rails (>= 3.0.0)
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (4.2.6)
@@ -284,6 +290,7 @@ DEPENDENCIES
rails-i18n
rails_12factor
rails_admin
rails_bootstrap_navbar
rspec-rails (~> 3.0)
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
@@ -295,4 +302,4 @@ DEPENDENCIES
web-console (~> 2.0)
BUNDLED WITH
1.10.2
1.14.6
+17 -4
View File
@@ -15,23 +15,36 @@
*/
$brand-success: #66903F
$font-size-base: 16px
$font-size-base: 14px
$font-size-h3: $font-size-base
$navbar-default-bg: #FFF
$navbar-default-border: none
$navbar-padding-horizontal: none
$navbar-default-link-color: #66903F
$navbar-default-link-active-bg: #FFF
@import "bootstrap-sprockets"
@import "bootstrap"
@import "typeaheadjs"
body
.container
> .container
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)
padding-top: 20px
header
h1
font-size: 20px
margin-top: 35px
ul#topnav
font-size: 1.5em
li.active
border-bottom: 1px solid #66903F
.lead
font-weight: normal
.pagelogo
margin-top: 22px
#new_supporter
label.required
+1
View File
@@ -38,5 +38,6 @@ html lang="#{I18n.locale}"
/ = console if Rails.env.development?
.container
= render 'shared/header'
= render 'shared/topnavigation'
= render 'shared/flashes'
= yield
+1 -1
View File
@@ -4,7 +4,7 @@ header
= image_tag('ch420_logo.png', class:'img-responsive pagelogo', alt: t('.logo'))
.col-md-8.col-xs-8
h1
= title t('.title_html')
= t('.title_html')
.col-xs-12.col-md-3
nav.pull-right
h2.sr-only =t('.lang')
+6
View File
@@ -0,0 +1,6 @@
= navbar do
= navbar_header
= navbar_collapse do
= navbar_group id: 'topnav' do
= navbar_item "Home", "/#{I18n.locale}"
= navbar_item t('.donation'), spenden_path
+2 -1
View File
@@ -1,6 +1,7 @@
- title(t('shared.header.title_html'))
.row
.col-xs-12.col-md-7
h2.sr-only =t('.form')
h2.sr-only = t('.form')
= simple_form_for @supporter do |f|
= f.input :first_name, placeholder: t('.placeholders.first_name')
= f.input :last_name, placeholder: t('.placeholders.last_name')
@@ -0,0 +1,4 @@
BootstrapNavbar.configure do |config|
config.bootstrap_version = '3.3.6'
config.root_paths = ['/', '/de', '/fr', '/it'] # default: ['/']
end
+10 -9
View File
@@ -1,4 +1,14 @@
de:
shared:
header:
logo: Logo der Initiative
title_html: Ja, ich will <strong class="text-success">Cannabis</strong> in der Schweiz <strong class="text-success">legalisieren</strong>
topnavigation:
donation: Spenden
counter:
supporters: "Unterstützer:"
amount_of_supporters: Zurzeit haben wir %{amount} Unterstützer.
input_error: Deine Eingaben konnte nicht gespeichert werden. Überprüfe deine Eingaben.
welcome_email:
@@ -38,15 +48,6 @@ de:
pages:
thanks:
title: Besten Dank für deine Unterstützung!
shared:
header:
logo: Logo der Initiative
title_html: Ja, ich will <strong class="text-success">Cannabis</strong> in der Schweiz <strong class="text-success">legalisieren</strong>
counter:
supporters: "Unterstützer:"
amount_of_supporters: Zurzeit haben wir %{amount} Unterstützer.
mongoid:
attributes:
+10 -7
View File
@@ -1,6 +1,16 @@
fr:
input_error: Vos entrées ne peuvent pas être enregistrées. Vérifiez les entrées.
shared:
counter:
supporters: "Militant:"
amount_of_supporters: Nous avons actuellement %{amount} supporters.
header:
logo: Logo de l'initiative
title_html: Oui, je veux <strong class="text-success">légaliser le cannabis</strong> en Suisse.
topnavigation:
donation: Donation
welcome_email:
subject: Merci beaucoup pour ton soutien!
@@ -20,8 +30,6 @@ fr:
form:
form: Formulaire
lang: Langue
logo: Logo de l'initiative
title_html: Oui, je veux <strong class="text-success">légaliser le cannabis</strong> en Suisse.
submit: Confirmer mon soutien
terms_and_conditions: En soumettant vos données, vous acceptez les conditions d'utilisation.
placeholders:
@@ -39,11 +47,6 @@ fr:
thanks:
title: Merci beaucoup pour ton soutien!
shared:
counter:
supporters: "Militant:"
amount_of_supporters: Nous avons actuellement %{amount} supporters.
mongoid:
attributes:
supporter:
+11 -6
View File
@@ -1,6 +1,17 @@
it:
input_error: I dati immessi non potevano essere salvati. Verificare i dati immessi.
shared:
header:
logo: Logo dell'iniziativa
title_html: Si, voglio <strong class="text-success">legalizzare</strong> la <strong class="text-success">cannabis in Svizzera</strong>
topnavigation:
donation: Donazione
counter:
supporters: "Sostenitore:"
amount_of_supporters: Al momento abbiamo %{amount} sostenitori.
welcome_email:
subject: Grazie mille per il tuo sostegno!
@@ -21,7 +32,6 @@ it:
form: Modulo
lang: Lingua
logo: Logo dell'iniziativa
title_html: Si, voglio <strong class="text-success">legalizzare</strong> la <strong class="text-success">cannabis in Svizzera</strong>
submit: Garantire il sostengo
terms_and_conditions: "Con l'invio dei tuoi dati, accetti le condizioni d'utilizzo."
placeholders:
@@ -38,11 +48,6 @@ it:
pages:
thanks:
title: Grazie mille per il tuo sostegno!
shared:
counter:
supporters: "Sostenitore:"
amount_of_supporters: Al momento abbiamo %{amount} sostenitori.
mongoid:
attributes:
+1 -1
View File
@@ -1,5 +1,5 @@
Rails.application.routes.draw do
root 'supporters#new'
root to: redirect("/#{I18n.default_locale}")
namespace :admin do
get '/map', to: 'pages#map', as: :map