-
Notifications
You must be signed in to change notification settings - Fork 0
/
sketch.js
251 lines (149 loc) · 5.53 KB
/
sketch.js
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
// function getCssValuePrefix()
// {
// var rtrnVal = '';//default to standard syntax
// var prefixes = ['-o-', '-ms-', '-moz-', '-webkit-'];
// // Create a temporary DOM object for testing
// var dom = document.createElement('div');
// for (var i = 0; i < prefixes.length; i++)
// {
// // Attempt to set the style
// dom.style.background = prefixes[i] + 'linear-gradient(#000000, #ffffff)';
// // Detect if the style was successfully set
// if (dom.style.background)
// {
// rtrnVal = prefixes[i];
// }
// }
// dom = null;
// delete dom;
// return rtrnVal;
// }
function homecolor() {
document.body.style.backgroundColor = "rgb(68,68,68)";
}
function workcolor() {
document.body.style.backgroundColor = "rgb(68,68,68)";
//var dome = document.getElementById('bodystyle');
// dome.style.backgroundImage = getCssValuePrefix() + 'linear-gradient('
// + "to top right" + ', ' + "black" + ', ' + "red" + ')';
//dome.style.backgroundImage ='-moz-linear-gradient('
// + "to top right" + ', ' + "black" + ', ' + "red" + ')';
// var dom = document.getElementById('bodystyle');
// dom.style.backgroundImage = '-moz-linear-gradient('
// + "-45deg" + ', ' + "black" + ', ' + "green" + ')';
}
function artscolor() {
document.body.style.backgroundColor = "rgb(68,68,68)";
}
function resumecolor() {
document.body.style.backgroundColor = "rgb(68,68,68)";
}
function sentjs() {
alert("Message Sent Successfully!");
}
// Setting the gradient with the proper prefix
// dom.style.backgroundImage = getCssValuePrefix() + 'linear-gradient('
// + orientation + ', ' + colorOne + ', ' + colorTwo + ')';
// if (window.addEventListener) window.addEventListener('DOMMouseScroll', wheel, false);
// window.onmousewheel = document.onmousewheel = wheel;
// function wheel(event) {
// var delta = 0;
// if (event.wheelDelta) delta = event.wheelDelta / 120;
// else if (event.detail) delta = -event.detail / 3;
// handle(delta);
// if (event.preventDefault) event.preventDefault();
// event.returnValue = false;
// }
// function handle(delta) {
// var time = 300;
// var distance = 200;
// $('html, body').stop().animate({
// scrollTop: $(window).scrollTop() - (distance * delta)
// }, time );
// }
var $numberofSlides = $('.carousel-item').length;
var $currentSlide = Math.floor((Math.random() * $numberofSlides));
$('.carousel-indicators li').each(function(){
var $slideValue = $(this).attr('data-slide-to');
if($currentSlide == $slideValue) {
$(this).addClass('active');
$item.eq($slideValue).addClass('active');
} else {
$(this).removeClass('active');
$item.eq($slideValue).removeClass('active');
}
});
// function setup() {
// }
// function draw() {
// noStroke();
// fill(100, 250, 100);
// translate(mouseX, mouseY);
// angleMode(DEGREES);
// rotate(-45);
// beginShape();
// vertex(0, 0);
// vertex(-8, 15);
// vertex(0, 10);
// vertex(8, 15);
// endShape();
// }
// $('#carousel-example-captions').on('slid.bs.carousel', function () {
// $(this).find('.active .carousel-letters').animate(
// {bottom: '20px'},
// '1000'
// );
// })
// var limenu = document.getElementsByClassName("limenu");
// var windowWidth = window.innerWidth;
// if (windowWidth < 320) {
// limenu.fontSize = 20px;
// }
//Color Changing on Menu
$(document).ready(function(){
$("#homemenu").css({color:"white","border-bottom":"2px solid white"}),
$("#homediv").show(),
$("#worksdiv").hide(),
$("#artsdiv").hide(),
$("#resumediv").hide(),
$("#homemenu").click(function(){
$(this).css({color:"white","border-bottom":"2px solid white"}),
$("#resumemenu, #worksmenu, #artsmenu").css({color:"rgb(0, 255, 255)","border-bottom":"0px"}),
$("#homediv").show(300),
$("#worksdiv").hide(100),
$("#artsdiv").hide(100),
$("#resumediv").hide(100)}),
$("#resumemenu").click(function(){
$(this).css({color:"white","border-bottom":"2px solid white"}),
$("#homemenu, #worksmenu, #artsmenu").css({color:"rgb(0, 255, 255)","border-bottom":"0px"}),
$("#homediv").hide(100),
$("#worksdiv").hide(100),
$("#artsdiv").hide(100),
$("#resumediv").show(100)}),
$("#artsmenu").click(function(){
$(this).css({color:"white","border-bottom":"2px solid white"}),
$("#homemenu, #worksmenu, #resumemenu").css({color:"rgb(0, 255, 255)","border-bottom":"0px"}),
$("#homediv").hide(100),
$("#worksdiv").hide(100),
$("#artsdiv").show(100),
$("#resumediv").hide(100)}),
$("#worksmenu").click(function(){
$(this).css({color:"white","border-bottom":"2px solid white"}),
$("#homemenu, #resumemenu, #artsmenu").css({color:"rgb(0, 255, 255)","border-bottom":"0px"}),
$("#homediv").hide(100),
$("#artsdiv").hide(100),
$("#worksdiv").show(100),
$("#resumediv").hide(100)})});
//IMG TO IFRAMES
$(document).ready(function(){
// $("#lastdiv").hide()
// $("#flipcard").flip(function(){
// console.log("TRY");
// $("#firstdiv").hide()
// $("#lastdiv").show()
// return true;
// })
// $(".workdiv").flip({
// trigger: 'hover'
// });
});