-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
183 lines (173 loc) · 6.87 KB
/
index.html
File metadata and controls
183 lines (173 loc) · 6.87 KB
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
<!DOCTYPE HTML>
<html>
<title>C.N. Portfolio</title>
<head>
<meta property="og:title" content="Callum Nichols Portfolio" />
<meta property="og:description" content="Examples of past works by Callum Nichols" />
<meta property="og:url" content="http://cellproductions.github.io/" />
<meta property="og:image" content="http://cellproductions.github.io/images/linkedin_image.png" />
<link rel="shortcut icon" href="./images/icon.ico">
<link rel="stylesheet" type="text/css" href="index.css">
<script src="./jquery-2.1.3.min.js"></script>
<script>
var imgExt = '.png';
var hoverExt = '_over' + imgExt;
var downloadImgPath = './images/download';
var blogImgPath = "./images/blog";
var gProjects =
[
{
name: 'Krypta Editor',
repo: 'http://github.com/cellproductions/KryptaEditorQT',
titlePath: './images/KryptaEditorQT/title',
links: [
'./images/KryptaEditorQT/1.png',
'./images/KryptaEditorQT/2.png',
'./images/KryptaEditorQT/3.png',
'./images/KryptaEditorQT/4.png',
'./images/KryptaEditorQT/5.png',
'./images/KryptaEditorQT/6.png',
'./images/KryptaEditorQT/7.png',
'./images/KryptaEditorQT/8.png',
],
index: 0,
download: '',
description: 'A detailed map/campaign editor for a 2D action/puzzle game called Krypta. Includes the floor designer, entity properties editing, animation creation and management, and an audio manager. Created for my final university project (receiving a High Distinction) and written in C++ using Qt and Krypta2D (a fast, lightweight, 2D game development framework written in C++, featuring thread support, networking, graphics, audio, as well as file system and window management) developed by myself and one other developer. December 2014.'
},
{
name: 'System Command',
repo: 'http://github.com/cellproductions/7dRTS',
titlePath: './images/7dRTS/title',
links: [
'./images/7dRTS/1.png',
'./images/7dRTS/2.png',
'./images/7dRTS/3.png',
'./images/7dRTS/4.png',
'./images/7dRTS/5.png'
],
index: 3,
download: 'https://dl.dropboxusercontent.com/u/28551411/7drts.zip',
description: 'A 2D real-time strategy game made for a Ludum Dare mini competition (the 7dRTS competition) where developers were to create an RTS game within seven days. Features randomly generated networks of stars, basic AI, and basic resource gathering through the capturing of stars, as well as its own (very small) soundtrack. Written in Java using Slick2D (lwjgl, jogg, jorbis) and my own Java library used in 2D game development. August 2013.'
},
{
name: 'Notes Oblitus',
repo: 'http://github.com/cellproductions/NotesOblitus',
titlePath: './images/NotesOblitus/title',
links: [
'./images/NotesOblitus/1.png',
'./images/NotesOblitus/2.png',
'./images/NotesOblitus/3.png',
'./images/NotesOblitus/4.png',
'./images/NotesOblitus/5.png'
],
index: 0,
download: 'https://dl.dropboxusercontent.com/u/28551411/NotesOblitus.zip',
description: 'A todo/note manager for projects involving any language. Features manual/automatic project scanning, saving/loading of settings for individual projects, search options, tag/extension/file/directory filters, note previews, opening notes in external editors, statistics for scanned files/directories/tags, exporting of discovered notes and statistics into different formats, automatic updating, proxy options, project-wide note-style changing and deletion, etc. Written in C# using Winforms and Json.NET. February 2015.'
}
];
function preloadImages()
{
var paths = [];
$.each(gProjects, function(i, val)
{
paths.push(val.titlePath + hoverExt);
});
paths.push(downloadImgPath + hoverExt);
paths.push(blogImgPath + hoverExt);
$.each(paths, function(i, val)
{
$('<img />').attr('src', val);
});
}
$(document).ready(function()
{
var finalHtml = '';
for (var i = 0; i < gProjects.length; ++i)
{
var p = gProjects[i];
finalHtml += '<div id="prj' + i + '" class="project">';
finalHtml += '<a href="' + p.repo + '">';
finalHtml += '<img class="prjtitle" id="prjtitle' + i + '" src="' + p.titlePath + '.png" /></a></br>';
finalHtml += '<div class="flip"><div class="front">';
finalHtml += '<img class="prjimg" id="prjimg' + i + '" src="' + p.links[p.index] + '" />';
finalHtml += '</div><div class="back">';
finalHtml += '<p class="back-desc">' + p.description + '</p></div></div>';
if (p.download.length > 0)
{
finalHtml += '</br><a href="' + p.download + '">';
finalHtml += '<img class="prjdownload" id="download' + i + '" src="' + downloadImgPath + imgExt + '" /></a>';
}
finalHtml += '</div>';
}
$('#main').html(finalHtml);
var width = $(window).width() / 4;
var height = $(window).width() / 5;
$('.prjimg').width(width + 'px');
$('.prjimg').height(height + 'px');
window.setInterval(function()
{
$('img.prjimg').each(function(gindex)
{
var index = gProjects[gindex].index + 1;
if (index >= gProjects[gindex].links.length)
index = 0;
$(this).attr('src', gProjects[gindex].links[index]);
gProjects[gindex].index = index;
});
}, 3000);
preloadImages();
});
/*
$(document).on('click', 'img.prjimg', function()
{
var id = $(this).attr("id");
var gindex = Number(id.slice(-1));
var index = gProjects[gindex].index + 1;
if (index >= gProjects[gindex].links.length)
index = 0;
$(this).attr('src', gProjects[gindex].links[index]);
gProjects[gindex].index = index;
});
*/
$(document).on('mouseenter', 'img.prjtitle', function()
{
var id = $(this).attr("id");
var gindex = Number(id.slice(-1));
$(this).attr('src', gProjects[gindex].titlePath + hoverExt);
});
$(document).on('mouseleave', 'img.prjtitle', function()
{
var id = $(this).attr("id");
var gindex = Number(id.slice(-1));
$(this).attr('src', gProjects[gindex].titlePath + imgExt);
});
$(document).on('mouseenter', 'img.prjdownload', function()
{
$(this).attr('src', downloadImgPath + hoverExt);
});
$(document).on('mouseleave', 'img.prjdownload', function()
{
$(this).attr('src', downloadImgPath + imgExt);
});
$(document).on('click', '#blog', function()
{
window.open('http://www.thefinalalert.wordpress.com', '_blank');
});
$(document).on('mouseenter', '#blog', function()
{
$(this).attr('src', blogImgPath + hoverExt);
});
$(document).on('mouseleave', '#blog', function()
{
$(this).attr('src', blogImgPath + imgExt);
});
</script>
</head>
<body>
<div id="header">
<img class="banner" src="./images/header.png" /></br></br>
<img id="blog" class="banner" src="./images/blog.png" />
</div>
<div id="main"></div>
</body>
</html>