Skip to content

Commit

Permalink
Product zoomer #157800318 (#141)
Browse files Browse the repository at this point in the history
Product Page UI
  • Loading branch information
jaypal412 authored and pkrawat1 committed Jun 13, 2018
1 parent fbeb179 commit dcbdef8
Show file tree
Hide file tree
Showing 39 changed files with 1,561 additions and 433 deletions.
390 changes: 68 additions & 322 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@
"main": "index.js",
"repository": "[email protected]:aviabird/angularspree.git",
"author": "Pankaj Rawat <[email protected]>"
}
}
5 changes: 2 additions & 3 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { HttpModule } from '@angular/http';
import { RouterModule, PreloadAllModules } from '@angular/router';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';


// Components
import { AppComponent } from './app.component';
// Routes
Expand Down Expand Up @@ -39,8 +38,7 @@ import 'rxjs/add/observable/of';
declarations: [
AppComponent,
CheckoutHeaderComponent,
CheckoutFooterComponent,

CheckoutFooterComponent,
],
imports: [
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }),
Expand Down Expand Up @@ -77,6 +75,7 @@ import 'rxjs/add/observable/of';
DragScrollModule,
CoreModule,
SharedModule,

],
providers: [],
bootstrap: [AppComponent]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
</div>
</div>
</div>
</section>
</section>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../../../shared/scss/_selected_theme_variables.scss";
@import "../../../../shared/scss/selected_theme_variables";
.line {
display: inline;
padding: 10px;
Expand All @@ -10,24 +10,26 @@
}

.contact-info {
background-color: #a3d032;
background-color: $theme-main-sub-color1;
padding: 1rem;
color: #fff;
font-size: 1.2em;
font-weight: 700;
color: $white;
font-size: 1em;
font-weight: normal;
a {
padding: .7rem;
color: #fff;
color: $white;
}
a:hover {
background-color: #a3d032 - 40;
background-color: $theme-main-color - 40;
border-radius: 4px;
}
.backtopbtn {
background-color: #a3d032 - 40;
background-color: $theme-main-sub-color2;
border-radius: 4px;
text-decoration: none;
padding: 0.7rem 1.8rem;
color: $white;
cursor: pointer;
}
}

Expand All @@ -38,11 +40,12 @@
color: #fff;
}
.backtopbtn {
background-color: #a3d032 - 40;
background-color: $theme-main-color + 40;
border-radius: 4px;
text-align: center;
text-decoration: none;
padding: 0.7rem 1.8rem;
color: $theme-action-color;
}
}
}
Expand All @@ -55,4 +58,4 @@
display: block
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
@import "../../../../shared/scss/selected_theme_variables";

a {
color: $gray-700;
}

.line {
display: inline;
padding: 10px;
Expand All @@ -15,4 +21,4 @@ $break-small: 320px;
display: inline-block;
text-align: left;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
@import "../../../../shared/scss/selected_theme_variables";

a {
color: $gray-700;
}

.line {
display: inline;
padding: 10px;
Expand All @@ -13,4 +19,4 @@ $break-small: 320px;
text-align: center
}

}
}
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
<div itemscope itemtype="https://schema.org/Product" *ngIf="product != null" class="row padding-top mt-5 pt-5">
<div itemscope itemtype="https://schema.org/Product" *ngIf="product != null" class="row pt-5">

<div class="col-12 col-md-6">
<div class="fav-icon-sontainer">
<div class="col-12 col-md-5">
<!-- <div class="fav-icon-sontainer">
<a (click)="markAsFavorite()" class="favorite">
<i class="fa fa-heart"></i>
</a>
</div>
</div> -->
<app-image-container [images]="images" class="col-12" [selectedImage]="images[0]">
</app-image-container>
</div>
<div class="col-md-6 col-12">
<div class="col-md-7 col-12">

<app-product-price-info [product]="product" class="row">
</app-product-price-info>

<app-product-variants [customOptionTypesHash]="customOptionTypesHash" [currentSelectedOptions]="currentSelectedOptions" (onOptionClickEvent)="onOptionClick($event)"
[correspondingOptions]="correspondingOptions" [mainOptions]="mainOptions" class="row"></app-product-variants>
<app-product-variants [customOptionTypesHash]="customOptionTypesHash" [currentSelectedOptions]="currentSelectedOptions" (onOptionClickEvent)="onOptionClick($event)"
[correspondingOptions]="correspondingOptions" [mainOptions]="mainOptions" class="row"></app-product-variants>

<div class="row col-12">
<!-- <div class="row col-12">
<button (click)="addToCart()" class="pdp-add-to-bag pdp-button">ADD TO BAG</button>
</div>
</div> -->



<app-product-description [description]="product.description" class="row">
</app-product-description>

</div>

