Permalink
Browse files

Initial project layout. Vendored sass port of bootstrap. Started on i…

…nitial change to body & layout to create a style that shows the nav with twitters navbar
  • Loading branch information...
andrewmp1 committed Feb 14, 2012
0 parents commit 6ea8d396d315f93eabee56579761010defe4b35a
Showing with 7,238 additions and 0 deletions.
  1. +10 −0 .gitignore
  2. +1 −0 .rspec
  3. +13 −0 Gemfile
  4. +26 −0 LICENSE
  5. +84 −0 README.md
  6. +29 −0 Rakefile
  7. +5 −0 Versionfile
  8. +1 −0 app/assets/javascripts/admin/spree_bootstrap_theme.js
  9. +3 −0 app/assets/javascripts/store/spree_bootstrap_theme.js
  10. +3 −0 app/assets/stylesheets/admin/spree_bootstrap_theme.css
  11. +191 −0 app/assets/stylesheets/store/_extras.css.scss
  12. +17 −0 app/assets/stylesheets/store/_forms.css.scss
  13. +191 −0 app/assets/stylesheets/store/_media_queries.css.scss
  14. +16 −0 app/assets/stylesheets/store/_navbar.css.scss
  15. +150 −0 app/assets/stylesheets/store/_products.css.scss
  16. +101 −0 app/assets/stylesheets/store/_spree_bootstrap_mixins.css.scss
  17. +421 −0 app/assets/stylesheets/store/_spree_core.css.scss
  18. 0 app/assets/stylesheets/store/_spree_variables.css.scss
  19. +5 −0 app/assets/stylesheets/store/spree_bootstrap.css.scss
  20. +3 −0 app/assets/stylesheets/store/spree_bootstrap_theme.css
  21. +6 −0 app/overrides/add_class_to_search.rb
  22. +51 −0 app/overrides/replace_body.rb
  23. +16 −0 lib/generators/spree_bootstrap_theme/install/install_generator.rb
  24. +2 −0 lib/spree_bootstrap_theme.rb
  25. +25 −0 lib/spree_bootstrap_theme/engine.rb
  26. +32 −0 spec/spec_helper.rb
  27. +26 −0 spree_bootstrap_theme.gemspec
  28. BIN vendor/assets/images/glyphicons-halflings-white.png
  29. BIN vendor/assets/images/glyphicons-halflings.png
  30. +91 −0 vendor/assets/javascripts/bootstrap-alert.js
  31. +98 −0 vendor/assets/javascripts/bootstrap-button.js
  32. +154 −0 vendor/assets/javascripts/bootstrap-carousel.js
  33. +136 −0 vendor/assets/javascripts/bootstrap-collapse.js
  34. +92 −0 vendor/assets/javascripts/bootstrap-dropdown.js
  35. +210 −0 vendor/assets/javascripts/bootstrap-modal.js
  36. +95 −0 vendor/assets/javascripts/bootstrap-popover.js
  37. +125 −0 vendor/assets/javascripts/bootstrap-scrollspy.js
  38. +130 −0 vendor/assets/javascripts/bootstrap-tab.js
  39. +270 −0 vendor/assets/javascripts/bootstrap-tooltip.js
  40. +51 −0 vendor/assets/javascripts/bootstrap-transition.js
  41. +271 −0 vendor/assets/javascripts/bootstrap-typeahead.js
  42. +12 −0 vendor/assets/javascripts/bootstrap.js
  43. +66 −0 vendor/assets/stylesheets/_bootstrap.scss
  44. +327 −0 vendor/assets/stylesheets/_responsive.scss
  45. +28 −0 vendor/assets/stylesheets/bootstrap/_accordion.scss
  46. +70 −0 vendor/assets/stylesheets/bootstrap/_alerts.scss
  47. +22 −0 vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss
  48. +146 −0 vendor/assets/stylesheets/bootstrap/_button-groups.scss
  49. +165 −0 vendor/assets/stylesheets/bootstrap/_buttons.scss
  50. +121 −0 vendor/assets/stylesheets/bootstrap/_carousel.scss
  51. +18 −0 vendor/assets/stylesheets/bootstrap/_close.scss
  52. +44 −0 vendor/assets/stylesheets/bootstrap/_code.scss
  53. +18 −0 vendor/assets/stylesheets/bootstrap/_component-animations.scss
  54. +131 −0 vendor/assets/stylesheets/bootstrap/_dropdowns.scss
  55. +515 −0 vendor/assets/stylesheets/bootstrap/_forms.scss
  56. +8 −0 vendor/assets/stylesheets/bootstrap/_grid.scss
  57. +20 −0 vendor/assets/stylesheets/bootstrap/_hero-unit.scss
  58. +16 −0 vendor/assets/stylesheets/bootstrap/_labels.scss
  59. +17 −0 vendor/assets/stylesheets/bootstrap/_layouts.scss
  60. +519 −0 vendor/assets/stylesheets/bootstrap/_mixins.scss
  61. +73 −0 vendor/assets/stylesheets/bootstrap/_modals.scss
  62. +292 −0 vendor/assets/stylesheets/bootstrap/_navbar.scss
  63. +344 −0 vendor/assets/stylesheets/bootstrap/_navs.scss
  64. +30 −0 vendor/assets/stylesheets/bootstrap/_pager.scss
  65. +64 −0 vendor/assets/stylesheets/bootstrap/_pagination.scss
  66. +49 −0 vendor/assets/stylesheets/bootstrap/_popovers.scss
  67. +95 −0 vendor/assets/stylesheets/bootstrap/_progress-bars.scss
  68. +126 −0 vendor/assets/stylesheets/bootstrap/_reset.scss
  69. +29 −0 vendor/assets/stylesheets/bootstrap/_scaffolding.scss
  70. +156 −0 vendor/assets/stylesheets/bootstrap/_sprites.scss
  71. +139 −0 vendor/assets/stylesheets/bootstrap/_tables.scss
  72. +35 −0 vendor/assets/stylesheets/bootstrap/_thumbnails.scss
  73. +35 −0 vendor/assets/stylesheets/bootstrap/_tooltip.scss
  74. +217 −0 vendor/assets/stylesheets/bootstrap/_type.scss
  75. +23 −0 vendor/assets/stylesheets/bootstrap/_utilities.scss
  76. +100 −0 vendor/assets/stylesheets/bootstrap/_variables.scss
  77. +17 −0 vendor/assets/stylesheets/bootstrap/_wells.scss
