Skip to content

Commit f04f73e

Browse files
authored
Merge pull request DSpace#2149 from alexandrevryghem/media-viewer-thumbnail-width_contribute-main
Media viewer thumbnails don't take viewport width into account
2 parents 4ff68da + ebfef74 commit f04f73e

4 files changed

Lines changed: 31 additions & 11 deletions

File tree

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
.ngx-gallery {
2-
display: inline-block;
3-
margin-bottom: 20px;
4-
width: 340px !important;
5-
height: 279px !important;
1+
:host ::ng-deep {
2+
.ngx-gallery {
3+
width: unset !important;
4+
height: unset !important;
5+
}
6+
7+
ngx-gallery-image {
8+
max-width: 340px !important;
9+
10+
.ngx-gallery-image {
11+
background-position: left;
12+
}
13+
}
14+
15+
ngx-gallery-image:after {
16+
padding-top: 75%;
17+
display: block;
18+
content: '';
19+
}
620
}
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
video {
2-
width: 340px;
3-
height: 279px;
2+
width: 100%;
3+
height: auto;
4+
max-width: 340px;
5+
}
6+
7+
.buttons {
8+
display: flex;
9+
gap: .25rem;
410
}

src/app/item-page/simple/item-types/publication/publication.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
<ds-thumbnail [thumbnail]="object?.thumbnail | async"></ds-thumbnail>
2121
</ds-metadata-field-wrapper>
2222
</ng-container>
23-
<ng-container *ngIf="mediaViewer.image">
23+
<div *ngIf="mediaViewer.image" class="mb-2">
2424
<ds-themed-media-viewer [item]="object" [videoOptions]="mediaViewer.video"></ds-themed-media-viewer>
25-
</ng-container>
25+
</div>
2626
<ds-themed-item-page-file-section [item]="object"></ds-themed-item-page-file-section>
2727
<ds-item-page-date-field [item]="object"></ds-item-page-date-field>
2828
<ds-themed-metadata-representation-list class="ds-item-page-mixed-author-field"

src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
<ds-thumbnail [thumbnail]="object?.thumbnail | async"></ds-thumbnail>
2222
</ds-metadata-field-wrapper>
2323
</ng-container>
24-
<ng-container *ngIf="mediaViewer.image">
24+
<div *ngIf="mediaViewer.image" class="mb-2">
2525
<ds-themed-media-viewer [item]="object" [videoOptions]="mediaViewer.video"></ds-themed-media-viewer>
26-
</ng-container>
26+
</div>
2727
<ds-themed-item-page-file-section [item]="object"></ds-themed-item-page-file-section>
2828
<ds-item-page-date-field [item]="object"></ds-item-page-date-field>
2929
<ds-themed-metadata-representation-list class="ds-item-page-mixed-author-field"

0 commit comments

Comments
 (0)