-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
92 lines (77 loc) · 3.46 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SafetyCulture: Work Experience</title>
<script
src="https://code.jquery.com/jquery-3.2.1.js"
integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE="
crossorigin="anonymous">
</script>
<!--Page icon-->
<link rel='shortcut icon' type='image/x-icon' href='favicon.png' />
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
<!--Include background particle JS file-->
<script src="js/particle/particles.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--Include the page style-->
<link rel='stylesheet' href="css/style.css">
<script>
var jsonOut = null;
var canSwitch = true;
var pageIndex = -1; //Set it to -1 so the 'setPage' function will actually run.
function setPage(index){
if(pageIndex == index || !canSwitch){ return; }
pageIndex = index;
//Fade out the main div.
$('.main').animate({opacity: 0, 'padding-left': '10px'}, 'slow', function(){
//Update the text.
$('#title').html(jsonOut.sections[index].title);
$('#text').html(jsonOut.sections[index].text);
//Fade the div back in.
$('.main').animate({opacity: 1, 'padding-left': '0px'}, 'slow', function(){ canSwitch = true; });
})
}
//Get the JSON from the 'text.json' file on the server
$.getJSON( "js/text.json", function( json ){
jsonOut = json;
setPage(0);
});
//Make sure the background resizes with the device.
window.onresize = function(){
$('.particles-js-canvas-el').width($(window).width());
$('.particles-js-canvas-el').height($(window).height());
}
</script>
</head>
<body bgcolor="#000000">
<div id='particles-js'></div>
<script src='js/particle/particle-load.js'></script>
<header>
<nav class='z-depth-0 transparent'>
<div class='nav-wrapper'>
<div id='nav-mobile' class='left'>
<a href='#'><img class='navlogo' src='img/logo.png'></a>
</div>
<div class='left navtext' style='padding-top: 3px'>WORK EXPERIENCE</div>
</div>
</nav>
</header>
<br>
<div style='margin-top: 25px'>
<div class='main' style='opacity: 0'>
<h1 id='title' class='noselect'>Lol</h1>
<div class='textnav'>
<a class='left' onclick='setPage(0)'>WHAT I DID</a> | 
<a onclick='setPage(1)'>WHAT I LEARNED</a> | 
<a onclick='setPage(2)'>MY PERSONAL EXPERIENCE</a>
</div>
<p id='text' class='noselect'>Testing</p>
</div>
</div>
</body>
</html>