header: add nav buttons
This commit is contained in:
121
main/index.css
121
main/index.css
@@ -1,3 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* BASIC STYLES
|
||||||
|
*/
|
||||||
|
|
||||||
*,
|
*,
|
||||||
*:after,
|
*:after,
|
||||||
*:before {
|
*:before {
|
||||||
@@ -6,23 +10,92 @@
|
|||||||
|
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
height: 100%;
|
|
||||||
overflow: auto;
|
|
||||||
font-family: BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
background: rgb(40, 40, 40);
|
background: rgb(40, 40, 40);
|
||||||
|
cursor: default;
|
||||||
|
height: 100%;
|
||||||
|
font-family: BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow: auto;
|
||||||
|
-webkit-user-select: none;
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* UTILITY CLASSES
|
||||||
|
*/
|
||||||
|
|
||||||
|
.ellipsis {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.disabled {
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* BUTTONS
|
||||||
|
*/
|
||||||
|
|
||||||
a {
|
a {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
-webkit-app-region: no-drag;
|
-webkit-app-region: no-drag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a:not(.disabled):hover {
|
||||||
|
-webkit-filter: brightness(1.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 25px;
|
||||||
|
color: #FFF;
|
||||||
|
font-size: 24px;
|
||||||
|
transition: all 0.1s;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* WINDOW
|
||||||
|
*/
|
||||||
|
|
||||||
|
.header {
|
||||||
|
height: 37px;
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.5);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header .nav {
|
||||||
|
color: #FFF;
|
||||||
|
font-size: 17px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-left: 82px;
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header .nav * {
|
||||||
|
float: left;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header .nav .disabled {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header .nav *:not(.disabled):hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header .nav .back {
|
||||||
|
padding-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
body.drag::before {
|
body.drag::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -34,15 +107,9 @@ body.drag::before {
|
|||||||
border: 5px #f00 dashed;
|
border: 5px #f00 dashed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ellipsis {
|
/*
|
||||||
overflow: hidden;
|
* PLAYER
|
||||||
text-overflow: ellipsis;
|
*/
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.disabled {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player {
|
.player {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -53,6 +120,10 @@ body.drag::before {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TORRENT LIST
|
||||||
|
*/
|
||||||
|
|
||||||
.torrent {
|
.torrent {
|
||||||
height: 150px;
|
height: 150px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
@@ -60,8 +131,9 @@ body.drag::before {
|
|||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: 0 50%;
|
background-position: 0 50%;
|
||||||
border-bottom: 1px solid rgba(255, 255, 255, 0.5);
|
border-bottom: 1px solid rgba(0, 0, 0, 0.5);
|
||||||
transition: all 0.1s;
|
transition: all 0.1s;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.torrent:hover {
|
.torrent:hover {
|
||||||
@@ -75,20 +147,6 @@ body.drag::before {
|
|||||||
text-shadow: rgba(0, 0, 0, 0.5) 0 0 4px;
|
text-shadow: rgba(0, 0, 0, 0.5) 0 0 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
|
||||||
width: 50px;
|
|
||||||
height: 50px;
|
|
||||||
border-radius: 25px;
|
|
||||||
color: #FFF;
|
|
||||||
font-size: 24px;
|
|
||||||
transition: all 0.1s;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn:not(.disabled):hover {
|
|
||||||
-webkit-filter: brightness(1.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.torrent .btn {
|
.torrent .btn {
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: 25px;
|
margin-top: 25px;
|
||||||
@@ -116,9 +174,10 @@ body.drag::before {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.torrent .status {
|
.torrent .status {
|
||||||
opacity: 0.8;
|
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.torrent .status :not(:last-child)::after {
|
.torrent .status :not(:last-child)::after {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>WebTorrent</title>
|
<title>WebTorrent</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link rel="stylesheet" href="../vendor/fontello/css/fontello.css" charset="utf-8">
|
||||||
<link rel="stylesheet" href="index.css" charset="utf-8">
|
<link rel="stylesheet" href="index.css" charset="utf-8">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -69,6 +69,12 @@ function App (state, handler) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
return h('.app', [
|
return h('.app', [
|
||||||
|
h('.header', [
|
||||||
|
h('.nav', [
|
||||||
|
h('a.back.icon-left-open.disabled'),
|
||||||
|
h('a.forward.icon-right-open')
|
||||||
|
])
|
||||||
|
]),
|
||||||
h('.torrent-list', list),
|
h('.torrent-list', list),
|
||||||
h('.add', [
|
h('.add', [
|
||||||
h('button', {
|
h('button', {
|
||||||
|
|||||||
Reference in New Issue
Block a user