diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less index e0b236a5..3f956cd1 100644 --- a/app/assets/stylesheets/bootstrap_and_overrides.css.less +++ b/app/assets/stylesheets/bootstrap_and_overrides.css.less @@ -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; diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 48e95dc8..ee0d989c 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -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") diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index f718139a..3cbe62a8 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,15 +1,29 @@ = render layout: 'layouts/header' do - .row-fluid + .logo + foodsoft + %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 diff --git a/config/navigation.rb b/config/navigation.rb index d4016dd2..3eff3bc2 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -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