Browse Source

fine tuning

hotfix/class_typo
Dslak 5 years ago
parent
commit
2b5b2e81c9
  1. 2
      src/app/admin/admin.component.html
  2. 2
      src/app/admin/admin.component.ts
  3. 2
      src/app/detail/detail.component.scss
  4. 2
      src/app/portfolio/portfolio.component.html
  5. 37
      src/app/portfolio/portfolio.component.ts
  6. 4
      src/assets/scss/variables.scss

2
src/app/admin/admin.component.html

@ -70,7 +70,7 @@
</div>
<div class="col-3" *ngIf="activeEditor == 'exhibitions-add' || activeEditor == 'exhibitions-modify'">
<span class="label">Date from</span>
<input type="date" class="input-text w-100" name="dateFrom" [(ngModel)]="dateFrom">
<input type="date" class="input-text w-100" name="dateFrom" [(ngModel)]="dateFrom" (change)="dateTo = dateFrom">
</div>
<div class="col-3" *ngIf="activeEditor == 'exhibitions-add' || activeEditor == 'exhibitions-modify'">
<span class="label">Date to</span>

2
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) => {

2
src/app/detail/detail.component.scss

@ -76,6 +76,8 @@
}
.videos {
padding-bottom: 40px;
.video-title {
font-size: $font-18;
font-weight: bold;

2
src/app/portfolio/portfolio.component.html

@ -1,7 +1,7 @@
<div class="component-portfolio">
<div class="container">
<div class="row">
<div class="col-12 col-sm-6 mx-auto" [ngClass]="'col-md-' + ((item.id % 3)+3)" *ngFor="let item of portfolioItems">
<div class="col-12 col-sm-6 mx-auto" [ngClass]="'col-md-' + item.width" *ngFor="let item of portfolioItems">
<div class="box" [ngClass]="'skew-' + (item.id % 6)" (click)="showDetails(item.id)">
<img class="image" [src]="basePath+item.image">
<div class="text">

37
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) => {

4
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
);

Loading…
Cancel
Save