init
This commit is contained in:
52
static/cover.html
Normal file
52
static/cover.html
Normal file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
html {
|
||||
background: black;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.cover {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.cover:hover .cover-img{
|
||||
opacity: 0.5;
|
||||
}
|
||||
.cover:hover .icon-play {
|
||||
opacity: 1;
|
||||
}
|
||||
.cover-img {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.icon-play {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: white;
|
||||
font-size: 100px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
vertical-align: center;
|
||||
/*left: 50%;*/
|
||||
transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
<div class="cover">
|
||||
<a href="https://images-na.ssl-images-amazon.com/images/I/71CruJN2sfL._RI_SX200_.jpg">
|
||||
<img class="cover-img" src="https://images-na.ssl-images-amazon.com/images/I/71CruJN2sfL._RI_SX200_.jpg">
|
||||
<p class="icon-play">▶</p>
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
172
static/index.html
Normal file
172
static/index.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>YTSFlix</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
body,
|
||||
html {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: #171618;
|
||||
color: #ecf0f1;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
width: 100%;
|
||||
}
|
||||
.section {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
h1,
|
||||
p {
|
||||
text-align: center;
|
||||
}
|
||||
p {
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
margin: auto;
|
||||
}
|
||||
.contain {
|
||||
width: 100%;
|
||||
}
|
||||
.row {
|
||||
overflow: scroll;
|
||||
width: 100%;
|
||||
}
|
||||
.row__inner {
|
||||
transition: 450ms -webkit-transform;
|
||||
transition: 450ms transform;
|
||||
transition: 450ms transform, 450ms -webkit-transform;
|
||||
font-size: 0;
|
||||
white-space: nowrap;
|
||||
margin: 25px 0;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.tile {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 143px;
|
||||
height: 201px;
|
||||
margin-right: 10px;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
transition: 450ms all;
|
||||
-webkit-transform-origin: center left;
|
||||
transform-origin: center left;
|
||||
}
|
||||
.tile__img {
|
||||
width: 143px;
|
||||
height: 201px;
|
||||
-o-object-fit: cover;
|
||||
object-fit: cover;
|
||||
}
|
||||
.tile__details {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: 10px;
|
||||
opacity: 0;
|
||||
background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
|
||||
transition: 450ms opacity;
|
||||
}
|
||||
.tile__details:after,
|
||||
.tile__details:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
display: #000;
|
||||
}
|
||||
/*.tile__details:after {*/
|
||||
/*margin-top: -25px;*/
|
||||
/*margin-left: -25px;*/
|
||||
/*width: 50px;*/
|
||||
/*height: 50px;*/
|
||||
/*border: 3px solid #ecf0f1;*/
|
||||
/*line-height: 50px;*/
|
||||
/*text-align: center;*/
|
||||
/*border-radius: 100%;*/
|
||||
/*background: rgba(0,0,0,0.5);*/
|
||||
/*z-index: 1;*/
|
||||
/*}*/
|
||||
.tile__details:before {
|
||||
content: '▶';
|
||||
left: 0;
|
||||
width: 100%;
|
||||
font-size: 30px;
|
||||
margin-left: 7px;
|
||||
margin-top: -18px;
|
||||
text-align: center;
|
||||
z-index: 2;
|
||||
color: white
|
||||
}
|
||||
.tile:hover .tile__details {
|
||||
opacity: 1;
|
||||
}
|
||||
.tile__title {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
padding: 10px;
|
||||
color: white;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
width: 130px;
|
||||
}
|
||||
.row__inner:hover {
|
||||
-webkit-transform: translate3d(-10.724999999999994px, 0, 0);
|
||||
transform: translate3d(-10.724999999999994px, 0, 0);
|
||||
}
|
||||
.row__inner:hover .tile {
|
||||
opacity: 0.3;
|
||||
}
|
||||
.row__inner:hover .tile:hover {
|
||||
-webkit-transform: scale(1.15);
|
||||
transform: scale(1.15);
|
||||
opacity: 1;
|
||||
}
|
||||
.tile:hover ~ .tile {
|
||||
-webkit-transform: translate3d(21.44999999999999px, 0, 0);
|
||||
transform: translate3d(21.44999999999999px, 0, 0);
|
||||
}
|
||||
.category-title {
|
||||
margin: 0;
|
||||
padding-left: 16px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
{{template "navigation"}}
|
||||
<section>
|
||||
{{ range $category, $movies := .Categories }}
|
||||
<article>
|
||||
<h2 class="category-title"><a href="/category/{{ $category }}">{{ $category }}</a></h2>
|
||||
<div class="section">
|
||||
<div class="row">
|
||||
<div class="row__inner">
|
||||
{{ range $title, $movie := $movies }}
|
||||
<a class="tile" href="{{ $movie.Link }}">
|
||||
<div class="tile__media">
|
||||
<img class="tile__img" src="{{ $movie.Cover }}" alt="" />
|
||||
</div>
|
||||
<div class="tile__details">
|
||||
<div class="tile__title">
|
||||
{{ $title }}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
128
static/movie.html
Normal file
128
static/movie.html
Normal file
@ -0,0 +1,128 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{ .Title }} {{ .Year }}</title>
|
||||
<style>body, html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #171618;
|
||||
color: #ecf0f1;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.movie-header {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.cover {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.cover:hover .cover-img {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.cover:hover .icon-play {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.cover-img {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.icon-play {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: white;
|
||||
font-size: 80px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
vertical-align: center;
|
||||
/*left: 50%;*/
|
||||
transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.title {
|
||||
flex-grow: 1;
|
||||
flex-basis: 0;
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
iframe {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
flex-grow: 1;
|
||||
flex-basis: 0;
|
||||
}
|
||||
|
||||
section {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.cast {
|
||||
display: flex;
|
||||
}
|
||||
.actor {
|
||||
margin: 10px;
|
||||
width: 80px;
|
||||
height: 120px;
|
||||
}
|
||||
.actor-img {
|
||||
margin: auto;
|
||||
border-radius: 100%;
|
||||
}
|
||||
.actor-name {
|
||||
margin: auto;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{{ template "navigation" }}
|
||||
<div class="movie-header">
|
||||
<div class="cover">
|
||||
<a href="{{ .Link }}">
|
||||
<img class="cover-img" src="{{ .Cover }}">
|
||||
<p class="icon-play">▶</p>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">
|
||||
<h1>{{ .Title }} {{ .Year }}</h1>
|
||||
<p>{{ range .Genre }}{{ . }} {{ end }}
|
||||
</p>
|
||||
</div>
|
||||
<iframe
|
||||
src="{{ .Youtube }}" frameborder="0"
|
||||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
|
||||
</iframe>
|
||||
</div>
|
||||
<section class="details">
|
||||
<h2>Synopsis</h2>
|
||||
<p>{{ .Synopsis }}</p>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Casting</h2>
|
||||
<div class="cast">
|
||||
{{ range .Casting }}
|
||||
<div class="actor">
|
||||
<img class="actor-img" src="{{ .Image }}">
|
||||
<p class="actor-name">{{ .Name }}</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
88
static/nav.html
Normal file
88
static/nav.html
Normal file
@ -0,0 +1,88 @@
|
||||
{{define "navigation"}}
|
||||
<header>
|
||||
<style>
|
||||
header {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: #171618;
|
||||
color: #ecf0f1;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
a:link,
|
||||
a:hover,
|
||||
a:active,
|
||||
a:visited {
|
||||
transition: color 150ms;
|
||||
color: #95a5a6;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #7f8c8d;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
li {
|
||||
font-size: medium;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.nav {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
display: block;
|
||||
line-height: 70px;
|
||||
background: black;
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.top-space {
|
||||
margin-top: 70px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.search {
|
||||
border-radius:25px;
|
||||
background-color: #171618;
|
||||
border-color: #a6a6a6;
|
||||
padding: 10px;
|
||||
color: white;
|
||||
font-size: medium;
|
||||
}
|
||||
</style>
|
||||
<ul class="nav">
|
||||
<li class="logo">YTSFlix</li>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li style="float: right">
|
||||
<form id="search-form" action="javascript:search()">
|
||||
<script type="text/javascript">
|
||||
function search() {
|
||||
var search = document.getElementById('search').value;
|
||||
window.location = "/movies/" + search;
|
||||
}
|
||||
</script>
|
||||
<input id="search" type="text" name="search" class="search" placeholder="Search"/>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</header>
|
||||
<div class="top-space">
|
||||
</div>
|
||||
{{end}}
|
35
static/watch.html
Normal file
35
static/watch.html
Normal file
@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{ .Title }}</title>
|
||||
<style>html, body {
|
||||
padding: 0;
|
||||
margin: 0
|
||||
}
|
||||
.video-container {
|
||||
background: black;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
min-height: 100%;
|
||||
vertical-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
video {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="video-container">
|
||||
<video id="video" controls autoplay preload="metadata">
|
||||
<source src="{{ .Link }}" type="video/mp4">
|
||||
{{ range $lang, $link := .Subtitles }}
|
||||
<track label=" {{ $lang }} " kind="subtitles" srclang="en" src="{{ $link }}">
|
||||
{{ end }}
|
||||
</video>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user