master
Boris Voropaev 2023-12-11 14:36:07 +03:00
parent 8dd970f468
commit cf491ec680
8 changed files with 56 additions and 24 deletions

View File

@ -30,11 +30,11 @@ export class VideoSectionComponent {
parsedUrl(url: any) {
let res = '';
if (/https:\/\/youtu.be\//.test(url)) {
this.videoID = url.replace('https://youtu.be/','').replace(/\?.*/,'');
this.videoID = url.replace('https://youtu.be/','').replace(/\?.*/,'').split('&')[0];
this.source = 'youtube.com';
res = 'https://www.youtube.com/embed/' + this.videoID + '?autoplay=1';
} else if (/https:\/\/www\.youtube\.com\/watch\?v\=/.test(url)) {
this.videoID = url.replace('https://www.youtube.com/watch?v=','').replace(/\?.*/,'');
this.videoID = url.replace('https://www.youtube.com/watch?v=','').replace(/\?.*/,'').split('&')[0];
this.source = 'youtube.com';
res = 'https://www.youtube.com/embed/' + this.videoID + '?autoplay=1';
} else if (/https:\/\/rutube.ru\/video\//.test(url)) {

View File

@ -1,9 +1,12 @@
<div class="poster" *ngIf="currentImage">
<div class="poster" *ngIf="currentImage" (click)="fullScreen=true">
<img [src]="currentImage.links?.full" />
</div>
<div class="posters" *ngIf="images.length>1">
<div class="item" *ngFor="let image of images">
<img [src]="image.links?.thumb" (click)="currentImage=image"/>
<div class="item" *ngFor="let image of images; let i=index">
<img [src]="image.links?.thumb" (click)="currentImage=image; id=i"/>
</div>
</div>
</div>
<div class="gellery-fullscreen" *ngIf="fullScreen" >
<swiper-gallery [items]="images" [closing]="true" [start]="id" (event)="fullScreen=false"></swiper-gallery>
</div>

View File

@ -7,7 +7,9 @@ import { Component, Input } from '@angular/core';
})
export class GelleryComponent {
@Input() images:any[];
currentImage:any;
public fullScreen = false;
public currentImage:any;
public id:number
ngOnInit() {
if (this.images) this.currentImage = this.images[0];
}

View File

@ -1,13 +1,14 @@
<div class="main">
<div class="block row">
<div class="name">
<div *ngIf="link">
<file-ico [type]="entry.asset.data.extension"></file-ico>
<a [href]="link" target="_blank">{{title}}</a>
<div *ngIf="link">
<a [href]="link" target="_blank">
<ico ico="document_24"></ico> {{title}}
</a>
</div>
<span *ngIf="!link">{{title}}</span>
</div>
<!-- <drop-down *ngIf="isExpandable" (click)="toggle()" [visible]="isExpanded"></drop-down> -->
<drop-down *ngIf="isExpandable" (click)="toggle()" [visible]="isExpanded"></drop-down>
</div>
<div class="block" *ngIf="registryOptions?.states && activeSince">
<div class="state {{entry.state?.name}}">{{entry.state?.title}}</div>
@ -35,3 +36,4 @@
<entry-operations [entry]="entry" [editMode]="editMode"></entry-operations>
</div>
</div>
<pre>{{entry|json}}</pre>

View File

@ -32,6 +32,7 @@
img {
object-fit:cover;
object-position: 50% 20%;
&:not(.active){
filter: brightness(50%);
}

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" id="ico">
<path fill-rule="evenodd" clip-rule="evenodd" d="M20 8.00781L14 2.00781H13H6C4.89543 2.00781 4 2.90324 4 4.00781V20.0078C4 21.1124 4.89543 22.0078 6 22.0078H18C19.1046 22.0078 20 21.1124 20 20.0078V9.00781V8.00781ZM6 4.00781H13V9.00781H18V20.0078H6V4.00781ZM8 12.0078H16V14.0078H8V12.0078ZM8 16.0078H16V18.0078H8V16.0078Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 458 B

View File

@ -436,16 +436,19 @@ publication-page {
}
gellery{
.poster{
width: 665px;
.poster{
height: 468px;
max-width: calc( 100vw - 80px);
max-height: calc( (100vw - 80px ) * 0.7 );
margin-bottom: 8px;
border: 1px solid var(--second-dis);
background-color: var(--second-dis);
border-radius: 12px;
overflow: hidden;
cursor: pointer;
>img{
height: 100%;
border: 1px solid var(--second-dis);
background-color: var(--second-dis);
border-radius: 12px;
}
}
.posters{
display: flex;
@ -461,26 +464,41 @@ gellery{
:hover{
border-color: var(--prime-act);
}
img{
object-fit: cover;
object-position: 50% 20%;
width: 100%;
height: 100%;
}
}
}
img{
object-fit: cover;
width: 100%;
height: 100%;
.gellery-fullscreen{
position: fixed;
width: 100vw;
height: 100vh;
z-index: 1000;
top:0;
left: 0;
background-color: gray;
swiper-gellery{
width: 100%;
height: 100%;
}
}
}
video-section{
cursor: pointer;
width: 100%;
.video-box{
max-width: 720px;
height: 400px;
position: relative;
z-index: -1;
img{
cursor:pointer
}
z-index: 0;
.poster{
object-fit: cover;
width: 100%;

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" id="ico">
<path fill-rule="evenodd" clip-rule="evenodd" d="M20 8.00781L14 2.00781H13H6C4.89543 2.00781 4 2.90324 4 4.00781V20.0078C4 21.1124 4.89543 22.0078 6 22.0078H18C19.1046 22.0078 20 21.1124 20 20.0078V9.00781V8.00781ZM6 4.00781H13V9.00781H18V20.0078H6V4.00781ZM8 12.0078H16V14.0078H8V12.0078ZM8 16.0078H16V18.0078H8V16.0078Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 458 B