Skip to content

Instantly share code, notes, and snippets.

@coopermaruyama
Created September 20, 2012 23:06
Show Gist options
  • Save coopermaruyama/3758878 to your computer and use it in GitHub Desktop.
Save coopermaruyama/3758878 to your computer and use it in GitHub Desktop.
Vapor Spree Theme
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. 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 store/spree_core
*= require store/spree_promo
*= require_self
*= require_tree .
*/
#logo a img { /* CHANGE THIS TO FIT YOUR LOGO */
margin-top: 9px;
width: 70%;
}
#header {
height: 55px;
background: black;
position: fixed;
top: 0;
width: 100%;
z-index: 9999999;
}
#wrapper {
margin-top: 115px;
}
body nav.alpha.omega.sixteen.columns {
top: 55px;
height: 31px;
background: #CCC;
width: 100%;
position: fixed;
z-index: 999999;
}
ul#main-nav-bar {
float: left;
margin-top: 6px;
font-weight: bold;
font-size: 14px;
text-transform: uppercase;
color: black;
width: 600px;
}
#taxon {
width: 11%;
font-size: 11px;
border-radius: 4px;
}
input#keywords {
width: 16%;
height: 41%;
border-radius: 5px;
}
input#main-search-button {
font-size: 12px;
width: 6%;
padding: 1px;
}
form#main-search-form {
margin-top: 5px;
}
ul#main-nav-bar {
border: none
}
ul#products li {
text-align: center;
font-weight: bold;
margin-bottom: 20px;
position: relative;
border-radius: 4px;
padding: 2px 2px 15px 2px;
border: 1px solid #E7E7E7;
width: 150px;
}
ul#products li a.info {
height: 35px;
margin-top: 5px;
font-size: 12px;
color: #BBB;
overflow: hidden;
text-align: center;
color: black;
border:none;
position: relative;
z-index: 5;
}
ul#products li .price {
color: #58C51A;
font-size: 16px;
padding-top: 5px;
display: block;
text-align: center;
}
ul#products li .product-image {
border: none;
padding: 5px;
min-height: 110px;
background-color: white;
z-index:5;
position:relative;
}
ul#products span.overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, white), color-stop(1, black));
background-image: -webkit-linear-gradient(top, white, black);
background-image: -moz-linear-gradient(top, white, black);
background-image: -ms-linear-gradient(top, white, black);
background-image: -o-linear-gradient(top, white, black);
background-image: linear-gradient(top, bottom, white, black);
z-index: 0;
opacity: .025;
}
ul#products li:hover {
box-shadow: 0px 1px 3px #bbe8f3;
}
Deface::Override.new(
:virtual_path => 'spree/layouts/spree_application',
:name => 'move-header',
:insert_before => "div.container",
:cut => "code[erb-loud]:contains('spree/shared/header')"
)
Deface::Override.new(
:virtual_path => 'spree/shared/_header',
:name => 'wrap-header',
:surround_contents => "header#header",
:text => '<div class="container"><%= render_original %></div>')
Deface::Override.new(
:virtual_path => 'spree/shared/_nav_bar',
:name => 'add-home-link',
:insert_top => 'ul#nav-bar',
:text => '<li id="home-link" data-hook><%= link_to t(:home), root_path %></li>')
Deface::Override.new(
:virtual_path => 'spree/shared/_nav_bar',
:name => 'add-cart',
:insert_bottom => 'ul#nav-bar',
:text => '<li id="link-to-cart" data-hook><%= link_to_cart %></li>')
Deface::Override.new(
:virtual_path => 'spree/shared/_main_nav_bar',
:name => 'remove-home-from-main-nav',
:remove => 'li#home-link')
Deface::Override.new(
:virtual_path => 'spree/shared/_main_nav_bar',
:name => 'remove-cart-from-main-nav',
:remove => 'li#link-to-cart')
Deface::Override.new(
:virtual_path => 'spree/shared/_header',
:name => 'move-main-nav',
:insert_after => '#header',
:partial => 'spree/shared/main_nav_bar'
)
Deface::Override.new(
:virtual_path => 'spree/shared/_nav_bar',
:name => 'remove-search-from-top',
:remove => 'li#search-bar')
Deface::Override.new(
:virtual_path => 'spree/shared/_header',
:name => 'remove-main-nav-from-tsop',
:remove => "code[erb-loud]:contains('main_nav_bar')")
Deface::Override.new(
:virtual_path => 'spree/shared/_main_nav_bar',
:name => 'wrap-main-nav',
:surround_contents => 'nav.columns',
:text => '<div class="container"><%= render_original =></div>')
Deface::Override.new(
:virtual_path => 'spree/shared/_main_nav_bar',
:name => 'search-main-nav-move',
:insert_after => '#main-nav-bar',
:text => '<% @taxons = @taxon && @taxon.parent ? @taxon.parent.children : Spree::Taxon.roots %>
<%= form_tag products_path, :method => :get, :id => "main-search-form" do %>
<%= select_tag :taxon,
options_for_select([[t(:all_departments), '']] +
@taxons.map {|t| [t.name, t.id]},
@taxon ? @taxon.id : params[:taxon]) %>
<%= search_field_tag :keywords, params[:keywords], :placeholder => t(:search) %>
<%= submit_tag t(:search), :name => nil, :id => "main-search-button" %>
<% end %>')
# products
Deface::Override.new(
:virtual_path => "spree/shared/_products",
:name => 'move-poduct-title-above-image',
:insert_before => 'div.product-image',
:cut => "code[erb-loud]:contains('link_to truncate(product.name, :length => 50)')")
Deface::Override.new(
:virtual_path => 'spree/shared/_products',
:name => "gradient-overlay-to-products",
:insert_after => "span.price.selling",
:text=>"<span class='overlay'></span>")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment