scinote-web/app/assets/stylesheets/shared/file_preview.scss

182 lines
3.2 KiB
SCSS
Raw Normal View History

// scss-lint:disable IdSelector PropertyUnits NestingDepth SelectorDepth
2020-10-22 19:41:17 +08:00
// Image preview modal
#filePreviewModal {
2020-10-22 19:41:17 +08:00
background: transparent;
font-size: $font-size-base;
padding: 0;
2020-11-26 22:35:06 +08:00
z-index: 1060;
2020-10-22 19:41:17 +08:00
.modal-dialog {
background: inherit;
height: 100%;
margin: 0;
padding: 0;
width: 100%;
}
.modal-content {
background: inherit;
border: 0;
border-radius: 0;
2023-09-21 18:51:32 +08:00
display: flex;
flex-direction: column;
height: 100vh;
2020-10-22 19:41:17 +08:00
min-height: 100%;
padding: 0;
2020-10-22 19:41:17 +08:00
}
.file-preview-container {
align-items: center;
background-color: var(--sn-color-white);
2020-10-22 19:41:17 +08:00
display: flex;
height: calc(100% - 4rem);
2020-10-22 19:41:17 +08:00
justify-content: center;
margin: 2rem;
2020-10-22 19:41:17 +08:00
text-align: center;
width: calc(100% - 4rem);
2023-10-05 21:44:41 +08:00
&.file-preview-container__wopi {
height: 100%;
margin: 0;
width: 100%;
}
.asset-image {
background-color: var(--sn-white);
}
2020-10-22 19:41:17 +08:00
.gene-sequence-asset {
height: 500px;
width: 500px;
}
2020-10-22 19:41:17 +08:00
&.processing {
2020-11-23 21:12:29 +08:00
background-image: url("/images/medium/loading_white.svg");
2020-10-22 19:41:17 +08:00
background-position: center;
background-repeat: no-repeat;
2020-11-23 21:12:29 +08:00
background-size: 64px;
2020-10-22 19:41:17 +08:00
}
.wopi-file-preview {
height: 100%;
width: 100%;
}
}
img {
background: url(asset-path("custom/checkerboard-pattern.png"));
height: auto;
max-width: 100%;
@media (max-height: 520px) {
height: 80%;
max-width: 100%;
}
}
.modal-header {
align-items: center;
background: $color-white;
display: flex;
2023-09-21 18:51:32 +08:00
flex-direction: row;
flex-shrink: 0;
2020-10-22 19:41:17 +08:00
height: 4em;
padding: 0 1em;
.file-name {
font-weight: bold;
margin-right: auto;
}
2020-11-04 20:08:40 +08:00
.asset-context-menu {
float: left;
}
2020-10-22 19:41:17 +08:00
}
.modal-body {
align-items: center;
background: transparent;
display: flex;
2023-09-21 18:51:32 +08:00
flex-grow: 1;
2020-10-22 19:41:17 +08:00
justify-content: center;
overflow: hidden;
padding: 0;
width: 100%;
}
.modal-footer {
background: $color-white;
height: 4em;
2023-09-21 18:51:32 +08:00
flex-shrink: 0;
2020-10-22 19:41:17 +08:00
padding: 0 1em;
.gallery {
align-items: center;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
height: 100%;
padding: 0 1em;
width: 100%;
img {
max-height: 2em;
max-width: 2em;
}
.file-counter {
font-weight: bold;
grid-column-start: 2;
margin: 0 auto;
}
.gallery-switcher,
.shareable-gallery-switcher {
2020-10-22 19:41:17 +08:00
align-items: center;
color: $color-black;
display: flex;
&:hover {
text-decoration: none;
}
.file-name {
display: inline-block;
max-width: 16em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fa-angle-right,
.fa-angle-left {
margin: 0 .5em;
}
&.previous-asset {
grid-column-start: 1;
margin-right: auto;
}
&.next-asset {
grid-column-start: 3;
margin-left: auto;
}
}
}
}
.btn-light:not(.file-download-link) {
.fas {
margin-right: 0;
}
}
2020-10-22 19:41:17 +08:00
}
.modal-backdrop.in {
opacity: .4;
}