Skip to content

Commit

Permalink
Merge pull request #111 from anamariasosa/feature/rephrase-dash
Browse files Browse the repository at this point in the history
Feature/rephrase dash
  • Loading branch information
Alexander authored Aug 16, 2016
2 parents b88abda + f959573 commit e0e38aa
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 66 deletions.
61 changes: 38 additions & 23 deletions app/assets/stylesheets/layout/_dashboard.scss
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
$dash_blue: #4776E6;
$sidebar-bg: #34425A;
$sidebar-desktop: 175px;
$sidebar-mobile: 60px;
.dashboard {

background: -moz-linear-gradient(left, $dash_blue $sidebar-desktop, #ebeef0 $sidebar-desktop, #f5f5f5 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(left, $dash_blue $sidebar-desktop,#ebeef0 $sidebar-desktop, #f5f5f5 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to right, $dash_blue $sidebar-desktop,#ebeef0 $sidebar-desktop, #f5f5f5 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
background: linear-gradient(to right, $sidebar-bg $sidebar-desktop,#ebeef0 $sidebar-desktop, #f5f5f5 100%);
min-height: calc(100vh - 125px);

@include respond-to(s) {
background: -moz-linear-gradient(left, $dash_blue $sidebar-mobile, #ebeef0 $sidebar-mobile, #f5f5f5 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(left, $dash_blue $sidebar-mobile,#ebeef0 $sidebar-mobile, #f5f5f5 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to right, $dash_blue $sidebar-mobile,#ebeef0 $sidebar-mobile, #f5f5f5 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
background: linear-gradient(to right, $sidebar-bg $sidebar-mobile,#ebeef0 $sidebar-mobile, #f5f5f5 100%);
margin-top: 10px;
};

@include respond-to(xs) {
background: -moz-linear-gradient(left, $dash_blue $sidebar-mobile, #ebeef0 $sidebar-mobile, #f5f5f5 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(left, $dash_blue $sidebar-mobile,#ebeef0 $sidebar-mobile, #f5f5f5 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to right, $dash_blue $sidebar-mobile,#ebeef0 $sidebar-mobile, #f5f5f5 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
background: linear-gradient(to right, $sidebar-bg $sidebar-mobile,#ebeef0 $sidebar-mobile, #f5f5f5 100%);
margin-top: 10px;
};

// this style fix the margin from the footer to match the sidebar height
+ .footer {
margin-top: 0;
}

.container {
max-width: 100%;
}
Expand All @@ -51,18 +42,34 @@ $sidebar-mobile: 60px;
}

&__item {
border-bottom: 1px solid lighten($dash_blue, 5%);
border-bottom: 1px solid lighten($sidebar-bg, 5%);
width: 100%;
text-align: center;
text-align: left;

@include respond-to(s) {
text-align: center;
};

@include respond-to(xs) {
text-align: center;
};
}

&__link {
display: block;
padding: 25px 0 23px;
padding: 19px 0 17px 10px;
color: #fff;

@include respond-to(s) {
padding-left: 0;
};

@include respond-to(xs) {
padding-left: 0;
};

&:hover {
background: darken($dash_blue, 5%);
background: darken($sidebar-bg, 5%);
color: #fff;
text-decoration: none;
-webkit-box-shadow: inset 0px -3px 12px 0px rgba(0,0,0,0.15);
Expand All @@ -71,7 +78,7 @@ $sidebar-mobile: 60px;
}

&:active, &:focus {
background: darken($dash_blue, 5%);
background: darken($sidebar-bg, 5%);
color: #ccc;
text-decoration: none;
-webkit-box-shadow: inset 0px -3px 12px 0px rgba(0,0,0,0.15);
Expand All @@ -80,7 +87,16 @@ $sidebar-mobile: 60px;
}

.fa {
font-size: 22px;
font-size: 14px;
margin-right: 3px;

@include respond-to(s) {
font-size: 22px;
};

@include respond-to(xs) {
font-size: 22px;
};
}
}

Expand All @@ -91,10 +107,9 @@ $sidebar-mobile: 60px;
}

&__sidebar {
background: $dash_blue;
border-right: 1px solid lighten($sidebar-bg, 5%);
float: left;
width: $sidebar-desktop;
border-right: 1px solid lighten($dash_blue, 5%);

@include respond-to(s) {
overflow: hidden;
Expand Down
42 changes: 21 additions & 21 deletions app/views/products/_product.html.erb
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<% cache product do %>
<div class="col-sm-4 col-md-3 col-lg-3">
<div class="thumbnail productList">
<div class="productList__actions">
<a class="productList__zoom" href="<%= product.instagram_image %>" data-lightbox="image-1" data-title="<%= product.product_name %> - Valor: <%= number_to_currency product.price, precision:0 %>" >Zoom</a>
<span class="productList__separator">|</span>
<%= link_to 'Ver Más', product, class: "productList__more" %>
</div>
<div class="col-xs-6 col-sm-4 col-md-3 col-lg-3">
<div class="thumbnail productList">
<div class="productList__actions">
<a class="productList__zoom" href="<%= product.instagram_image %>" data-lightbox="image-1" data-title="<%= product.product_name %> - Valor: <%= number_to_currency product.price, precision:0 %>" >Zoom</a>
<span class="productList__separator">|</span>
<%= link_to 'Ver Más', product, class: "productList__more" %>
</div>

<%= link_to product do %>
<img src="<%= product.instagram_image %>" class="img-responsive" alt="product">
<% end %>
<%= link_to product do %>
<img src="<%= product.instagram_image %>" class="img-responsive" alt="product">
<% end %>

<div class="caption">
<h3 class="productList__name">
<%= link_to product.product_name, product, class: 'productList__link' %>
</h3>
<div class="caption">
<h3 class="productList__name">
<%= link_to product.product_name, product, class: 'productList__link' %>
</h3>

<p class="productList__price">
<%= number_to_currency product.price, precision: 0 %>
</p>
<p class="productList__price">
<%= number_to_currency product.price, precision: 0 %>
</p>

<p class="productList__by" >
<%= link_to product.store.name, store_path(product.store.slug), class: "productList__store" %>
</p>
<p class="productList__by" >
<%= link_to product.store.name, store_path(product.store.slug), class: "productList__store" %>
</p>

</div>
</div>
</div>
</div>
<% end %>
2 changes: 1 addition & 1 deletion app/views/products/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</p>

<div class="product-action--container text-right">
<%= link_to edit_product_path(@product) do %>
<%= link_to edit_stores_product_path(@product) do %>
<i class="product-action--item fa fa-pencil"></i>
<% end %>

Expand Down
1 change: 0 additions & 1 deletion app/views/shared/dashboard/_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<li class="dashboard__item">
<%= link_to new_contact_path, class: 'dashboard__link' do %>
<i class="fa fa-envelope"></i>
<br>
<span class="hidden-xs">Sugerencias</span>
<% end %>
</li>
Expand Down
9 changes: 3 additions & 6 deletions app/views/shared/menu/_customer_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
<li class="dashboard__item">
<%= link_to customers_dashboard_path, class: "dashboard__link js_instagramLoad" do %>
<i class="fa fa-home"></i>
<br>
<span class="hidden-xs">Dashboard</span>
<% end %>
</li>

<li class="dashboard__item">
<%= link_to customers_dashboard_orders_path, class: "dashboard__link" do %>
<i class="fa fa-shopping-bag"></i>
<br>
Productos comprados
<span class="hidden-xs">Mis Productos</span>
<% end %>
</li>

<li class="dashboard__item">
<%= link_to edit_user_registration_path, class: "dashboard__link " do %>
<i class="fa fa-pencil"></i>
<br>
<span class="hidden-xs">Editar mi información</span>
<i class="fa fa-pencil-square"></i>
<span class="hidden-xs">Información</span>
<% end %>
</li>
22 changes: 8 additions & 14 deletions app/views/shared/menu/_store_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,47 +1,41 @@
<li class='dashboard__item'>
<%= link_to stores_dashboard_path, class: 'dashboard__link' do %>
<i class="fa fa-home"></i>
<br>
<span class="hidden-xs">Dashboard</span>
<% end %>
</li>

<li class='dashboard__item'>
<%= link_to stores_instagram_media_path, class: 'dashboard__link js_instagramLoad' do %>
<i class="fa fa-plus"></i>
<br>
<span class="hidden-xs">Crear un producto</span>
<span class="hidden-xs">Crear Producto</span>
<% end %>
</li>

<li class='dashboard__item'>
<%= link_to stores_products_path, class: "dashboard__link" do %>
<i class="fa fa-shopping-basket"></i>
<br>
<span class="hidden-xs">Productos de la tienda</span>
<span class="hidden-xs">Ver Productos</span>
<% end %>
</li>

<li class='dashboard__item'>
<%= link_to stores_orders_path, class: "dashboard__link" do %>
<i class="fa fa-paper-plane"></i>
<br>
<span class="hidden-xs">Reporte de órdenes</span>
<span class="hidden-xs">Ver Órdenes</span>
<% end %>
</li>

<li class='dashboard__item'>
<%= link_to edit_user_registration_path, class: "dashboard__link" do %>
<i class="fa fa-pencil"></i>
<br>
<span class="hidden-xs">Editar mi información</span>
<i class="fa fa-pencil-square"></i>
<span class="hidden-xs">Información</span>
<% end %>
</li>

<li class='dashboard__item'>
<%= link_to store_path(current_user), class: "dashboard__link" do %>
<i class="fa fa-eye"></i>
<br>
<span class="hidden-xs">Ver mi tienda</span>
<%= link_to store_path(current_user), class: "dashboard__link", target: '_blank' do %>
<i class="fa fa-external-link-square"></i>
<span class="hidden-xs">Ver Tienda</span>
<% end %>
</li>

0 comments on commit e0e38aa

Please sign in to comment.