-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
196 lines (153 loc) · 6.04 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Programmer
</title>
<link href="css/css.css" rel="stylesheet" type="text/css"/>
<link href="css/hover-min.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="home" class="row">
<div id="my-image" class="row"><img src="img/C1.jpg" width="250" height="250" class="circle"></div>
<div id="my-name" class="row">
<h2>احمد حسین خانی هستم</h2>
<h4>من عاشق برنامه نویسی و دنیای آی تی هستم و به افراد، سازمانها و شرکت ها کمک میکنم تا نرم افزار و وب سایت مورد
علاقه خودشون رو داشته باشند.</h4>
</div>
<div id="div-btn-start"><a href="#profile" id="btnStart" class="hvr-grow-shadow">شروع</a></div>
</div>
<!--end of banner-->
<header class="row">
<div id="khani" class="vertical-center">ENGINEERKHANI</div>
<nav>
<a href="#" id="pull">
<div id="menuPic"></div>
</a>
<ul>
<li><a href="#profile">پروفایل</a></li>
<li><a href="#rezume">رزومه</a></li>
<li><a href="#sample">نمونه کار</a></li>
<li><a href="#blog">وبلاگ شخصی</a></li>
<li><a href="#contact">تماس با من</a></li>
<li><a href="#friends">دوستان</a></li>
</ul>
</nav>
</header>
<div id="profile">پروفایل</div>
<div id="rezume">رزومه</div>
<div id="sample">نمونه کار</div>
<div id="blog">وبلاگ شخصی</div>
<div id="contact">تماس با من</div>
<div id="friends">
<div id="container">
<div class="content">دوستان</div>
<video autoplay loop muted>
<source src="video/Base Lab.MP4" type="video/mp4">
</video>
</div>
</div>
<footer>this is footer</footer>
<script src="javascript/jquery-1.9.1.min.js">
</script>
<script type="text/javascript">
$('#my-name').hide();
$('#my-image').slideToggle(2000, function () {
$('#my-name').animate({width: 'toggle'}, 350);
});
var ftop = 0;
$(window).scroll(function () {
var hight = $('header').position();
var top = hight.top;
var sticky = $('header');
if (ftop == 0) {
ftop = top;
}
scroll = $(window).scrollTop();
if (scroll > ftop) {
sticky.addClass('fixed');
$('header').addClass('header-style');
} else {
$('header').removeClass('header-style');
sticky.removeClass('fixed');
}
});
/**/
/**/
/**/
/*scroll to selected a in nave bar*/
$('header a[href^="#"]','#div-btn-start a').on('click', function(event) {
var target = $( $(this).attr('href') );
scrollTo(target);
// if( target.length ) {
// event.preventDefault();
// $('html, body').animate({
// scrollTop: target.offset().top
// }, 1000);
// }
});
// video in bg
// /**/
// IE detect
function iedetect(v) {
var r = RegExp('msie' + (!isNaN(v) ? ('\\s' + v) : ''), 'i');
return r.test(navigator.userAgent);
}
//togle nave menu
var pull = $('#pull');
menu = $('header nav ul');
menuHeight = menu.height();
$(pull).on('click', function (e) {
e.preventDefault();
menu.slideToggle('slow', 'linear');
});
// For mobile screens, just show an image called 'poster.jpg'. Mobile
// screens don't support autoplaying videos, or for IE.
if (screen.width < 800 || iedetect(8) || iedetect(7) || 'ontouchstart' in window) {
(adjSize = function () { // Create function called adjSize
$width = $(window).width(); // Width of the screen
$height = $(window).height(); // Height of the screen
// Resize image accordingly
$('#container').css({
'background-image': 'url(poster.jpg)',
'background-size': 'cover',
'width': $width + 'px',
'height': $height + 'px'
});
// Hide video
$('video').hide();
})(); // Run instantly
// Run on resize too
$(window).resize(adjSize);
}
else {
// Wait until the video meta data has loaded
$('#container video').on('loadedmetadata', function () {
var $width, $height, // Width and height of screen
$vidwidth = this.videoWidth, // Width of video (actual width)
$vidheight = this.videoHeight, // Height of video (actual height)
$aspectRatio = $vidwidth / $vidheight; // The ratio the video's height and width are in
(adjSize = function () { // Create function called adjSize
$width = $(window).width(); // Width of the screen
$height = $(window).height(); // Height of the screen
$boxRatio = $width / $height; // The ratio the screen is in
$adjRatio = $aspectRatio / $boxRatio; // The ratio of the video divided by the screen size
// Set the container to be the width and height of the screen
$('#container').css({'width': $width + 'px', 'height': $height + 'px'});
if ($boxRatio < $aspectRatio) { // If the screen ratio is less than the aspect ratio..
// Set the width of the video to the screen size multiplied by $adjRatio
$vid = $('#container video').css({'width': $width * $adjRatio + 'px'});
} else {
// Else just set the video to the width of the screen/container
$vid = $('#container video').css({'width': $width + 'px'});
}
})(); // Run function immediately
// Run function also on window resize.
$(window).resize(adjSize);
});
}
// end of video
</script>
</body>
</html>