First parts of new 'web-app-theme'.

This commit is contained in:
Benjamin Meichsner 2009-02-18 11:41:03 +01:00
parent 3ea8d5a2ef
commit c04819e8c4
6 changed files with 653 additions and 56 deletions

View file

@ -1,5 +1,5 @@
%h2 Direkt zu ... %h3 Direkt zu ...
%ul %ul.list
%li %li
Foodcoop Foodcoop
%ul %ul

View file

@ -1,31 +1,36 @@
%h1 Startseite - title "Startseite"
#start_nav - content_for :sidebar do
= render :partial => 'start_nav' .block
= render :partial => 'start_nav'
.right_column{:style => "width:70%"} .block
- unless @unaccepted_tasks.empty? && @next_tasks.empty? && @unassigned_tasks_number == 0 .secondary-navigation
.box_title %ul
%h2 Aufgaben %li.active.first
.column_content %a Startseite
-unless @next_tasks.empty? .content
%div{:style => "float:left, margin-bottom:2em"} %h2 Startseite
%h3 Deine Aufgaben für die nächste Woche: .inner
%table{:style => "width:25em"} - unless @unaccepted_tasks.empty? && @next_tasks.empty? && @unassigned_tasks_number == 0
-for task in @next_tasks -unless @next_tasks.empty?
%tr %div{:style => "float:left, margin-bottom:2em"}
%td= format_date task.due_date %h3 Deine Aufgaben für die nächste Woche:
%td %table{:style => "width:25em"}
%b= task.name -for task in @next_tasks
%tr
%td= format_date task.due_date
%td
%b= task.name
- unless @unaccepted_tasks.empty? - unless @unaccepted_tasks.empty?
%h3 Aufgaben übernehmen %h3 Aufgaben übernehmen
Du bis für Aufgaben verantwortlich. Du bis für Aufgaben verantwortlich.
= link_to "Aufgaben übernehmen/ablehnen", my_tasks_path = link_to "Aufgaben übernehmen/ablehnen", my_tasks_path
- unless @unassigned_tasks_number == 0 - unless @unassigned_tasks_number == 0
%h3 Offene Aufgaben %h3 Offene Aufgaben
= "Es gibt #{@unassigned_tasks_number} #{link_to 'offene Aufage(n)', :controller => 'tasks'}" = "Es gibt #{@unassigned_tasks_number} #{link_to 'offene Aufage(n)', :controller => 'tasks'}"
%p{:style => "clear:both"}= link_to "Meine Aufgaben", my_tasks_path %p{:style => "clear:both"}= link_to "Meine Aufgaben", my_tasks_path
- if @ordergroup - if @ordergroup
// Current orders // Current orders

View file

@ -57,15 +57,15 @@
<ul> <ul>
<% for tab in tabs -%> <% for tab in tabs -%>
<% unless tab[:access_denied?] -%> <% unless tab[:access_denied?] -%>
<li class="<%= 'current' if tab_is_active?(tab) %>"> <li class="<%= 'active' if tab_is_active?(tab) %>">
<%= link_to tab[:name], tab[:url] %> <%= link_to tab[:name], tab[:url] %>
<ul> <!--<ul>
<% for subtab in tab[:subnav] -%> <% for subtab in tab[:subnav] -%>
<% unless subtab[:access_denied?] -%> <% unless subtab[:access_denied?] -%>
<li><%= link_to subtab[:name], subtab[:url] %></li> <li><%= link_to subtab[:name], subtab[:url] %></li>
<% end -%> <% end -%>
<% end -%> <% end -%>
</ul> </ul>-->
</li> </li>
<% end -%> <% end -%>
<% end -%> <% end -%>

View file

@ -3,35 +3,40 @@
%head %head
%meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"} %meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"}
%title= "FoodSoft - " + (yield(:title) or controller.controller_name) %title= "FoodSoft - " + (yield(:title) or controller.controller_name)
= stylesheet_link_tag 'foodsoft' = stylesheet_link_tag 'base'
= stylesheet_link_tag "print", :media => "print" = stylesheet_link_tag 'style'
= javascript_include_tag 'prototype' = javascript_include_tag 'prototype'
= javascript_include_tag 'effects' = javascript_include_tag 'effects'
= javascript_include_tag 'controls' = javascript_include_tag 'controls'
= javascript_include_tag 'application' = javascript_include_tag 'application'
= javascript_include_tag('ordering') if (controller.controller_name == "ordering") = javascript_include_tag('ordering') if (controller.controller_name == "ordering")
%body %body
#logininfo= render :partial => 'shared/loginInfo' #container
#header
#header %h1
#logo %a{:href => "/"}= APP_CONFIG[:name]
%a{:href => "/"} #user-navigation
<span>food</span>soft = render :partial => 'shared/loginInfo'
%span{:style => "color:white; font-size:45%; letter-spacing: -1px;"}= APP_CONFIG[:name] .clear
#nav= render :partial => 'layouts/main_tabnav' #main-navigation
= render :partial => 'layouts/main_tabnav'
#main .clear
#content #wrapper
- if flash[:notice] #loader{:style => "display:none;"}
%h3.notice#flashNotice= flash[:notice] = image_tag("loader.gif", :border => 0)
- if flash[:error] #main
%h3.error#flashError= flash[:error] - if flash[:notice]
#loader{:style => "display:none;"}= image_tag("loader.gif", :border => 0) .flash-messages.notice
- if yield(:title) %p= flash[:notice]
%h1= yield(:title) - if flash[:error]
= yield .flash-messages.error
%p= flash[:error]
- if flash[:notice] = yield
= javascript_tag("new Effect.Highlight('flashNotice', {delay:0.8, duration:1});") #sidebar
- if flash[:error] = yield(:sidebar)
= javascript_tag("new Effect.Highlight('flashError', {delay:0.8, duration:1});") .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});")

320
public/stylesheets/base.css Normal file
View file

@ -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;
}

View file

@ -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;
}