From bb4b24d9cba5614f8356e6c2b4d383fda6df8372 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Fri, 6 Sep 2013 18:04:57 +0200 Subject: [PATCH] styling zeugs --- app/assets/stylesheets/application.css.scss | 23 ++++++-- app/assets/stylesheets/scaffolds.css.scss | 58 --------------------- app/controllers/galleries_controller.rb | 7 ++- app/views/galleries/index.html.erb | 2 +- app/views/galleries/show.html.erb | 50 +++++++++--------- app/views/layouts/application.html.erb | 28 +++++----- 6 files changed, 68 insertions(+), 100 deletions(-) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 9dd7765..73a6def 100755 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -1,3 +1,4 @@ + /* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. @@ -16,9 +17,21 @@ */ // Colorshema #0A64A4 -$bodyBackground: #FFFFFF; -$navbarBackground: #FFCE40; -$navbarBackgroundHighlight:#FFDB73; +$color_prim: #0A64A4; +$color_prim_light: 0B65A5; +$color_prim_vlight: 2B85C5; +$color_cont: FFDB73; +$color_cont_light:FFDB73; + +$white: #FFFFFF; + +$bodyBackground: $white; +$navbarBackground: lighten(#FFCE40,20%); +//$navbarBackground: #FFFFFF; + +$navbarBackgroundHighlight:lighten(#FFDB73,20%); +//$navbarBackgroundHighlight:#FFFFFF; + $navbarLinkBackgroundHover:#FFBE00; $infoBackground:#65A5D1; $infoText:#03406A; @@ -74,6 +87,10 @@ div.header { min-width: 100%; } +.navbar .navbar-inner { +border:none; +box-shadow:none; +} #contentdiv{ background: #FFFFFF } diff --git a/app/assets/stylesheets/scaffolds.css.scss b/app/assets/stylesheets/scaffolds.css.scss index d14f3aa..e69de29 100755 --- a/app/assets/stylesheets/scaffolds.css.scss +++ b/app/assets/stylesheets/scaffolds.css.scss @@ -1,58 +0,0 @@ -body { - font-family: verdana, arial, helvetica, sans-serif; - font-size: 13px; - line-height: 18px; -} - -p, ol, ul, td { - font-family: verdana, arial, helvetica, sans-serif; - font-size: 13px; - line-height: 18px; -} - -pre { - background-color: #eee; - padding: 10px; - font-size: 11px; -} - - - -div { - &.field, &.actions { - margin-bottom: 10px; - } -} - -#notice { - color: green; -} - -.field_with_errors { - padding: 2px; - background-color: red; - display: table; -} - -#error_explanation { - width: 450px; - border: 2px solid red; - padding: 7px; - padding-bottom: 0; - margin-bottom: 20px; - background-color: #f0f0f0; - h2 { - text-align: left; - font-weight: bold; - padding: 5px 5px 5px 15px; - font-size: 12px; - margin: -7px; - margin-bottom: 0px; - background-color: #c00; - color: #fff; - } - ul li { - - list-style: square; - } -} diff --git a/app/controllers/galleries_controller.rb b/app/controllers/galleries_controller.rb index b51e1f8..6a81078 100644 --- a/app/controllers/galleries_controller.rb +++ b/app/controllers/galleries_controller.rb @@ -1,4 +1,7 @@ class GalleriesController < ApplicationController + before_filter {@toolbar_elements=[]} + load_and_authorize_resource + # GET /galleries # GET /galleries.json def index @@ -14,7 +17,9 @@ class GalleriesController < ApplicationController # GET /galleries/1.json def show @gallery = Gallery.find(params[:id]) - + @toolbar_elements << {:hicon=>'icon-plus', :text=> "NewFoto", :path=>new_gallery_foto_path(@gallery)} + @toolbar_elements << {:hicon=>'icon-pencil', :text => I18n.t('common.edit'), :path=>edit_gallery_path(@gallery)} + @toolbar_elements << {:text=>"Back", :path=>galleries_path()} respond_to do |format| format.html # show.html.erb format.json { render json: @gallery } diff --git a/app/views/galleries/index.html.erb b/app/views/galleries/index.html.erb index 55d1360..e2d0418 100644 --- a/app/views/galleries/index.html.erb +++ b/app/views/galleries/index.html.erb @@ -16,7 +16,7 @@ <% end %> - <%= link_to 'Edit', edit_gallery_path(gallery) %> + <% end %> diff --git a/app/views/galleries/show.html.erb b/app/views/galleries/show.html.erb index 4048882..f1d45b9 100644 --- a/app/views/galleries/show.html.erb +++ b/app/views/galleries/show.html.erb @@ -1,37 +1,36 @@

<%= notice %>

+
+ <%= @gallery.datum %> +

+ <%= @gallery.name %> +

+

- Name: - <%= @gallery.name %> -

- -

- Desc: <%= @gallery.desc %>

-

- Datum: - <%= @gallery.datum %> -

+ + + -<%= link_to 'NewFoto' , new_gallery_foto_path(@gallery) %> | -<%= link_to 'Edit', edit_gallery_path(@gallery) %> | -<%= link_to 'Back', galleries_path %> +<%= render 'layouts/pretty_toolbar' %> + + + diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 6746f61..b537ea0 100755 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -15,19 +15,23 @@ -
-
-
-

Fachschaft Elektrotechnik

+
+
+
+

Fachschaft Elektrotechnik

-
-
-
- -
+
+
+
+ - <%= yield %> -
-
+ +
+
+ + <%= yield %> +
+
+