Changed header to copy old foodsoft style.

This commit is contained in:
benni 2012-11-24 15:23:12 +01:00
parent e1cb866935
commit ecc31641aa
4 changed files with 42 additions and 20 deletions

View file

@ -1,6 +1,6 @@
@import "twitter/bootstrap/bootstrap";
body {
padding-top: 60px;
padding-top: 10px;
}
@import "twitter/bootstrap/responsive";
@ -36,6 +36,25 @@ body {
@import "datepicker";
// Custom styles
@mainRedColor: #ED0606;
.logo {
margin: 10px 0 0 30px;
float: left;
font-size: 35px;
font-weight: bold;
display: block;
color: @mainRedColor;
span {
padding: 2px 4px;
color: #ffffff;
background-color: @mainRedColor;
}
}
section {
padding-bottom: 30px;
margin-bottom: 30px;

View file

@ -4,7 +4,7 @@
%meta(charset="utf-8")
%meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
%meta(name="viewport" content="width=device-width, initial-scale=1.0")
%title= content_for?(:title) ? yield(:title) : "Foodsoft"
%title= ["Foodsoft", yield(:title)].join(" - ")
= csrf_meta_tags
= stylesheet_link_tag "application", :media => "all"
%link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144")

View file

@ -1,15 +1,29 @@
= render layout: 'layouts/header' do
.row-fluid
.logo
<span>food</span>soft
%ul.nav.nav-pills.pull-right
%li.dropdown
%a.dropdown-toggle(data-toggle="dropdown" href="#")
= current_user.nick
%b.caret
%ul.dropdown-menu
%li= link_to "Profil bearbeiten", my_profile_path
%li= link_to "Meine Bestellgruppe", my_ordergroup_path
%li= link_to "Abmelden", logout_path
%li{class: ('disabled' if FoodsoftConfig.config[:homepage].blank?)}
= link_to FoodsoftConfig.config[:name], FoodsoftConfig.config[:homepage]
%li= link_to "Hilfe", 'https://github.com/bennibu/foodsoft/wiki/Doku'
%li= link_to "Feedback", new_feedback_path, title: "Fehler gefunden? Vorschlag? Idee? Kritik?"
.clearfix
.navbar.navbar-fixed-top
.navbar
.navbar-inner
.container-fluid
.container
%a.btn.btn-navbar(data-target=".nav-collapse" data-toggle="collapse")
%span.icon-bar
%span.icon-bar
%span.icon-bar
= link_to 'Foodsoft', root_path(anchor: ''), class: 'brand'
.container.nav-collapse
.nav-collapse.collapse
= render_navigation expand_all: true, renderer: :bootstrap
.container-fluid

View file

@ -5,6 +5,8 @@ SimpleNavigation::Configuration.run do |navigation|
navigation.items do |primary|
primary.dom_class = 'nav'
primary.item :dashboard_nav_item, 'Dashboard', root_path(anchor: '')
primary.item :foodcoop, 'Foodcoop', '#' do |subnav|
subnav.item :members, 'Mitglieder', foodcoop_users_path, id: nil
subnav.item :workgroups, 'Arbeitsgruppen', foodcoop_workgroups_path, id: nil
@ -44,19 +46,6 @@ SimpleNavigation::Configuration.run do |navigation|
subnav.item :ordergroups, 'Bestellgruppen', admin_ordergroups_path, id: nil
subnav.item :workgroups, 'Arbeitsgruppen', admin_workgroups_path, id: nil
end
primary.item :divider, '', '#', class: 'divider'
if FoodsoftConfig[:homepage]
primary.item :homepage, FoodsoftConfig[:name], FoodsoftConfig[:homepage]
end
primary.item :help, 'Hilfe', 'https://github.com/bennibu/foodsoft/wiki/Doku', id: nil
primary.item :feedback, 'Feedback', new_feedback_path, title: "Fehler gefunden? Vorschlag? Idee? Kritik?", id: nil
primary.item :nick, current_user.nick, '#' do |subnav|
subnav.item :edit_profile, 'Profil bearbeiten', my_profile_path, title: 'Profil bearbeiten', id: nil
subnav.item :my_ordergroup, 'Meine Bestellgruppe', my_ordergroup_path, id: nil
subnav.item :logout, 'Abmelden', logout_path, id: nil
end
end
end