From b86d3aca231039e85fc24e272e2b3d31d996186d Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Wed, 8 Jan 2014 20:23:58 +0100 Subject: [PATCH] Themen und themes_for_rails neues design Neues design mit theme=2003 ansehen --- Gemfile | 6 +- Gemfile.lock | 254 ++++++++++++++++++ app/assets/stylesheets/application.css.scss | 50 +--- app/assets/stylesheets/calendars.css.scss | 44 +++ app/assets/stylesheets/layout.css.scss | 25 ++ app/assets/stylesheets/test.css.scss | 4 + .../themes/2003/application.css.scss | 200 ++++++++++++++ .../themes/2003/bootstrap-responsive.scss | 5 + .../stylesheets/themes/2003/test.css.scss | 4 + .../themes/2003/stylesheets/layout.css.scss | 25 ++ app/assets/themes/2003/stylesheets/mod.css | 17 ++ .../stylesheets/sass/application.css.scss | 187 +++++++++++++ .../2003/stylesheets/sass/layout.css.scss | 25 ++ .../2003/stylesheets/sass/test.css.scss | 4 + app/controllers/application_controller.rb | 11 +- app/views/layouts/application.html.erb | 6 +- .../themes/2003/layouts/application.html.erb | 57 ++++ app/views/themes/2003/layouts/menu.html.erb | 33 +++ config/application.rb | 3 + config/initializers/themes_for_rails.rb | 9 + config/routes.rb | 1 + 21 files changed, 923 insertions(+), 47 deletions(-) create mode 100644 Gemfile.lock create mode 100644 app/assets/stylesheets/test.css.scss create mode 100755 app/assets/stylesheets/themes/2003/application.css.scss create mode 100644 app/assets/stylesheets/themes/2003/bootstrap-responsive.scss create mode 100644 app/assets/stylesheets/themes/2003/test.css.scss create mode 100755 app/assets/themes/2003/stylesheets/layout.css.scss create mode 100644 app/assets/themes/2003/stylesheets/mod.css create mode 100755 app/assets/themes/2003/stylesheets/sass/application.css.scss create mode 100755 app/assets/themes/2003/stylesheets/sass/layout.css.scss create mode 100644 app/assets/themes/2003/stylesheets/sass/test.css.scss create mode 100755 app/views/themes/2003/layouts/application.html.erb create mode 100644 app/views/themes/2003/layouts/menu.html.erb create mode 100644 config/initializers/themes_for_rails.rb diff --git a/Gemfile b/Gemfile index 27f7d61..9bbd325 100755 --- a/Gemfile +++ b/Gemfile @@ -11,10 +11,11 @@ gem 'rails', '3.2.9' gem 'sanitize' # Gems used only for assets and not required # in production environments by default. -group :assets do gem 'sass-rails', '~> 3.2' gem 'coffee-rails', '~> 3.2.1' gem 'bootstrap-sass','~> 2.3.2.1' + +group :assets do # See https://github.com/sstephenson/execjs#readme for more supported runtimes gem 'therubyracer', :platforms => :ruby gem 'uglifier', '>= 1.0.3' @@ -85,3 +86,6 @@ gem 'rmagick' gem 'bootstrap-addons-rails' gem "jquery-fileupload-rails" gem "seed_dump", "~> 0.5.3" +#gem "themes_for_rails" ,:git =>'git://github.com/tkriplean/themes_for_rails.git' +#gem "themes_for_rails", :git=> 'git://github.com/lucasefe/themes_for_rails.git' +gem 'themes_for_rails' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..33cdaa7 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,254 @@ +GEM + remote: https://rubygems.org/ + specs: + actionmailer (3.2.9) + actionpack (= 3.2.9) + mail (~> 2.4.4) + actionpack (3.2.9) + activemodel (= 3.2.9) + activesupport (= 3.2.9) + builder (~> 3.0.0) + erubis (~> 2.7.0) + journey (~> 1.0.4) + rack (~> 1.4.0) + rack-cache (~> 1.2) + rack-test (~> 0.6.1) + sprockets (~> 2.2.1) + activemodel (3.2.9) + activesupport (= 3.2.9) + builder (~> 3.0.0) + activerecord (3.2.9) + activemodel (= 3.2.9) + activesupport (= 3.2.9) + arel (~> 3.0.2) + tzinfo (~> 0.3.29) + activeresource (3.2.9) + activemodel (= 3.2.9) + activesupport (= 3.2.9) + activesupport (3.2.9) + i18n (~> 0.6) + multi_json (~> 1.0) + annotate (2.5.0) + rake + arel (3.0.2) + awesome_nested_set (2.1.6) + activerecord (>= 3.0.0) + bcrypt-ruby (3.0.1) + bootstrap-addons-rails (0.1.2) + rails + bootstrap-sass (2.3.2.1) + sass (~> 3.2) + builder (3.0.4) + cancan (1.6.9) + carrierwave (0.9.0) + activemodel (>= 3.2.0) + activesupport (>= 3.2.0) + json (>= 1.7) + cocaine (0.4.2) + coffee-rails (3.2.2) + coffee-script (>= 2.2.0) + railties (~> 3.2.0) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.4.0) + devise (2.2.3) + bcrypt-ruby (~> 3.0) + orm_adapter (~> 0.1) + railties (~> 3.1) + warden (~> 1.2.1) + diff-lcs (1.2.4) + erubis (2.7.0) + execjs (1.4.0) + multi_json (~> 1.0) + factory_girl (4.2.0) + activesupport (>= 3.0.0) + factory_girl_rails (4.2.1) + factory_girl (~> 4.2.0) + railties (>= 3.0.0) + faraday (0.8.8) + multipart-post (~> 1.2.0) + formtastic (2.2.1) + actionpack (>= 3.0) + formtastic-bootstrap (2.1.3) + formtastic (~> 2.2) + git (1.2.5) + globalize3 (0.3.0) + activemodel (>= 3.0.0) + activerecord (>= 3.0.0) + paper_trail (~> 2) + haml (4.0.0) + tilt + hashie (2.0.5) + hike (1.2.1) + httpauth (0.2.0) + i18n (0.6.1) + journey (1.0.4) + jquery-fileupload-rails (0.4.1) + actionpack (>= 3.1) + railties (>= 3.1) + jquery-rails (2.2.1) + railties (>= 3.0, < 5.0) + thor (>= 0.14, < 2.0) + json (1.7.7) + jwt (0.1.8) + multi_json (>= 1.5) + libv8 (3.11.8.13) + mail (2.4.4) + i18n (>= 0.4.0) + mime-types (~> 1.16) + treetop (~> 1.4.8) + mime-types (1.21) + mini_portile (0.5.2) + multi_json (1.5.1) + multipart-post (1.2.0) + mysql2 (0.3.13) + net-ldap (0.2.2) + nokogiri (1.6.0) + mini_portile (~> 0.5.0) + oauth2 (0.8.1) + faraday (~> 0.8) + httpauth (~> 0.1) + jwt (~> 0.1.4) + multi_json (~> 1.0) + rack (~> 1.2) + omniauth (1.1.4) + hashie (>= 1.2, < 3) + rack + omniauth-facebook (1.4.1) + omniauth-oauth2 (~> 1.1.0) + omniauth-ldap (1.0.3) + net-ldap (~> 0.2.2) + omniauth (~> 1.0) + pyu-ruby-sasl (~> 0.0.3.1) + rubyntlm (~> 0.1.1) + omniauth-oauth2 (1.1.1) + oauth2 (~> 0.8.0) + omniauth (~> 1.0) + orm_adapter (0.4.0) + paper_trail (2.7.0) + activerecord (~> 3.0) + railties (~> 3.0) + paperclip (3.4.0) + activemodel (>= 3.0.0) + activerecord (>= 3.0.0) + activesupport (>= 3.0.0) + cocaine (~> 0.4.0) + mime-types + polyglot (0.3.3) + pyu-ruby-sasl (0.0.3.3) + rack (1.4.5) + rack-cache (1.2) + rack (>= 0.4) + rack-ssl (1.3.3) + rack + rack-test (0.6.2) + rack (>= 1.0) + rails (3.2.9) + actionmailer (= 3.2.9) + actionpack (= 3.2.9) + activerecord (= 3.2.9) + activeresource (= 3.2.9) + activesupport (= 3.2.9) + bundler (~> 1.0) + railties (= 3.2.9) + railties (3.2.9) + actionpack (= 3.2.9) + activesupport (= 3.2.9) + rack-ssl (~> 1.3.2) + rake (>= 0.8.7) + rdoc (~> 3.4) + thor (>= 0.14.6, < 2.0) + rake (10.0.3) + rdoc (3.12.1) + json (~> 1.4) + ref (1.0.2) + rmagick (2.13.2) + rolify (3.2.0) + rspec-core (2.14.4) + rspec-expectations (2.14.0) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.14.1) + rspec-rails (2.14.0) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) + rubyntlm (0.1.1) + sanitize (2.0.6) + nokogiri (>= 1.4.4) + sass (3.2.5) + sass-rails (3.2.6) + railties (~> 3.2.0) + sass (>= 3.1.10) + tilt (~> 1.3) + seed_dump (0.5.3) + simple_calendar (0.1.9) + rails (>= 3.0) + sprockets (2.2.2) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sqlite3 (1.3.7) + themes_for_rails (0.5.1) + rails (>= 3.0.0) + therubyracer (0.11.3) + libv8 (~> 3.11.8.12) + ref + thor (0.17.0) + tilt (1.3.3) + tinymce-rails (3.5.8) + railties (>= 3.1.1) + treetop (1.4.12) + polyglot + polyglot (>= 0.3.1) + tzinfo (0.3.35) + uglifier (1.3.0) + execjs (>= 0.3.0) + multi_json (~> 1.0, >= 1.0.2) + warden (1.2.1) + rack (>= 1.0) + +PLATFORMS + ruby + +DEPENDENCIES + annotate (>= 2.5.0) + awesome_nested_set + bootstrap-addons-rails + bootstrap-sass (~> 2.3.2.1) + cancan + carrierwave (~> 0.9.0) + coffee-rails (~> 3.2.1) + devise (~> 2.2.3) + execjs (~> 1.4.0) + factory_girl_rails + formtastic (~> 2.2.1) + formtastic-bootstrap (~> 2.1.3) + git + globalize3 (~> 0.3.0) + haml + jquery-fileupload-rails + jquery-rails + mysql2 + omniauth + omniauth-facebook + omniauth-ldap + paper_trail (>= 2.7.0) + paperclip (~> 3.4.0) + rails (= 3.2.9) + rmagick + rolify + rspec-rails + sanitize + sass-rails (~> 3.2) + seed_dump (~> 0.5.3) + simple_calendar (~> 0.1.9) + sqlite3 + themes_for_rails + therubyracer + tinymce-rails (>= 3.5.8) + uglifier (>= 1.0.3) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index eee7251..0ee69c8 100755 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -10,7 +10,8 @@ * compiled file, but it's generally better to create a new file per style scope. * *= require_self - *= require_tree . + * require_tree . + *= require 'calendars' *= require jquery.fileupload-ui * require 'bootstrap' @@ -138,47 +139,8 @@ div.contentbox margin: 5px; } -table.calendar tr td -{ - width:14.28%; - height:2em; - position:relative; - padding:0 -} -table.calendar tr td.day div -{ - display:block; - position:absolute; - padding:2px; -} -table.calendar tr td.day div div -{ - display:none; - position:relative; -} -table.calendar tr td.day.events -{ color:blue -} -table.calendar tr td.day div:hover div -{ - display:block; - z-index: 10000; - background:none; - border: none; -} -table.calendar tr td.day div:hover -{ - background:white; - border: solid black 1px; - z-index:9999; -} - -table.calendar tr td.day div:hover div -{ -} - -table.calendar tr td.day div div.day_number -{ - display:block; -} +.navbar .nav li { +min-width:100%; +background:44F; +} \ No newline at end of file diff --git a/app/assets/stylesheets/calendars.css.scss b/app/assets/stylesheets/calendars.css.scss index 9ab5f54..4afd242 100644 --- a/app/assets/stylesheets/calendars.css.scss +++ b/app/assets/stylesheets/calendars.css.scss @@ -2,3 +2,47 @@ // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ +table.calendar tr td +{ + width:14.28%; + height:2em; + position:relative; + padding:0 +} + +table.calendar tr td.day div +{ + display:block; + position:absolute; + padding:2px; +} +table.calendar tr td.day div div +{ + display:none; + position:relative; +} +table.calendar tr td.day.events +{ color:blue +} +table.calendar tr td.day div:hover div +{ + display:block; + z-index: 10000; + background:none; + border: none; +} +table.calendar tr td.day div:hover +{ + background:white; + border: solid black 1px; + z-index:9999; +} + +table.calendar tr td.day div:hover div +{ +} + +table.calendar tr td.day div div.day_number +{ + display:block; +} diff --git a/app/assets/stylesheets/layout.css.scss b/app/assets/stylesheets/layout.css.scss index e69de29..7147fe8 100755 --- a/app/assets/stylesheets/layout.css.scss +++ b/app/assets/stylesheets/layout.css.scss @@ -0,0 +1,25 @@ + +// Colorshema #0A64A4 +$color_prim: #0A64A4; +$color_prim_light: #0B65A5; +$color_prim_vlight: #2B85C5; +$color_cont: FFDB73; +$color_cont_light:FFDB73; +$linkColor: #03006E; +$white: #FFFFFF; + +$bodyBackground: $white; +$navbarBackground: $color_cont; +$navbarBackground: #FFFFFF; + +$navbarBackgroundHighlight:lighten($navbarBackground,30%); +//$navbarBackgroundHighlight:#FFFFFF; + +$navbarLinkBackgroundHover:#FFBE00; +$navbarLinkBackgroundHover: lighten(#cccccc,10%); +$infoBackground:#65A5D1; +$infoText:#03406A; +$sansFontFamily: Helvetica, Arial; +@import 'bootstrap'; +@import 'bootstrap-responsive'; +@import 'bootstrap/image-gallery'; diff --git a/app/assets/stylesheets/test.css.scss b/app/assets/stylesheets/test.css.scss new file mode 100644 index 0000000..7e52313 --- /dev/null +++ b/app/assets/stylesheets/test.css.scss @@ -0,0 +1,4 @@ +#content +{ + background:red; +} \ No newline at end of file diff --git a/app/assets/stylesheets/themes/2003/application.css.scss b/app/assets/stylesheets/themes/2003/application.css.scss new file mode 100755 index 0000000..c51d947 --- /dev/null +++ b/app/assets/stylesheets/themes/2003/application.css.scss @@ -0,0 +1,200 @@ + +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, + * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the top of the + * compiled file, but it's generally better to create a new file per style scope. + * + *= require_self + *= require_tree . + *= require jquery.fileupload-ui + * require 'bootstrap' + + *= require 'neuigkeiten' + */ +// Colorshema #0A64A4 +$color_prim: #7070a0; +$color_prim_light: lighten($color_prim ,10%); +$color_prim_vlight: lighten($color_prim ,30%); +$color_prim_dark: darken($color_prim ,10%); +$color_prim_vdark: darken($color_prim ,30%); + +$color_cont: FFDB73; +$color_cont_light:FFDB73; +$linkColor: $color_prim_vdark; +$white: #FFFFFF; + +$bodyBackground: $white; +$navbarBackground: $color_prim; +$navbarText: black;$navbarLinkColor: black; + +$navbarBackgroundHighlight: $color_prim; +//$navbarBackgroundHighlight:#FFFFFF; + +$navbarLinkBackgroundHover:#FFBE00; +$navbarLinkBackgroundHover: darken($navbarBackground,10%); +$infoBackground:#65A5D1; +$infoText:#03406A; +$sansFontFamily: Helvetica, Arial; +@import 'bootstrap'; +@import 'bootstrap-responsive'; +@import 'bootstrap/image-gallery'; + + +h1 { + font-size: 23px +} + +h2 { + font-size: 19px +} + +body,html { + padding:0; + margin:0; + +} +a:hover { + text-decoration:none; +} + +div.header { + display: block; +// background: url('../../../../header1.png') no-repeat; +// background-color:white;// $color_prim; + background-position: right; + border-bottom:1px solid black; + float:left; + color:#000; + padding-left:87px; + padding-top:0px; +// overflow:hidden; + margin-bottom: 0 px +} +div.header h1 { +padding:0; +margin:4px; +font-size:20px; +line-height:32px; +} +div.headerrow { +background: $color_prim +} + +#menudiv { + // width:100%; +} + +div.smallspan { +min-height:0; +} + +.navbar .nav li { + min-width:100%; +} +.navbar .nav .divider { + border-style: solid; + border-width: 1px 0px 0px 0px; + border-color: grey; + min-width: 100%; +} + +.navbar .navbar-inner +{ + border:none; + box-shadow:none; +} +#contentdiv +{ + background: #FFFFFF +} +#contentdiv .container-fluid +{ + padding:0; +} + +a.linkbox, div.contentbox +{ + display:block; + padding:5px; + border-radius: 10px; + border: lightgray solid 1px; + +} + +a.linkbox:hover +{ +box-shadow: 1px 1px 2px 2px lightgray; +} + +a.linkbox li +{ +} +ul.linkbox-list li +{ +margin-bottom:10px; +} +ul.linkbox-list +{ + max-width:70em; +} + +div.contentbox +{ + margin: 5px; +} + +table.calendar tr td +{ + width:14.28%; + height:2em; + position:relative; + padding:0 +} + +table.calendar tr td.day div +{ + display:block; + position:absolute; + padding:2px; +} +table.calendar tr td.day div div +{ + display:none; + position:relative; +} +table.calendar tr td.day.events +{ color:blue +} +table.calendar tr td.day div:hover div +{ + display:block; + z-index: 10000; + background:none; + border: none; +} +table.calendar tr td.day div:hover +{ + background:white; + border: solid black 1px; + z-index:9999; +} + +table.calendar tr td.day div:hover div +{ +} + +table.calendar tr td.day div div.day_number +{ + display:block; +} + + +.navbar .nav li { +min-width:0; +background:44F; +} \ No newline at end of file diff --git a/app/assets/stylesheets/themes/2003/bootstrap-responsive.scss b/app/assets/stylesheets/themes/2003/bootstrap-responsive.scss new file mode 100644 index 0000000..f2950bd --- /dev/null +++ b/app/assets/stylesheets/themes/2003/bootstrap-responsive.scss @@ -0,0 +1,5 @@ +@import "bootstrap/responsive"; +@media (max-width: 979px){ +.earlymax { +min-width: 100%; +}} diff --git a/app/assets/stylesheets/themes/2003/test.css.scss b/app/assets/stylesheets/themes/2003/test.css.scss new file mode 100644 index 0000000..7e52313 --- /dev/null +++ b/app/assets/stylesheets/themes/2003/test.css.scss @@ -0,0 +1,4 @@ +#content +{ + background:red; +} \ No newline at end of file diff --git a/app/assets/themes/2003/stylesheets/layout.css.scss b/app/assets/themes/2003/stylesheets/layout.css.scss new file mode 100755 index 0000000..a3d5c61 --- /dev/null +++ b/app/assets/themes/2003/stylesheets/layout.css.scss @@ -0,0 +1,25 @@ + +// Colorshema #0A64A4 +$color_prim: #ff0; +$color_prim_light: #0B65A5; +$color_prim_vlight: #2B85C5; +$color_cont: FFDB73; +$color_cont_light:FFDB73; +$linkColor: #03006E; +$white: #FFFFFF; + +$bodyBackground: $red; +$navbarBackground: $color_cont; +$navbarBackground: #FFFFFF; + +$navbarBackgroundHighlight:lighten($navbarBackground,30%); +//$navbarBackgroundHighlight:#FFFFFF; + +$navbarLinkBackgroundHover:#FFBE00; +$navbarLinkBackgroundHover: lighten(#cccccc,10%); +$infoBackground:#65A5D1; +$infoText:#03406A; +$sansFontFamily: Helvetica, Arial; +@import 'bootstrap'; +@import 'bootstrap-responsive'; +@import 'bootstrap/image-gallery'; diff --git a/app/assets/themes/2003/stylesheets/mod.css b/app/assets/themes/2003/stylesheets/mod.css new file mode 100644 index 0000000..173c41e --- /dev/null +++ b/app/assets/themes/2003/stylesheets/mod.css @@ -0,0 +1,17 @@ +.navbar .nav li { +min-width:0; +background:44F; +} + +div.header h1 +{ +color:F32; +font-size:10px; +} +#menudiv{ +background-color: #D25FD2; +width:100%; +} +.navbar-inner { + +} diff --git a/app/assets/themes/2003/stylesheets/sass/application.css.scss b/app/assets/themes/2003/stylesheets/sass/application.css.scss new file mode 100755 index 0000000..5d60d5f --- /dev/null +++ b/app/assets/themes/2003/stylesheets/sass/application.css.scss @@ -0,0 +1,187 @@ + +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, + * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the top of the + * compiled file, but it's generally better to create a new file per style scope. + * +*= require_self + *= require_tree . + *= require jquery.fileupload-ui + * require 'bootstrap' + + + + + */ +// Colorshema #0A64A4 +$color_prim: #0A64A4; +$color_prim_light: #0B65A5; +$color_prim_vlight: #2B85C5; +$color_cont: FFDB73; +$color_cont_light:FFDB73; +$linkColor: #03006E; +$white: #FFFFFF; + +$bodyBackground: $white; +$navbarBackground: $color_cont; +$navbarBackground: #FFFFFF; + +$navbarBackgroundHighlight:lighten($navbarBackground,30%); +//$navbarBackgroundHighlight:#FFFFFF; + +$navbarLinkBackgroundHover:#FFBE00; +$navbarLinkBackgroundHover: lighten(#cccccc,10%); +$infoBackground:#65A5D1; +$infoText:#03406A; +$sansFontFamily: Helvetica, Arial; +//@import 'bootstrap'; +//@import 'bootstrap-responsive'; +//@import 'bootstrap/image-gallery'; + + +h1 { + font-size: 23px +} + +h2 { + font-size: 19px +} + +body,html { + padding:0; + margin:0; + +} +a:hover { + text-decoration:none; +} + +div.header { + display: block; + background: url('/header1.png') no-repeat; + background-color: #FFF; + background-position: right; + border-bottom:1px solid black; + height:41px; + color:#000; + padding-left:87px; + padding-top:0px; + overflow:hidden; + margin-bottom: 20px +} +div.header h1 { +padding:0; +margin:4px; +font-size:20px; +line-height:32px; +} +#menudiv { + width:100%; +} + + +.navbar .nav li { + min-width:100%; +} +.navbar .nav .divider { + border-style: solid; + border-width: 1px 0px 0px 0px; + border-color: grey; + min-width: 100%; +} + +.navbar .navbar-inner +{ + border:none; + box-shadow:none; +} +#contentdiv +{ + background: #FFFFFF +} +#contentdiv .container-fluid +{ + padding:0; +} + +a.linkbox, div.contentbox +{ + display:block; + padding:5px; + border-radius: 10px; + border: lightgray solid 1px; + +} + +a.linkbox:hover +{ +box-shadow: 1px 1px 2px 2px lightgray; +} + +a.linkbox li +{ +} +ul.linkbox-list li +{ +margin-bottom:10px; +} +ul.linkbox-list +{ + max-width:70em; +} + +div.contentbox +{ + margin: 5px; +} + +table.calendar tr td +{ + width:14.28%; + height:2em; + position:relative; + padding:0 +} + +table.calendar tr td.day div +{ + display:block; + position:absolute; + padding:2px; +} +table.calendar tr td.day div div +{ + display:none; + position:relative; +} +table.calendar tr td.day.events +{ color:blue +} +table.calendar tr td.day div:hover div +{ + display:block; + z-index: 10000; + background:none; + border: none; +} +table.calendar tr td.day div:hover +{ + background:white; + border: solid black 1px; + z-index:9999; +} + +table.calendar tr td.day div:hover div +{ +} + +table.calendar tr td.day div div.day_number +{ + display:block; +} +@import "bootstrap-sass" \ No newline at end of file diff --git a/app/assets/themes/2003/stylesheets/sass/layout.css.scss b/app/assets/themes/2003/stylesheets/sass/layout.css.scss new file mode 100755 index 0000000..a3d5c61 --- /dev/null +++ b/app/assets/themes/2003/stylesheets/sass/layout.css.scss @@ -0,0 +1,25 @@ + +// Colorshema #0A64A4 +$color_prim: #ff0; +$color_prim_light: #0B65A5; +$color_prim_vlight: #2B85C5; +$color_cont: FFDB73; +$color_cont_light:FFDB73; +$linkColor: #03006E; +$white: #FFFFFF; + +$bodyBackground: $red; +$navbarBackground: $color_cont; +$navbarBackground: #FFFFFF; + +$navbarBackgroundHighlight:lighten($navbarBackground,30%); +//$navbarBackgroundHighlight:#FFFFFF; + +$navbarLinkBackgroundHover:#FFBE00; +$navbarLinkBackgroundHover: lighten(#cccccc,10%); +$infoBackground:#65A5D1; +$infoText:#03406A; +$sansFontFamily: Helvetica, Arial; +@import 'bootstrap'; +@import 'bootstrap-responsive'; +@import 'bootstrap/image-gallery'; diff --git a/app/assets/themes/2003/stylesheets/sass/test.css.scss b/app/assets/themes/2003/stylesheets/sass/test.css.scss new file mode 100644 index 0000000..7e52313 --- /dev/null +++ b/app/assets/themes/2003/stylesheets/sass/test.css.scss @@ -0,0 +1,4 @@ +#content +{ + background:red; +} \ No newline at end of file diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index bdc1724..ecbcadf 100755 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,6 +2,7 @@ class ApplicationController < ActionController::Base protect_from_forgery before_filter :set_i18n_locale_from_params protected + theme :get_theme def set_i18n_locale_from_params if params[:locale] if I18n.available_locales.include?(params[:locale].to_sym) @@ -12,7 +13,15 @@ class ApplicationController < ActionController::Base end end end +def get_theme + set_theme(params[:theme]) +if valid_theme? +theme_name +else +nil +end +end def default_url_options - {locale: I18n.locale} + {locale: I18n.locale, theme:theme_name} end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 6bc3a02..38f8bd0 100755 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -4,7 +4,11 @@ Fetsite - <%= stylesheet_link_tag "application", :media => "all" %> + + <%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.nil? %> +<%= stylesheet_link_tag "application", :media=>"all" if theme_name.nil? %> + + diff --git a/app/views/themes/2003/layouts/application.html.erb b/app/views/themes/2003/layouts/application.html.erb new file mode 100755 index 0000000..792a601 --- /dev/null +++ b/app/views/themes/2003/layouts/application.html.erb @@ -0,0 +1,57 @@ + + + + + + Fetsite + + + <%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %> +<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %> + <%= theme_stylesheet_link_tag "test", :media => "all" %> +<% theme_stylesheet_link_tag "mod", :media=>"all" %> + + + + + + <%= javascript_include_tag "application" %> + <%= csrf_meta_tags %> + + + + +
+
+
+
+
+
+ <%= image_tag('/fetlogo.png',{:style=>"float:left"}) %> +