</div>
</div>
<div class="row">
<div class="col-12">
<h1>
Description
</h1>
<app-product-description [description]="product.description" class="row">
</app-product-description>
</div>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
</div>
</div>
<div class="col-11">
<img itemprop="image" [src]="getProductImageUrl(selectedImage.large_url)" [alt]="selectedImage.alt" class="thumbnails-selected-image img-fluid"
/>
<!-- <img itemprop="image" [zoomable]='zoomOptions' [src]="getProductImageUrl(selectedImage.large_url)" [alt]="selectedImage.alt" class="thumbnails-selected-image img-fluid" -->
<img itemprop="image" [zoomable]='zoomOptions' [zoomableSrc]='getProductImageUrl(selectedImage.large_url)' [src]="getProductImageUrl(selectedImage.large_url)"
[alt]="selectedImage.alt" class="thumbnails-selected-image img-fluid">

</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,17 @@
margin-bottom: 10px;
}
}
}
img {
display: block;
}

.img1 {
width: 400px;
height: 274px;
}

.img2 {
width: 200px;
height: 020px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ import { environment } from './../../../../../environments/environment';
import { Product } from './../../../../core/models/product';
import { Component, OnInit, Input } from '@angular/core';

const img1 = require('../../../../../assets/thumbnail.jpg');
const img2 = require('../../../../../assets/thumbnail2.jpg');

@Component({
selector: 'app-image-container',
templateUrl: './product-images.component.html',
styleUrls: ['./product-images.component.scss']
})
export class ProductImagesComponent implements OnInit {
imageSource1 = img1;
imageSource2 = img2;
@Input() images: Image[] = null;
@Input() selectedImage: Image = null;
constructor() { }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<div class="bordered">
<div class="buybox__purchase">
<form>
<div>
<div class="buy-quantity">
<a class="cw-btn quantity-minus" (click)="decreaseCount()">-</a>
<span class="quantity-input">
<span class="quantity-number">{{count}}</span>
<span>Quantity</span>
</span>
<a class="cw-btn quantity-plus" (click)="increseCount()">+</a>
</div>
</div>
<div class="buttons">
<input type="submit" class="cw-btn cw-btn--action cw-btn--full js-add-cart" value="Add to Cart">
</div>
</form>
</div>
<a href="#" class="buybox__favorite">
<span class="">
<i class="fa fa-heart"></i> Add to Favorites</span>
</a>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
@import "../../../../../shared/scss/selected_theme_variables";
.cw-btn {
position: relative;
display: inline-block;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-appearance: none;
cursor: pointer;
background: none;
font-family: Roboto, Arial, sans-serif;
font-size: 18px;
-webkit-font-smoothing: antialiased;
line-height: 1;
font-weight: 400;
text-align: center;
text-decoration: none;
white-space: nowrap;
padding: 13px 35px 15px;
margin-right: 15px;
outline: none;
border: 1px solid transparent;
-webkit-border-radius: 4px;
border-radius: 4px;
-webkit-transition: all, .4s, ease-out;
transition: all, .4s, ease-out;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}

#buybox {
float: left;
width: 40%;
.cw-btn--action {
background-color: $theme-action-sub-color3;
background: -webkit-gradient(linear, left top, left bottom, from($theme-action-sub-color3), color-stop(45%, $theme-action-sub-color3), to($theme-action-sub-color1));
background: linear-gradient(180deg, $theme-action-sub-color3 0, ef$theme-action-sub-color3 45%, $theme-action-sub-color1);
color: #fff;
font-weight: 500;
border: 1px solid rgba(0, 0, 0, .3);
-webkit-box-shadow: 0 1px 0 0 $gray-12;
box-shadow: 0 1px 0 0 $gray-12;
width: 100%;
}
.bordered {
background-color: $gray-100;
border: 1px solid $gray-10;
-webkit-border-radius: 5px;
border-radius: 5px;
.buybox__favorite {
font-size: 1.1rem;
display: block;
text-align: center;
padding: 16px 20px;
background: $white;
border-top: 1px solid $gray-10;
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
.buybox__purchase {
padding: 20px;
.buy-quantity {
display: block;
margin-bottom: 15px;
border: 1px solid $gray-10;
-webkit-box-shadow: 0 1px 0 $gray-10;
box-shadow: 0 1px 0 $gray-10;
-webkit-border-radius: 4px;
border-radius: 4px;
overflow: hidden;
.quantity-input {
width: 33.33333%;
float: left;
border: 1px solid;
border-color: $white;
background-color: $white;
position: relative;
.quantity-number {
top: 0;
bottom: auto;
font-size: 1.2em;
}
span {
display: block;
text-align: center;
font-size: .8em;
color: $gray-800;
}
}
a.quantity-minus {
font-size: 2.4em;
line-height: 1.3em;
}
a.disabled {
cursor: default;
background: #f2f2f2;
color: #ddd;
}
a {
width: 33.33333%;
float: left;
height: 50px;
padding: 0;
margin: 0;
line-height: 50px;
font-weight: 400;
font-size: 1.7em;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 0;
border-radius: 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
}
}
}
}
Loading

0 comments on commit dcbdef8

Please sign in to comment.