diff --git a/src/app/core/services/product.service.ts b/src/app/core/services/product.service.ts index 6e74d2c1..7494a356 100644 --- a/src/app/core/services/product.service.ts +++ b/src/app/core/services/product.service.ts @@ -34,7 +34,7 @@ export class ProductService { * * @memberof ProductService */ - getTaxonomies(): any { return this.http.get>(`api/v1/taxonomies`) } + getTaxonomies(): any { return this.http.get>(`api/v1/taxonomies?set=nested`) } /** * diff --git a/src/app/home/content/product-list/product-list.component.scss b/src/app/home/content/product-list/product-list.component.scss index 2135c3dc..7219b676 100644 --- a/src/app/home/content/product-list/product-list.component.scss +++ b/src/app/home/content/product-list/product-list.component.scss @@ -9,12 +9,17 @@ -webkit-transition: visibility 0s, opacity .5s linear; transition: visibility 0s, opacity .5s linear; visibility: hidden; - opacity: 0; + opacity: 1; } .product-base { flex: 0 0 23%; max-width: 23%; + @media screen and (min-width: 320px) and (max-width: 767px) { + margin:0px !important; + flex: 0 0 100%; + max-width: 100%; + } text-align: left; position: relative; background-color: $white; @@ -25,7 +30,7 @@ transition: all 500ms; border: 1px solid $gray-600; // margin: 0 30px 20px 0; box-shadow: 0px 0px 1px #ccc; - &:hover{ + &:hover { box-shadow: 0px 0px 3px #ccc; } a { @@ -69,6 +74,7 @@ } } } + .morechoices { background-color: $gray-400; color: $white; @@ -77,11 +83,12 @@ padding: .2rem; text-align: center; } + .shipping { font-size: 0.8em; font-weight: 400; text-align: left; margin-top: 15px; - color: #000; + color: $black; margin-bottom: 0px; } \ No newline at end of file diff --git a/src/app/home/filter-mobile-menu/filter-mobile-menu.component.html b/src/app/home/filter-mobile-menu/filter-mobile-menu.component.html new file mode 100644 index 00000000..50b47e17 --- /dev/null +++ b/src/app/home/filter-mobile-menu/filter-mobile-menu.component.html @@ -0,0 +1,69 @@ + + + Yes + + No +

Supply

+

Demand

+ + + + +
+ I can have markup! + Some HTML here +
+ +
+
+ + +
+ {{taxon.name}} + Some HTML here +
+
+ + +
+ {{subtaxon.name}} +
+
+ {{ subsubtaxon.name }} +
+
+
+
+
+ +
+
+
+ +
+ +
+ I can have markup, too! +
+ And some HTML here +
+
\ No newline at end of file diff --git a/src/app/home/filter-mobile-menu/filter-mobile-menu.component.scss b/src/app/home/filter-mobile-menu/filter-mobile-menu.component.scss new file mode 100644 index 00000000..0d0a7c55 --- /dev/null +++ b/src/app/home/filter-mobile-menu/filter-mobile-menu.component.scss @@ -0,0 +1,54 @@ +@import '../../shared/scss/selected_theme_variables'; +ul { + + list-style: none; + padding: 0.5rem 0 0.5rem 0; + margin: 0px; + li { + padding: 0.8rem 1.1rem; + border-bottom: 1px solid $gray-10; + color: $gray-900; + cursor: pointer; + &::after { + font-family: 'FontAwesome'; + content: "\f105"; + width: 20px; + height: 57px; + margin-right: 12px; + right: 0px; + position: absolute; + background-size: 10px; + } + + } +} + +.parrent-catgory { + width: 100vw; + left: 0vw; + position: relative; +} + +.sub-catgory { + @extend .parrent-catgory; + left: -100vw; +} + +.sub-sub-catgory { + @extend .parrent-catgory; +} + +.radio-pink [type="radio"]:checked+label:after { + border-color: #e91e63; + background-color: #e91e63; +} +/*Gap*/ + +.radio-pink-gap [type="radio"].with-gap:checked+label:before { + border-color: #e91e63; +} + +.radio-pink-gap [type="radio"]:checked+label:after { + border-color: #e91e63; + background-color: #e91e63; +} diff --git a/src/app/home/filter-mobile-menu/filter-mobile-menu.component.spec.ts b/src/app/home/filter-mobile-menu/filter-mobile-menu.component.spec.ts new file mode 100644 index 00000000..034810d9 --- /dev/null +++ b/src/app/home/filter-mobile-menu/filter-mobile-menu.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CategoryMobileMenuComponent } from './category-mobile-menu.component'; + +describe('CategoryMobileMenuComponent', () => { + let component: CategoryMobileMenuComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CategoryMobileMenuComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CategoryMobileMenuComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/home/filter-mobile-menu/filter-mobile-menu.component.ts b/src/app/home/filter-mobile-menu/filter-mobile-menu.component.ts new file mode 100644 index 00000000..db9e02d2 --- /dev/null +++ b/src/app/home/filter-mobile-menu/filter-mobile-menu.component.ts @@ -0,0 +1,86 @@ +import { Component, OnInit ,Input } from '@angular/core'; +import { + trigger, + state, + style, + animate, + transition +} from '@angular/animations'; +@Component({ + selector: 'app-filter-mobile-menu', + templateUrl: './filter-mobile-menu.component.html', + styleUrls: ['./filter-mobile-menu.component.scss'], + animations: [ + trigger('popOverState', [ + state('show', style({ + left: -100 + 'vw' + })), + state('hide', style({ + left: 0 + })), + transition('show => hide', animate('100ms ease-out')), + transition('hide => show', animate('200ms ease-in')) + ]), + trigger('subCatgory', [ + state('show', style({ + left: -200 + 'vw' + })), + state('hide', style({ + left: -100 + })), + transition('show => hide', animate('100ms ease-out')), + transition('hide => show', animate('200ms ease-in')) + ]) + + ] +}) +export class filterMobileMenuComponent implements OnInit { + + users = [ + {name: "Anil Singh", qualification: ["B.Sc.", "MCA", "MCTS", "MCP"]}, + {name: "Reena Singh", qualification: ["B A", "M A", "BTC"]} + ]; + + @Input() fillterList; + @Input() isScrolled; + + @Input() screenwidth; + subChild:any; + dropdownWidth: any; + menuTaxons: any; + autoclose: boolean; + queryParams: any; + showParrent = false; + showChild = false; + backBtnShow = false; + constructor() {} + showCategory(taxon) { + this.menuTaxons = taxon.taxons; + console.log(taxon); + console.log(this.menuTaxons) + } + get stateName() { + return this.showParrent ? 'show' : 'hide' + } + + get stateName1() { + return this.showChild ? 'show' : 'hide' + } + + showSubCategory(i) { + this.showChild = !this.showChild; + this.subChild = this.menuTaxons.taxons[i]; + } + parrentBack(){ + this.showParrent = !this.showParrent; + } + childBack(){ + console.log(this.showChild) ; + this.showChild = !this.showChild; + } + + + ngOnInit() { + + } +} diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 5681cbc1..bdb07c45 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -4,10 +4,10 @@
+ -