-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
142 lines (133 loc) · 4.02 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!doctype html>
<html lang="en-us">
<html>
<head>
<title>Zekai O. Ozalp</title>
<meta charset=utf-8>
<style>
body {
margin: 0;
background: #000;
}
video {
position: fixed;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
transform: translateX(-50%) translateY(-50%);
background-size: fit;
transition: 1s opacity;
}
.stopfade {
opacity: .5;
}
#zekai {
font-family: Agenda-Light, Agenda Light, Agenda, Arial Narrow, sans-serif;
font-weight:100;
background: rgba(0,0,0,0.3);
color: white;
padding: 2rem;
width: 33%;
margin:2rem;
float: right;
font-size: 1.2rem;
}
h1 {
font-size: 3rem;
margin-top: 0;
letter-spacing: .3rem;
}
#pauseButton {
display: block;
padding: .4rem;
border: none;
margin: 1rem;
font-size: 1.3rem;
background: rgba(255,255,255,0.23);
color: #fff;
border-radius: 3px;
cursor: pointer;
transition: .3s background;
}
#pauseButton:hover {
background: rgba(0,0,0,0.5);
}
a {
display: inline-block;
color: #fff;
text-decoration: none;
background:rgba(0,0,0,0.5);
padding: .5rem;
transition: .6s background;
}
a:hover{
background:rgba(0,0,0,0.9);
}
@media screen and (max-width: 500px) {
div {
width:70%;
}
}
@media screen and (max-device-width: 800px) {
html {
background: url(loading.gif) #000 no-repeat center center fixed;
}
#bgvid {
display: none;
}
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var vid = document.getElementById("bgvid");
var pauseButton = document.querySelector("#pauseButton");
function vidFade() {
vid.classList.add("stopfade");
}
vid.addEventListener('ended', function()
{
// only functional if "loop" is removed
vid.pause();
// to capture IE10
vidFade();
});
pauseButton.addEventListener("click", function() {
vid.classList.toggle("stopfade");
if (vid.paused) {
vid.play();
pauseButton.innerHTML = "Pause";
} else {
vid.pause();
pauseButton.innerHTML = "Paused";
}
});
});
</script>
</head>
<body>
<video autoplay poster="" id="bgvid" loop>
<!-- WCAG general accessibility recommendation is that media such as background video play through only once. Loop turned on for the purposes of illustration; if removed, the end of the video will fade in the same way created by pressing the "Pause" button -->
<source src="video.mp4" type="video/mp4">
</video>
<div id="zekai">
<h1>Zekai Oğuz Özalp</h1>
<p>
<a href="https://www.facebook.com/zoozalp">Facebook</a>
<a href="//twitter.com/zoozalp">Twitter</a>
<a href="https://www.linkedin.com/in/zekai">Linkedin</a>
<a href="https://github.com/zoozalp">Github</a>
</p>
<hr>
<p>When in the Course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with another, and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and of Nature's God entitle them, a decent respect to the opinions of mankind requires that they should declare the causes which impel them to the separation.</p>
<p>Declaration of Independence</p>
<p>July 4th, 1776</p>
</div>
<button id="pauseButton">Pause Video</button>
</body>
</html>