+
+ + +
+
+
<%= theme_name %>
+
+ + +
+
+
+
+ <%= yield %> + <%= render 'layouts/login' %> +
+
+
+
+ +
+ + + diff --git a/app/views/themes/2003/layouts/menu.html.erb b/app/views/themes/2003/layouts/menu.html.erb new file mode 100644 index 0000000..275f969 --- /dev/null +++ b/app/views/themes/2003/layouts/menu.html.erb @@ -0,0 +1,33 @@ + diff --git a/config/application.rb b/config/application.rb index 119238e..b5812a0 100755 --- a/config/application.rb +++ b/config/application.rb @@ -59,5 +59,8 @@ module Fetsite # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' + # config.themes_for_rails.views_dir='app/assets/themes' + # config.themes_for_rails.assets_dir='app/assets/themes/assets' + end end diff --git a/config/initializers/themes_for_rails.rb b/config/initializers/themes_for_rails.rb new file mode 100644 index 0000000..91ea569 --- /dev/null +++ b/config/initializers/themes_for_rails.rb @@ -0,0 +1,9 @@ +ThemesForRails.config do |config| + # + # If you have placed your themes like the example path above within the asset pipeline: + config.themes_dir = 'app/assets/themes' + config.assets_dir = 'app/assets/assets/themes/:name' + config.views_dir = 'app/views/themes/:name' + config.use_sass=true +# ... +end diff --git a/config/routes.rb b/config/routes.rb index b1c1ae4..0b5b348 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,5 @@ Fetsite::Application.routes.draw do + themes_for_rails devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } resources :home, :only=>[:index] #get 'home',:controller=>home,:action=>:index,:as=>"home_index"