.file-page { .grid-area--content + .card, .file-render + .card, .content__cover + .card, .card + .file-render, .card + .grid-area--content, .card + .content__cover { margin-top: var(--spacing-large); } .card + .file-render { margin-top: var(--spacing-large); } .file-page__md { .card { border-bottom-left-radius: 0; border-bottom-right-radius: 0; } .card + .file-render { margin-top: 0; .card { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-left-radius: var(--border-radius); border-bottom-right-radius: var(--border-radius); border-top: none; } } } } .file-render { width: 100%; height: 100%; z-index: 1; overflow: hidden; max-height: var(--inline-player-max-height); } .file-render--document { max-height: none; overflow: auto; .content__loading { background-color: transparent; padding: 0; margin: var(--spacing-xlarge) 0; .content__loading-text { color: var(--color-text); } } .markdown-preview { height: 100%; overflow: auto; width: 40em; margin-left: auto; margin-right: auto; max-width: unset; min-width: unset; @media (max-width: $breakpoint-small) { width: 100%; padding: var(--spacing-small); } } } .file-render__header { display: flex; justify-content: space-between; flex-wrap: wrap; } .file-render__viewer { width: 100%; height: 100%; iframe, webview, img { width: 100%; height: 100%; object-fit: contain; max-height: var(--inline-player-max-height); } video { cursor: pointer; } .video-js.vjs-fullscreen.vjs-user-inactive.vjs-playing { video { cursor: none; } } } .file-render__viewer--comic { position: relative; overflow: hidden; .comic-viewer { width: 100%; height: calc(100vh - var(--header-height) - var(--spacing-medium) * 2); max-height: var(--inline-player-max-height); } } .file-render__viewer--iframe { display: flex; /*this eliminates extra height from whitespace, if someone edits this with a better technique, tell Jeremy*/ /* ideally iframes would dynamiclly grow, see for a start at this for now, since we don't know size, let's make as large as we can without being larger than available area */ iframe { height: calc(100vh - var(--header-height) - var(--spacing-medium) * 2); } } .file-render__content { width: 100%; height: 100%; overflow: auto; max-width: 100vw; } // // 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-control-bar { .vjs-remaining-time { display: none; } .vjs-current-time, .vjs-time-divider, .vjs-duration { display: flex; } } } .vjs-paused .vjs-big-play-button, .vjs-paused.vjs-has-started .vjs-big-play-button { @media (max-width: $breakpoint-small) { display: block; } } .file-render { border-radius: var(--card-radius); .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; } } } } .file-render__embed { height: 100%; width: 100%; position: fixed; .video-js { display: flex; align-items: center; justify-content: center; .vjs-big-play-button { @extend .button--icon; @extend .button--play; background-color: rgba(0, 0, 0, 0.6); border: none; position: static; z-index: 2; .vjs-icon-placeholder { display: none; } } &.vjs-paused { .vjs-big-play-button { display: block; } } } .video-js:hover { .vjs-big-play-button { background-color: var(--color-primary); } } } .video-overlay__wrapper { position: absolute; left: auto; right: auto; height: 100%; width: 100%; background-color: rgba(0, 0, 0, 0.9); z-index: 999; color: var(--color-white); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--spacing-large); .button--uri-indicator { color: var(--color-gray-3); } @media (max-width: $breakpoint-small) { align-items: flex-start; padding: var(--spacing-small); .button, .video-overlay__subtitle, .video-overlay__actions { font-size: var(--font-small); } } } .video-overlay__title { font-size: var(--font-title); font-weight: var(--font-weight-light); margin-top: var(--spacing-medium); margin-bottom: var(--spacing-small); @media (max-width: $breakpoint-small) { margin: 0; font-size: var(--font-medium); } } .video-overlay__subtitle { color: var(--color-gray-3); margin: var(--spacing-medium) 0; line-height: 1; @media (max-width: $breakpoint-small) { margin: 0; } } .video-overlay__actions { margin-top: var(--spacing-large); .button--link { color: var(--color-white); } @media (max-width: $breakpoint-small) { margin-top: var(--spacing-small); } }