@@ -0,0 +1,10 @@
+\#*
+*~
+.#*
+.DS_Store
+.idea
+.project
+tmp
+nbproject
+*.swp
+spec/dummy
1 .rspec
@@ -0,0 +1 @@
+--colour
13 Gemfile
@@ -0,0 +1,13 @@
+source 'http://rubygems.org'
+
+group :test do
+ gem 'ffaker'
+end
+
+if RUBY_VERSION < "1.9"
+ gem "ruby-debug"
+else
+ gem "ruby-debug19"
+end
+
+gemspec
26 LICENSE
@@ -0,0 +1,26 @@
+Copyright (c) 2012 [name of plugin creator]
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name Spree nor the names of its contributors may be used to
+ endorse or promote products derived from this software without specific
+ prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,84 @@
+SpreeBootstrapTheme
+===================
+
+Spree_bootstrap_theme is based on twitter's bootstrap project ported to sass.
+
+
+http://twitter.github.com/bootstrap/download.html#plugins
+
+
+Warning, alpha quality. Doesn't work yet!
+
+
+This project is being built against spree version 1.0 and greater
+
+
+Spree uses Skeleton as a lightweight css framework. With the different naming conventions in skeleton and spree with regards to bootstrap this project uses sass mixins as a bridge and where that doesn't completely work some deface overrides to views to enable bootstrap naming conventions.
+
+
+Some quick notes on the differences in the css markup conventions:
+
+
+| spree/skeleton | bootstrap |
+
+| :-----------------------: | :-----------------------: |
+
+| grid=960/16 | grid=940/12 |
+
+| button=.button | button=.btn |
+
+| flash=.flash | flash=.alert |
+
+
+
+Install
+=======
+
+gem 'spree_bootstrap_theme', :git => 'git://github.com/andrewmp1/spree_bootstrap_theme.git'
+NOTE: It's important that you add this line at the bottom of the Gemfile, or at least AFTER any other extension/engine/gem that you'd like to theme (i.e. Spree)
+
+Make sure you remove any includes in your stylesheets to the spree core stylesheets.
+
+From the bootstrap-sass page. The theme vendors bootstrap in the same way as the gem bootstrap-sass:
+
+# Notes from Bootstrap for SASS
+
+`bootstrap-sass` is an SASS-powered version of [Twitter's Bootstrap](http://github.com/twitter/bootstrap), ready to drop right into your SASS powered applications.
+
+Enjoy.
+
+## Usage
+
+#### CSS
+
+Import "bootstrap" in your SCSS file of choice to get all of Bootstrap's styles, mixins and variables! Don't use Sproket's `//= require` directives for SASS files, because they're horrible and will kill your cat.
+
+ @import "bootstrap";
+
+Need to configure a variable or two? Simple define the value of the variable you want to change *before* importing Bootstrap. SASS will be awesome and respect your existing definition rather than overwriting it with the Bootstrap defaults. A list of customisable variables can be found in the [Bootstrap documentation](http://twitter.github.com/bootstrap/less.html#variables).
+
+ $primaryButtonBackground: #f00;
+ @import "bootstrap";
+
+#### Javascripts
+
+You can include the Bootstrap javascripts through two methods. In this case, Sproket's `//= require` directives are useful and will not cause feline death.
+
+We have a helper that includes all available javascripts:
+
+ // Loads all Bootstrap javascripts
+ //= require bootstrap
+
+You can also load individual modules, provided you sort out any related dependencies.
+
+ //= require bootstrap-scrollspy
+ //= require bootstrap-modal
+ //= require bootstrap-dropdown
+
+Testing
+-------
+
+#TODO
+
+
+Copyright (c) 2012 Drew Purdy, released under the New BSD License
@@ -0,0 +1,29 @@
+require 'rake'
+require 'rake/testtask'
+require 'rake/packagetask'
+require 'rubygems/package_task'
+require 'rspec/core/rake_task'
+require 'spree/core/testing_support/common_rake'
+
+RSpec::Core::RakeTask.new
+
+task :default => [:spec]
+
+spec = eval(File.read('spree_bootstrap_theme.gemspec'))
+
+Gem::PackageTask.new(spec) do |p|
+ p.gem_spec = spec
+end
+
+desc "Release to gemcutter"
+task :release => :package do
+ require 'rake/gemcutter'
+ Rake::Gemcutter::Tasks.new(spec).define
+ Rake::Task['gem:push'].invoke
+end
+
+desc "Generates a dummy app for testing"
+task :test_app do
+ ENV['LIB_NAME'] = 'spree_bootstrap_theme'
+ Rake::Task['common:test_app'].invoke
+end
@@ -0,0 +1,5 @@
+# This file is used to designate compatibilty with different versions of Spree
+# Please see http://spreecommerce.com/documentation/extensions.html#versionfile for details
+
+"1.0.x" => { :branch => "master"}
+
@@ -0,0 +1 @@
+//= require admin/spree_core
@@ -0,0 +1,3 @@
+//= require bootstrap
+//= require_tree .
+
@@ -0,0 +1,3 @@
+/*
+ *= require admin/spree_core
+*/
@@ -0,0 +1,191 @@
+/*--------------------------------------*/
+/* Main search bar
+/*--------------------------------------*/
+#search-bar {
+ display: block;
+}
+
+/*--------------------------------------*/
+/* Navigation
+/*--------------------------------------*/
+nav#top-nav-bar {
+ text-align: right;
+ margin-top: 20px;
+
+ ul {
+ li {
+ margin-bottom: 5px;
+ padding-left: 10px;
+
+ a{
+ font-weight: bold;
+ font-size: 14px;
+ text-transform: uppercase;
+ }
+ }
+ }
+}
+
+nav #main-nav-bar {
+ text-transform: uppercase;
+ font-weight: bold;
+ margin-top: 20px;
+ border-bottom: 1px solid $c_border;
+ padding-bottom: 6px;
+
+ li {
+ a {
+ font-size: 16px;
+ padding: 5px;
+ }
+
+ &#link-to-cart {
+ float: right;
+ padding-left: 24px;
+ background: url("cart.png") no-repeat left center;
+
+ &:hover {
+ border-color: $c_colored;
+
+ .amount {
+ border-color: $c_colored;
+ }
+ }
+
+ a {
+ font-weight: normal;
+ font-size: 16px;
+ color: $c_colored;
+
+ .amount {
+ font-size: 18px;
+ font-weight: bold;
+ border-left: 1px solid $c_border;
+ padding-left: 5px;
+ padding-bottom: 8px;
+ }
+ }
+ }
+ }
+}
+
+nav#taxonomies {
+ .taxonomy-root {
+ text-transform: uppercase;
+ border-bottom: 1px solid $c_border;
+ margin-bottom: 5px;
+ color: $c_colored;
+ }
+
+ .taxons-list {
+ padding-left: 20px;
+ margin-bottom: 20px;
+ list-style: disc outside;
+ }
+}
+
+/*--------------------------------------*/
+/* Forms
+/*--------------------------------------*/
+textarea, input[type="date"],
+input[type="datetime"], input[type="datetime-local"],
+input[type="email"], input[type="month"], input[type="number"],
+input[type="password"], input[type="search"], input[type="tel"],
+input[type="text"], input[type="time"], input[type="url"],
+input[type="week"] {
+ border: 1px solid $c_border;
+ padding: 2px 5px;
+ font-family: "Ubuntu", sans-serif;
+
+ &:active, &:focus {
+ border-color: $c_colored;
+ outline: none;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ -o-box-shadow: none;
+ box-shadow: none;
+ }
+
+ &.error {
+ border-color: $c_red;
+ }
+}
+
+select {
+ border: 1px solid $c_border;
+ font-family: "Ubuntu", sans-serif;
+ background-image: url('select_arrow.gif');
+ background-repeat: no-repeat;
+ background-position: right center;
+
+ &:active, &:focus {
+ @extend input[type="text"]:focus
+ }
+}
+
+label.error {
+ display: block;
+ font-size: 11px;
+ color: $c_red;
+ margin-top: 3px;
+}
+
+input[type="submit"], input[type="button"],
+input[type= "reset"], button, a.button {
+ background-color: $c_colored;
+ background-image: none;
+ text-shadow: none;
+ color: white;
+ font-weight: bold;
+ font-family: "Ubuntu", sans-serif;
+ border: 1px solid rgba(0, 138, 189, .75);
+ -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
+ -khtml-box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
+ -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
+ -ms-box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
+ -o-box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
+ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
+ -webkit-border-radius: 0px;
+ -khtml-border-radius: 0px;
+ -moz-border-radius: 0px;
+ -ms-border-radius: 0px;
+ -o-border-radius: 0px;
+ border-radius: 0px;
+
+ // font-size: 13px;
+ vertical-align: text-top;
+
+ &.large {
+ padding: 7px 10px;
+ font-size: 14px;
+ }
+
+ &:hover {
+ background-image: none;
+ background-color: $c_base;
+ border-color: $c_base;
+ color: white !important;
+ }
+}
+
+.ie8 {
+ a.button {
+ line-height: 16px;
+ }
+}
+
+input[type="checkbox"], input[type="button"],
+input[type="submit"], input[type="reset"],
+button, label {
+ vertical-align: middle;
+}
+
+a.button {
+ display: inline-block;
+ line-height: 15px;
+ margin-top: -2px;
+ vertical-align: bottom;
+}
+
+
+
@@ -0,0 +1,17 @@
+/*--------------------------------------*/
+/* Forms
+/*--------------------------------------*/
+textarea, input[type="date"],
+input[type="datetime"], input[type="datetime-local"],
+input[type="email"], input[type="month"], input[type="number"],
+input[type="password"], input[type="search"], input[type="tel"],
+input[type="text"], input[type="time"], input[type="url"],
+input[type="week"] {
+ border: 1px solid $c_border;
+ padding: 2px 5px;
+ font-family: "Ubuntu", sans-serif;
+
+ &.error {
+ border-color: $c_red;
+ }
+}
Oops, something went wrong.

0 comments on commit 6ea8d39

Please sign in to comment.