155 lines
2.7 KiB
SCSS
155 lines
2.7 KiB
SCSS
.file-render {
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 1;
|
|
overflow: hidden;
|
|
max-height: var(--inline-player-max-height);
|
|
|
|
@media (max-width: $breakpoint-small) {
|
|
// margin-top: 10px;
|
|
}
|
|
}
|
|
|
|
.file-render--document {
|
|
max-height: none;
|
|
|
|
.content__loading {
|
|
background-color: transparent;
|
|
padding: 0;
|
|
margin: var(--spacing-xlarge) 0;
|
|
|
|
.content__loading-text {
|
|
color: var(--color-text);
|
|
}
|
|
}
|
|
}
|
|
|
|
.file-render__viewer {
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
iframe,
|
|
webview,
|
|
img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
}
|
|
video {
|
|
cursor: pointer;
|
|
}
|
|
.video-js.vjs-fullscreen.vjs-user-inactive.vjs-playing {
|
|
video {
|
|
cursor: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.file-render__viewer--document {
|
|
@extend .file-render__viewer;
|
|
overflow: auto;
|
|
|
|
.markdown-preview {
|
|
height: 100%;
|
|
overflow: auto;
|
|
|
|
@media (max-width: $breakpoint-small) {
|
|
padding: var(--spacing-small);
|
|
}
|
|
}
|
|
}
|
|
|
|
.file-render__viewer--pdf {
|
|
@extend .file-render__viewer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.5em;
|
|
}
|
|
|
|
.file-render__content {
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: auto;
|
|
}
|
|
|
|
//
|
|
// Custom viewers live below here
|
|
// These either have custom class names that can't be changed or have styles that need to be overridden
|
|
//
|
|
|
|
// Code-viewer
|
|
.CodeMirror {
|
|
@extend .file-render__content;
|
|
|
|
.cm-invalidchar {
|
|
display: none;
|
|
}
|
|
|
|
.CodeMirror .CodeMirror-lines {
|
|
// is there really a .CodeMirror inside a .CodeMirror?
|
|
padding: var(--spacing-small) 0;
|
|
}
|
|
|
|
.CodeMirror-code {
|
|
@include font-mono;
|
|
letter-spacing: 0.1rem;
|
|
}
|
|
|
|
.CodeMirror-gutters {
|
|
background-color: var(--color-gray-1);
|
|
border-right: 1px solid var(--color-gray-4);
|
|
padding-right: var(--spacing-medium);
|
|
}
|
|
|
|
.CodeMirror-line {
|
|
padding-left: var(--spacing-medium);
|
|
}
|
|
|
|
.CodeMirror-linenumber {
|
|
color: var(--color-gray-5);
|
|
}
|
|
}
|
|
|
|
.video-js {
|
|
height: 100%;
|
|
width: 100%;
|
|
|
|
// Removing the play button because we have autoplay turned on
|
|
// These are classes added by video.js
|
|
.vjs-big-play-button {
|
|
display: none;
|
|
}
|
|
|
|
.vjs-modal-dialog .vjs-modal-dialog-content {
|
|
position: relative;
|
|
padding-top: 5rem;
|
|
// Make sure no videojs message interferes with overlaying buttons
|
|
pointer-events: none;
|
|
}
|
|
}
|
|
|
|
.vjs-paused .vjs-big-play-button,
|
|
.vjs-paused.vjs-has-started .vjs-big-play-button {
|
|
display: block;
|
|
}
|
|
|
|
.file-render {
|
|
.video-js {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
.vjs-big-play-button {
|
|
@extend .button--icon;
|
|
@extend .button--play;
|
|
border: none;
|
|
position: static;
|
|
z-index: 2;
|
|
|
|
.vjs-icon-placeholder {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
}
|