diff --git a/app/views/home/_start_nav.haml b/app/views/home/_start_nav.haml
index bf516eaa..957a5556 100644
--- a/app/views/home/_start_nav.haml
+++ b/app/views/home/_start_nav.haml
@@ -1,5 +1,5 @@
-%h2 Direkt zu ...
-%ul
+%h3 Direkt zu ...
+%ul.list
%li
Foodcoop
%ul
diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml
index e4622142..3132008a 100644
--- a/app/views/home/index.html.haml
+++ b/app/views/home/index.html.haml
@@ -1,31 +1,36 @@
-%h1 Startseite
+- title "Startseite"
-#start_nav
- = render :partial => 'start_nav'
+- content_for :sidebar do
+ .block
+ = render :partial => 'start_nav'
-.right_column{:style => "width:70%"}
- - unless @unaccepted_tasks.empty? && @next_tasks.empty? && @unassigned_tasks_number == 0
- .box_title
- %h2 Aufgaben
- .column_content
- -unless @next_tasks.empty?
- %div{:style => "float:left, margin-bottom:2em"}
- %h3 Deine Aufgaben für die nächste Woche:
- %table{:style => "width:25em"}
- -for task in @next_tasks
- %tr
- %td= format_date task.due_date
- %td
- %b= task.name
+.block
+ .secondary-navigation
+ %ul
+ %li.active.first
+ %a Startseite
+ .content
+ %h2 Startseite
+ .inner
+ - unless @unaccepted_tasks.empty? && @next_tasks.empty? && @unassigned_tasks_number == 0
+ -unless @next_tasks.empty?
+ %div{:style => "float:left, margin-bottom:2em"}
+ %h3 Deine Aufgaben für die nächste Woche:
+ %table{:style => "width:25em"}
+ -for task in @next_tasks
+ %tr
+ %td= format_date task.due_date
+ %td
+ %b= task.name
- - unless @unaccepted_tasks.empty?
- %h3 Aufgaben übernehmen
- Du bis für Aufgaben verantwortlich.
- = link_to "Aufgaben übernehmen/ablehnen", my_tasks_path
- - unless @unassigned_tasks_number == 0
- %h3 Offene Aufgaben
- = "Es gibt #{@unassigned_tasks_number} #{link_to 'offene Aufage(n)', :controller => 'tasks'}"
- %p{:style => "clear:both"}= link_to "Meine Aufgaben", my_tasks_path
+ - unless @unaccepted_tasks.empty?
+ %h3 Aufgaben übernehmen
+ Du bis für Aufgaben verantwortlich.
+ = link_to "Aufgaben übernehmen/ablehnen", my_tasks_path
+ - unless @unassigned_tasks_number == 0
+ %h3 Offene Aufgaben
+ = "Es gibt #{@unassigned_tasks_number} #{link_to 'offene Aufage(n)', :controller => 'tasks'}"
+ %p{:style => "clear:both"}= link_to "Meine Aufgaben", my_tasks_path
- if @ordergroup
// Current orders
diff --git a/app/views/layouts/_main_tabnav.html.erb b/app/views/layouts/_main_tabnav.html.erb
index f8b2ff38..b6cd6482 100644
--- a/app/views/layouts/_main_tabnav.html.erb
+++ b/app/views/layouts/_main_tabnav.html.erb
@@ -57,15 +57,15 @@
<% for tab in tabs -%>
<% unless tab[:access_denied?] -%>
- -
+
-
<%= link_to tab[:name], tab[:url] %>
-
<% end -%>
<% end -%>
diff --git a/app/views/layouts/application.haml b/app/views/layouts/application.haml
index e7f08e6d..d0087556 100644
--- a/app/views/layouts/application.haml
+++ b/app/views/layouts/application.haml
@@ -3,35 +3,40 @@
%head
%meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"}
%title= "FoodSoft - " + (yield(:title) or controller.controller_name)
- = stylesheet_link_tag 'foodsoft'
- = stylesheet_link_tag "print", :media => "print"
+ = stylesheet_link_tag 'base'
+ = stylesheet_link_tag 'style'
= javascript_include_tag 'prototype'
= javascript_include_tag 'effects'
= javascript_include_tag 'controls'
= javascript_include_tag 'application'
= javascript_include_tag('ordering') if (controller.controller_name == "ordering")
%body
- #logininfo= render :partial => 'shared/loginInfo'
-
- #header
- #logo
- %a{:href => "/"}
- foodsoft
- %span{:style => "color:white; font-size:45%; letter-spacing: -1px;"}= APP_CONFIG[:name]
- #nav= render :partial => 'layouts/main_tabnav'
-
- #main
- #content
- - if flash[:notice]
- %h3.notice#flashNotice= flash[:notice]
- - if flash[:error]
- %h3.error#flashError= flash[:error]
- #loader{:style => "display:none;"}= image_tag("loader.gif", :border => 0)
- - if yield(:title)
- %h1= yield(:title)
- = yield
-
- - if flash[:notice]
- = javascript_tag("new Effect.Highlight('flashNotice', {delay:0.8, duration:1});")
- - if flash[:error]
- = javascript_tag("new Effect.Highlight('flashError', {delay:0.8, duration:1});")
\ No newline at end of file
+ #container
+ #header
+ %h1
+ %a{:href => "/"}= APP_CONFIG[:name]
+ #user-navigation
+ = render :partial => 'shared/loginInfo'
+ .clear
+ #main-navigation
+ = render :partial => 'layouts/main_tabnav'
+ .clear
+ #wrapper
+ #loader{:style => "display:none;"}
+ = image_tag("loader.gif", :border => 0)
+ #main
+ - if flash[:notice]
+ .flash-messages.notice
+ %p= flash[:notice]
+ - if flash[:error]
+ .flash-messages.error
+ %p= flash[:error]
+ = yield
+ #sidebar
+ = yield(:sidebar)
+ .clear
+ #footer
+ .block
+ %p= "#{APP_CONFIG[:name]} is powered by FoodSoft"
+ - if flash[:notice] or flash[:error]
+ = javascript_tag("new Effect.Highlight('flash-messages', {delay:0.8, duration:1});")
diff --git a/public/stylesheets/base.css b/public/stylesheets/base.css
new file mode 100644
index 00000000..851044da
--- /dev/null
+++ b/public/stylesheets/base.css
@@ -0,0 +1,320 @@
+* {margin:0;padding:0}
+.clear { clear: both; height: 0; }
+
+h1 { margin: 15px 0; font-size: 22px; font-weight: normal; }
+h2 { font-size: 22px; margin: 15px 0; font-weight: normal;}
+h3 { font-size: 18px; margin: 10px 0; font-weight: normal;}
+h4 { font-size: 16px; margin: 10px 0; font-weight: normal;}
+hr {height: 1px; border: 0; }
+p { margin: 15px 0;}
+a img { border: none; }
+
+body {
+ font-size: 12px;
+ font-family: sans-serif;
+}
+
+#container {
+ min-width: 960px;
+}
+
+#header, #wrapper, #footer {
+ padding: 0 20px;
+}
+
+#header {
+ position: relative;
+ padding-top: 1px;
+}
+
+#header h1 {
+ margin: 0;
+ padding: 10px 0;
+ font-size: 30px;
+}
+
+#header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
+ text-decoration: none;
+}
+
+#main {
+ width: 70%;
+ float: left;
+}
+
+.actions-bar {
+ padding: 10px 1px;
+}
+
+.actions-bar .actions {
+ float: left;
+}
+
+
+.actions-bar .pagination {
+ float: right;
+ padding: 1px 0;
+}
+
+#sidebar {
+ width: 25%;
+ float: right;
+}
+
+#sidebar h3 {
+ padding: 10px 15px;
+ margin: 0;
+ font-size: 13px;
+}
+
+#sidebar .block {
+ margin-bottom: 20px;
+ padding-bottom: 10px;
+}
+
+#sidebar .block .content {
+ padding: 0 15px;
+}
+
+#sidebar ul.navigation li a:link, #sidebar ul.navigation li a:visited {
+ display: block;
+ padding: 10px 15px;
+}
+
+#sidebar .block .sidebar-block, #sidebar .notice {
+ padding:10px;
+}
+
+#wrapper {
+ padding-top: 20px;
+}
+
+#main .block {
+ margin-bottom: 20px;
+ padding-top: 1px;
+}
+
+#main .block .content .inner {
+ padding: 0 15px 15px;
+}
+
+#main .main p.first {
+ margin-top: 0;
+}
+
+#user-navigation {
+ position: absolute;
+ top: 0px;
+ right: 20px;
+}
+
+#user-navigation ul, #main-navigation ul, .secondary-navigation ul, #sidebar ul.navigation {
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+}
+
+#user-navigation ul li, #main-navigation ul li, .secondary-navigation ul li {
+ float: left;
+}
+
+#main-navigation ul li {
+ margin-right: 5px;
+}
+
+#user-navigation ul li {
+ padding: 5px 10px;
+}
+
+#main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
+.secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
+#user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
+ text-decoration: none;
+}
+
+#main-navigation ul li a {
+ font-size: 15px;
+ display: block;
+ padding: 8px 15px;
+}
+
+.secondary-navigation {
+ font-size: 13px;
+ border-bottom-width: 10px;
+ border-bottom-style: solid;
+}
+
+.secondary-navigation ul li a {
+ display: block;
+ padding: 10px 15px;
+}
+
+#footer {
+ padding-bottom: 20px;
+}
+
+/* pagination */
+
+.pagination a, .pagination span {
+ padding: 2px 5px;
+ margin-right: 5px;
+ display: block;
+ float: left;
+ border-style: solid;
+ border-width: 1px;
+}
+
+.pagination span.current {
+ font-weight: bold;
+}
+
+.pagination a {
+ text-decoration: none;
+}
+
+/* tables */
+.table {
+ width: 100%;
+ border-collapse: collapse;
+ margin-bottom: 15px;
+}
+
+.table th {
+ padding: 10px;
+ font-weight: bold;
+ text-align: left;
+}
+
+.table th.first {
+ width: 30px;
+}
+
+.table th.last {
+ width: 200px;
+}
+
+.table .checkbox {
+ margin-left: 10px;
+}
+
+.table td {
+ padding: 10px;
+}
+
+/* forms */
+
+input.checkbox {
+ margin: 0;
+ padding: 0;
+}
+
+.form .group {
+ margin-bottom: 15px;
+}
+
+.form div.left {
+ width: 20%;
+ float: left;
+}
+
+.form div.right {
+ width: 75%;
+ float: right;
+}
+
+.form .columns .column {
+ width: 48%;
+}
+
+.form .columns .left {
+ float: left;
+}
+
+.form .columns .right {
+ float: right;
+}
+
+.form label.label, .form input.text, .form textarea {
+ font-size: 1.2em;
+ padding: 1px 0;
+ margin: 0;
+}
+
+.form label.right {
+ text-align: right;
+}
+
+.form input.checkbox, .form input.radio {
+ margin-right: 5px;
+}
+
+.form label.checkbox, .form label.radio {
+ line-height: 1.5em;
+}
+
+.form label.label {
+ display: block;
+ padding-bottom: 2px;
+ font-weight: bold;
+}
+
+.form input.text, .form textarea.textarea {
+ width: 100%;
+ border-width: 1px;
+ border-style: solid;
+}
+
+/* lists */
+
+ul.list {
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+}
+
+ul.list li {
+ clear: left;
+ padding-bottom: 5px;
+}
+
+ul.list li .left {
+ float: left;
+}
+
+ul.list li .left .avatar {
+ width: 50px;
+ height: 50px;
+}
+
+ul.list li .item {
+ margin-left: 80px;
+}
+
+ul.list li .item .avatar {
+ float: left;
+ margin: 0 5px 5px 0;
+ width: 30px;
+ height: 30px;
+}
+
+/* box */
+
+#box {
+ width: 500px;
+ margin: 50px auto;
+}
+
+#box .block {
+ margin-bottom: 20px;
+}
+
+#box .block h2 {
+ padding: 10px 15px;
+ margin: 0;
+}
+
+#box .block .content {
+ padding: 15px 20px;
+}
+
+
diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css
new file mode 100644
index 00000000..3024ad29
--- /dev/null
+++ b/public/stylesheets/style.css
@@ -0,0 +1,267 @@
+.small { font-size:11px; }
+.gray { color:#999999; }
+.hightlight { background-color:#FFFFCC; }
+
+a:link, a:visited, a:hover, a:active, h1, h2, h3 { color: #c31515; }
+a { -moz-outline: none; }
+
+body {
+ color: #222;
+ background: #f0f0ee;
+ font-family: helvetica, arial, sans-serif;
+}
+
+hr {
+ background: #f0f0ee;
+ color: #f0f0ee;
+}
+
+#header {
+ background: #c31515;
+}
+
+#header h1 {
+ padding: 20px 0;
+}
+
+#header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
+ color: #FFF;
+}
+
+#user-navigation {
+ top: auto;
+ bottom: 5px;
+ right: 25px;
+}
+
+#main .block .content {
+ background: #FFF;
+ padding-top: 1px;
+}
+
+#main .block .content h2 {
+ margin-left: 15px;
+}
+
+#sidebar .block {
+ background: #FFF;
+}
+
+#sidebar h3 {
+ background: #c31515;
+ color: #FFF;
+ border-bottom: 10px solid #262626;
+}
+
+#main-navigation ul li {
+ padding-left: 15px;
+}
+
+#main-navigation ul li a {
+ padding: 8px 0;
+}
+
+#main-navigation ul li.active {
+ padding: 0;
+ margin-left: 15px;
+}
+
+#main-navigation ul li.active {
+ margin-left: 15px;
+}
+
+#main-navigation ul li.active a {
+ padding: 8px 15px;
+}
+
+#sidebar ul li a:link, #sidebar ul li a:visited {
+ background: #FFF;
+ border-bottom: 1px solid #F0F0EE;
+ text-decoration: none;
+}
+
+#sidebar ul li a:hover, #sidebar ul li a:active {
+ background: #470E0E;
+ color: #FFF;
+}
+
+#main-navigation {
+ background: #262626;
+}
+
+#main-navigation ul li {
+ background: #262626;
+ margin-right: 0;
+}
+
+#main-navigation ul li.active {
+ background: #f0f0ee;
+}
+
+#main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
+.secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
+#user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
+ text-decoration: none;
+ color: #FFF;
+}
+
+.secondary-navigation li a:hover {
+ background: #470E0E;
+}
+
+#main-navigation ul li.active a:link, #main-navigation ul li.active a:visited, #main-navigation ul li.active a:hover, #main-navigation ul li.active a:active {
+ color: #262626;
+}
+
+.secondary-navigation {
+ background: #c31515;
+ border-bottom-color: #262626;
+}
+
+.secondary-navigation ul li.active, .secondary-navigation ul li.active a:hover {
+ background-color: #262626;
+}
+
+#footer .block {
+ color: #FFF;
+ background: #262626;
+ width: 70%;
+}
+
+#footer .block p {
+ margin: 0;
+ padding: 10px;
+}
+
+/* pagination */
+
+.pagination span.current {
+ background: #262626;
+ color: #FFF;
+ border-color: #262626;
+}
+
+.pagination a {
+ color: #262626;
+ border-color: #262626;
+}
+
+.pagination a:hover {
+ color: #FFF;
+ background: #262626;
+}
+
+/* tables */
+
+.table th {
+ background: #262626;
+ color: #FFF;
+}
+
+.table td {
+ border-bottom:1px solid #F0F0EE;
+}
+
+/* forms */
+
+.form input.text, .form textarea {
+ width: 100%;
+ border: 1px solid #262626;
+}
+
+.form input.button {
+ background: #EEE;
+ color: #262626;
+ padding: 2px 5px;
+ border: 1px solid #262626;
+ cursor: pointer;
+}
+
+.form .description {
+ font-style: italic;
+ color: #8C8C8C;
+ font-size: .9em;
+}
+
+/* flash-messages */
+.flash-messages {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ text-align:center;
+ margin:0 auto 5px;
+
+}
+.flash-messages p {
+ margin:8px;
+}
+.flash-messages.error {
+ border: 1px solid #fbb;
+ background-color: #fdd;
+}
+.flash-messages.warning {
+ border: 1px solid #fffaaa;
+ background-color: #ffffcc;
+}
+.flash-messages.notice {
+ border: 1px solid #1FDF00;
+ background-color: #BBFFB6;
+}
+
+/* lists */
+
+ul.list li {
+ border-bottom-color: #F0F0EE;
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+}
+
+ul.list li .item .avatar {
+ border-color: #F0F0EE;
+ border-width: 1px;
+ border-style: solid;
+ padding: 2px;
+}
+
+/* box */
+
+#box .block {
+ background: #FFF;
+}
+
+#box .block h2 {
+ background: #c31515;
+ color: #FFF;
+}
+
+
+/* rounded borders */
+
+#main, #main-navigation, #main-navigation li, .secondary-navigation, #main .block, #sidebar .block, #sidebar h3, ul.list li,
+#footer .block, .form input.button, #box .block, #box .block h2 {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation li.first a, .secondary-navigation ul li.first, .table th.first, .table th.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+.table th.last {
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation ul li.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+#sidebar, #sidebar .block, #main .block, #sidebar ul.navigation, ul.list li, #footer .block, .form input.button, #box .block {
+ -moz-border-radius-bottomleft: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+}
\ No newline at end of file