Files
webtorrent-desktop/renderer/index.css
2016-03-05 21:55:19 -08:00

405 lines
6.0 KiB
CSS

/*
* BASIC STYLES
*/
*,
*:after,
*:before {
box-sizing: border-box;
}
html,
body {
background: rgb(40, 40, 40);
color: #FFF;
cursor: default;
height: 100%;
font-family: BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif;
font-size: 14px;
line-height: 1.5em;
margin: 0;
padding: 0;
width: 100%;
overflow: hidden;
}
.app {
-webkit-user-select: none;
-webkit-app-region: drag;
height: 100%;
display: flex;
flex-flow: column;
}
/*
* MATERIAL ICONS
*/
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: local('Material Icons'),
local('MaterialIcons-Regular'),
url(../vendor/MaterialIcons-Regular.woff2) format('woff2');
}
.icon {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px; /* Preferred icon size */
display: inline-block;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
/*
* UTILITY CLASSES
*/
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.disabled {
opacity: 0.3;
}
/*
* BUTTONS
*/
a, i {
cursor: default;
-webkit-app-region: no-drag;
}
a:not(.disabled):hover, i:not(.disabled):hover {
-webkit-filter: brightness(1.3);
}
.btn {
width: 40px;
height: 40px;
border-radius: 20px;
font-size: 22px;
transition: all 0.1s ease-out;
text-align: center;
}
/*
* HEADER
*/
.header {
background: rgb(40, 40, 40);
border-bottom: 1px solid rgb(20, 20, 20);
height: 38px;
padding-top: 6px;
overflow: hidden;
flex: 0 1 auto;
opacity: 1;
position: fixed;
left: 0;
top: 0;
right: 0;
z-index: 1000;
transition: opacity 0.2s ease-out;
}
.app.player .header {
opacity: 0;
}
.app.player:hover .header:not(.hide) {
opacity: 0.8;
cursor: default;
}
.header .title {
opacity: 0.6;
position: absolute;
margin-top: 1px;
width: 100%;
text-align: center;
pointer-events: none;
}
.header .nav {
font-weight: bold;
margin-right: 7px;
}
.header .nav.left {
float: left;
}
.header .nav.right {
float: right;
}
.header .nav * {
opacity: 0.6;
}
.header .nav .disabled {
opacity: 0.1;
}
.header .nav *:not(.disabled):hover {
opacity: 1;
}
.header .nav .back, .header .nav .forward {
font-size: 30px;
margin-top: -3px;
}
/*
* CONTENT
*/
.content {
position: relative;
width: 100%;
overflow: auto;
flex: 1 1 auto;
}
body.drag::before {
content: '';
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: rgba(255, 0, 0, 0.3);
border: 5px #f00 dashed;
}
/*
* PLAYER
*/
.player {
position: absolute;
width: 100%;
height: 100%;
background-color: #000;
}
.player .letterbox {
width: 100%;
height: 100%;
display: flex;
}
.player video {
display: block;
width: 100%;
}
/*
* TORRENT LIST
*/
.torrent-list {
margin-top: 38px;
}
.torrent {
height: 120px;
padding: 20px;
background: rgba(0, 0, 0, 0.5);
background-repeat: no-repeat;
background-size: cover;
background-position: 0 50%;
transition: all 0.1s ease-out;
position: relative;
}
.torrent:not(:last-child) {
border-bottom: 1px solid rgb(20, 20, 20);
}
.torrent:hover {
-webkit-filter: brightness(1.1);
}
.torrent .metadata {
float: left;
width: 100%;
text-shadow: rgba(0, 0, 0, 0.5) 0 0 4px;
}
.torrent:hover .metadata {
width: calc(100% - 170px);
}
.torrent .btn, .torrent .delete {
float: right;
margin-top: 20px;
margin-left: 15px;
padding-top: 10px;
display: none;
}
.torrent .delete {
opacity: 0.5;
}
.torrent:hover .btn, .torrent:hover .delete {
display: block;
}
.torrent .play {
background-color: #F44336;
}
.torrent .chromecast {
background-color: #2196F3;
}
.torrent .airplay {
background-color: #212121;
}
.torrent .name {
font-size: 1.5em;
font-weight: bold;
line-height: 1.5em;
}
.torrent .status {
font-size: 1em;
line-height: 1.5em;
position: absolute;
bottom: 20px;
}
.torrent span:not(:last-child)::after {
content: ' — ';
}
/*
* PLAYER CONTROLS
*/
.player-controls {
position: fixed;
background: rgba(40, 40, 40, 0.8);
width: 100%;
height: 38px;
bottom: 0;
opacity: 0;
transition: all 0.2s ease-out;
}
.player:hover .player-controls {
opacity: 1;
}
.player.hide:hover .player-controls {
opacity: 0;
}
.player.hide {
cursor: none;
}
/* invisible click target for scrubbing */
.player-controls .scrub-bar {
position: absolute;
width: 100%;
height: 23px; /* 3px .loading-bar plus 10px above and below */
top: -10px;
left: 0;
-webkit-app-region: no-drag;
}
.player-controls .loading-bar {
position: relative;
width: 100%;
top: -3px;
height: 3px;
background-color: rgba(0, 0, 0, 0.3);
transition: all 0.1s ease-out;
position: absolute;
}
.player-controls .loading-bar-part {
position: absolute;
background-color: #dd0000;
top: 0;
height: 100%;
}
.player-controls .playback-cursor {
position: absolute;
top: -8px;
background-color: #FFF;
width: 0;
height: 0;
border-radius: 0;
margin-top: 7px;
margin-left: 7px;
transition-property: width, height, border-radius, margin-top, margin-left;
transition-duration: 0.1s;
transition-timing-function: ease-out;
}
.player-controls .play-pause {
display: block;
width: 20px;
height: 20px;
margin: 5px auto;
}
.player-controls .chromecast,
.player-controls .airplay,
.player-controls .fullscreen,
.player-controls .back {
display: block;
width: 20px;
height: 20px;
margin: 5px;
}
.player-controls .back {
float: left;
}
.player-controls .chromecast,
.player-controls .airplay,
.player-controls .fullscreen {
float: right;
}
.player-controls .chromecast,
.player-controls .airplay {
font-size: 18px; /* make the cast icons less huge */
margin-top: 8px !important;
}
.player .playback-bar:hover .loading-bar {
height: 5px;
}
.player .playback-bar:hover .playback-cursor {
width: 14px;
height: 14px;
border-radius: 7px;
margin-top: 0;
margin-left: 0;
}