diff --git a/src/app/admin/admin.component.html b/src/app/admin/admin.component.html index e5615a0..694eb5d 100644 --- a/src/app/admin/admin.component.html +++ b/src/app/admin/admin.component.html @@ -36,9 +36,9 @@ {{sectionTitle}}
- - @@ -46,9 +46,9 @@
- - @@ -58,7 +58,7 @@ *ngIf="activeEditor == 'works-add' || (activeEditor == 'works-modify' && activeModify) || activeEditor == 'exhibitions-add' || (activeEditor == 'exhibitions-modify' && activeModify)">
+ 'col-6': activeEditor == 'exhibitions-add' || activeEditor == 'exhibitions-modify'}"> Title
@@ -68,11 +68,11 @@
-
+
Date from
-
+
Date to
@@ -102,9 +102,9 @@
Exhibitions - - @@ -117,9 +117,9 @@
Works - - diff --git a/src/app/admin/admin.component.ts b/src/app/admin/admin.component.ts index 54e129b..1e1fc0b 100644 --- a/src/app/admin/admin.component.ts +++ b/src/app/admin/admin.component.ts @@ -61,37 +61,25 @@ export class AdminComponent implements OnInit { this.authCheck = response.status && response.status == 200 if(this.authCheck) { - this.apisService.getPortfolio('exhibitions').toPromise().then((response) => { - this.exhibitions = response.items - },(error) => { - console.error('getPortfolio ERROR', error) - }).catch((e) => { - console.error('getPortfolio CATCH', e) - }) - - this.apisService.getPortfolio('portfolio').toPromise().then((response) => { - this.works = response.items - },(error) => { - console.error('getPortfolio ERROR', error) - }).catch((e) => { - console.error('getPortfolio CATCH', e) - }) + this.loadData() } + },(error) => { this.authCheck = false - console.error('Auth ERROR', error) + console.error('Auth ERROR INIT', error) }).catch((e) => { this.authCheck = false - console.error('Auth CATCH', e) + console.error('Auth CATCH INIT', e) }) } login(): void { const body = { usr: this.userName, pwd: this.password } this.authService.login(body).toPromise().then((response) => { - this.authCheck = response.status == 200 + this.authCheck = response.status && response.status == 200 if(this.authCheck) { window.sessionStorage.setItem('authToken', response.authToken) + this.loadData() } },(error) => { console.error('Auth ERROR', error) @@ -100,6 +88,24 @@ export class AdminComponent implements OnInit { }) } + loadData(): void { + this.apisService.getPortfolio('exhibitions').toPromise().then((response) => { + this.exhibitions = response.items + },(error) => { + console.error('getPortfolio ERROR', error) + }).catch((e) => { + console.error('getPortfolio CATCH', e) + }) + + this.apisService.getPortfolio('portfolio').toPromise().then((response) => { + this.works = response.items + },(error) => { + console.error('getPortfolio ERROR', error) + }).catch((e) => { + console.error('getPortfolio CATCH', e) + }) + } + showEditor(section): void { switch(section) { case 'works-add': @@ -210,6 +216,7 @@ export class AdminComponent implements OnInit { } selectWork(id): void { + console.log('selectWork') this.activeModify = true this.modifyId = id diff --git a/src/app/app-layout/app-layout.component.ts b/src/app/app-layout/app-layout.component.ts index 956d7d3..26318ab 100644 --- a/src/app/app-layout/app-layout.component.ts +++ b/src/app/app-layout/app-layout.component.ts @@ -96,6 +96,7 @@ export class AppLayoutComponent implements OnInit { ngOnInit(): void { this.page = this.router.url + this.particlesEnabled = this.page != '/admin' } diff --git a/src/app/detail/detail.component.html b/src/app/detail/detail.component.html index 15c2be3..79c0db1 100644 --- a/src/app/detail/detail.component.html +++ b/src/app/detail/detail.component.html @@ -12,7 +12,7 @@ 'col-md-3': details.gallery.length >= 3}">
diff --git a/src/app/detail/detail.component.ts b/src/app/detail/detail.component.ts index 34e5412..1d191d6 100644 --- a/src/app/detail/detail.component.ts +++ b/src/app/detail/detail.component.ts @@ -4,6 +4,7 @@ import { DomSanitizer } from '@angular/platform-browser' import { Location } from '@angular/common' import { NgxImageGalleryComponent, GALLERY_IMAGE, GALLERY_CONF } from "ngx-image-gallery" import { ApisService } from '../services/apis.service' +import { environment } from '../../environments/environment' @Component({ selector: 'app-detail', @@ -12,6 +13,8 @@ import { ApisService } from '../services/apis.service' }) export class DetailComponent implements OnInit { + public basePath = `${environment.BASE_PATH}` + @ViewChild(NgxImageGalleryComponent) ngxImageGallery: NgxImageGalleryComponent public details: any = {} diff --git a/src/app/portfolio/portfolio.component.scss b/src/app/portfolio/portfolio.component.scss index d799a61..6a6f4ac 100644 --- a/src/app/portfolio/portfolio.component.scss +++ b/src/app/portfolio/portfolio.component.scss @@ -6,7 +6,7 @@ .box { position: relative; display: flex; - //background: $black-alpha; + background: $black-alpha; border-radius: 10px; overflow: hidden; margin: 10px 0; @@ -23,10 +23,10 @@ height: 100%; width: 100%; object-fit: cover; - transform: translate(-50%, -50%) scale(1.2); - opacity: .5; - filter: grayscale(100%) invert(100%); - transition: transform .4s, opacity .4s, filter .4s; + transform: translate(-50%, -50%); + opacity: .9; + filter: grayscale(100%) brightness(.4); + transition: opacity .4s, filter .4s; -webkit-backface-visibility: hidden; z-index: 0; } @@ -36,8 +36,8 @@ margin: auto; text-align: center; transform: translate(0%, 0%); - color: $black; - transition: color .4s; + color: $yellow; + //transition: color .4s; -webkit-backface-visibility: hidden; z-index: 1; @@ -99,21 +99,19 @@ background: $black; z-index: 50; - //animation-play-state: paused; - @each $angle in 0,1,2,3,4,5,6 { &.skew-#{$angle} { - transform: scale(1.4) rotate(2deg) skew(#{3 - $angle}deg, #{3 - $angle}deg); + //transform: scale(1.4) rotate(2deg) skew(#{3 - $angle}deg, #{3 - $angle}deg); + transform: scale(1.4) rotate(0deg) skew(0deg, 0deg); } } .image { - filter: grayscale(100%) invert(0%) brightness(.5); - opacity: .9; - transform: translate(-50%, -50%) scale(1.6); + filter: grayscale(0%) brightness(1); + opacity: .5; } .text { - color: $yellow; + //color: $yellow; } } } diff --git a/src/app/workshops/workshops.component.html b/src/app/workshops/workshops.component.html deleted file mode 100644 index d0e6442..0000000 --- a/src/app/workshops/workshops.component.html +++ /dev/null @@ -1 +0,0 @@ -

workshops works!

diff --git a/src/app/workshops/workshops.component.scss b/src/app/workshops/workshops.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/workshops/workshops.component.spec.ts b/src/app/workshops/workshops.component.spec.ts deleted file mode 100644 index 46e2e57..0000000 --- a/src/app/workshops/workshops.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { WorkshopsComponent } from './workshops.component'; - -describe('WorkshopsComponent', () => { - let component: WorkshopsComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ WorkshopsComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(WorkshopsComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/workshops/workshops.component.ts b/src/app/workshops/workshops.component.ts deleted file mode 100644 index af08b35..0000000 --- a/src/app/workshops/workshops.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-workshops', - templateUrl: './workshops.component.html', - styleUrls: ['./workshops.component.scss'] -}) -export class WorkshopsComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -}