From 2b5b2e81c9c2c60aa803cb9c3fcc8f7e39d5ee83 Mon Sep 17 00:00:00 2001 From: Dslak Date: Sun, 6 Dec 2020 21:36:37 +0100 Subject: [PATCH] fine tuning --- src/app/admin/admin.component.html | 2 +- src/app/admin/admin.component.ts | 2 -- src/app/detail/detail.component.scss | 2 ++ src/app/portfolio/portfolio.component.html | 2 +- src/app/portfolio/portfolio.component.ts | 37 ++++++++++++++++++++++ src/assets/scss/variables.scss | 4 +-- 6 files changed, 43 insertions(+), 6 deletions(-) diff --git a/src/app/admin/admin.component.html b/src/app/admin/admin.component.html index 7cc2eb5..4bcd7dc 100644 --- a/src/app/admin/admin.component.html +++ b/src/app/admin/admin.component.html @@ -70,7 +70,7 @@
Date from - +
Date to diff --git a/src/app/admin/admin.component.ts b/src/app/admin/admin.component.ts index f0b46f7..03443d9 100644 --- a/src/app/admin/admin.component.ts +++ b/src/app/admin/admin.component.ts @@ -216,8 +216,6 @@ export class AdminComponent implements OnInit { } selectWork(id): void { - console.log('selectWork') - this.activeModify = true this.modifyId = id this.apisService.getDetails('works', id).toPromise().then((response) => { diff --git a/src/app/detail/detail.component.scss b/src/app/detail/detail.component.scss index a356f88..0527ae3 100644 --- a/src/app/detail/detail.component.scss +++ b/src/app/detail/detail.component.scss @@ -76,6 +76,8 @@ } .videos { + padding-bottom: 40px; + .video-title { font-size: $font-18; font-weight: bold; diff --git a/src/app/portfolio/portfolio.component.html b/src/app/portfolio/portfolio.component.html index d53692f..1491280 100644 --- a/src/app/portfolio/portfolio.component.html +++ b/src/app/portfolio/portfolio.component.html @@ -1,7 +1,7 @@
-
+
diff --git a/src/app/portfolio/portfolio.component.ts b/src/app/portfolio/portfolio.component.ts index f41877c..ec793ec 100644 --- a/src/app/portfolio/portfolio.component.ts +++ b/src/app/portfolio/portfolio.component.ts @@ -25,6 +25,43 @@ export class PortfolioComponent implements OnInit { this.apisService.getPortfolio(this.section).toPromise().then((response) => { this.portfolioItems = response.items + + let cnt = 0 + let width = 0 + let tot = 0 + + this.portfolioItems.forEach((e) => { + switch (cnt) { + case 0: + width = Math.floor(Math.random()*3)+3 + tot = width + cnt++ + break; + case 1: + width = Math.floor(Math.random()*3)+3 + cnt++ + + if(tot + width > 9) { + width = 12 - tot + tot = 0 + cnt = 0 + } else { + tot = tot + width + } + + break; + case 2: + width = 12 - tot + tot = 0 + cnt = 0 + break; + } + + e.width = width + + //((e.id % 5)+3) + //Math.floor((Math.random()*3)+1)+2 + }) },(error) => { console.error('getPortfolio ERROR', error) }).catch((e) => { diff --git a/src/assets/scss/variables.scss b/src/assets/scss/variables.scss index d4bcaab..dd99a70 100644 --- a/src/assets/scss/variables.scss +++ b/src/assets/scss/variables.scss @@ -3,14 +3,14 @@ $grid-breakpoints: ( xs: 0, sm: 576px, md: 768px, - lg: 992px, + lg: 1024px, xl: 1440px ); $container-max-widths: ( sm: 540px, md: 720px, - lg: 960px, + lg: 990px, xl: 1418px );