-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·270 lines (236 loc) · 7.9 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
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>me di a pa th ic</title>
<link rel="stylesheet" href="../reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="coda-slider-2.0.css" type="text/css" media="screen" />
<!-- link href='http://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css' -->
<!-- <link href='http://fonts.googleapis.com/css?family=Josefin+Sans+Std+Light'
rel='stylesheet' type='text/css'> -->
<script src="jquery.js" type="text/javascript"></script>
<script type="text/javascript" src="jquery.easing.1.3.js"></script>
<script type="text/javascript" src="jquery.coda-slider-2.0.js"></script>
<script type="text/javascript" src="jquery.tools.min.js"></script>
<script>
/* TODO:
*/
$(document).ready(function(){
// make all links BEND TO MY WILL
$("#sliderwrapper a").click(function(e){
e.preventDefault();
});
$("intro").flashembed("~/media/CuriousBugs2.swf");
$.get('portfolio.xml', function(xml) {
// get global tag list
var contentArray = new Array();
var tmpTaglist = [];
$(xml).find('item').each(function(){
contentArray[contentArray.length]=$(this).attr('id');
// generate global taglist
var taglist = $(this).find('tags').text();
if (taglist.length > 0){
var tagarray = taglist.split(",");
for (var i=0; i<tagarray.length; i++){
tmpTaglist.push(tagarray[i]);
}
}
});
var globalTaglist = tmpTaglist.unique();
for (var j = 0; j<globalTaglist.length; j++){
// build the tabs based on the tag list
$("#portfolio").append(
'<div class = "panel" style="display: block;">'+
'<div class = "panel-wrapper">'+
'<h2 class="title" ">'+ globalTaglist[j] +'</h2>'+
'<div id="'+ globalTaglist[j] + '">' +
'<ul>'
);
// add individual elements to each tab
$(xml).find('item').each(function(){
var id = $(this).attr('id');
var title = $(this).find('title').text();
var src = $(this).find('src').text();
var desc = $(this).find('desc').text();
var content = $(this).find('content').text();
var onetaglist = $(this).find('tags').text();
var onetagarray = onetaglist.split(",");
$(onetaglist).find('flash').each(function(){
var isflash = true;
console.log("found a flash");
});
//array of content
for (var k=0; k<contentArray.length; k++){
if(contentArray[k] == id){
// this next line kept me up for a while. We have to
// initialize the second-level array, or it fails silently
// and the values are all undefined. Oops.
contentArray[k] = [];
contentArray[k][0] = id;
contentArray[k][1] = title;
contentArray[k][2] = src;
contentArray[k][3] = desc;
contentArray[k][4] = content;
}
}
// array of tags
for (var l=0; l<onetagarray.length; l++){
if (onetagarray[l] == globalTaglist[j]){
$("#"+globalTaglist[j]).append(
'<li> : <a class="'+ id +'" href="#' + title +
'"> <img src="' + src + '"> </a>: </li>'
);
}
}
})
// append the end tags
$("#portfolio").append(
'</ul></div></div></div>'
);
}
// now actually render the codaSlider
$('#portfolio').codaSlider();
// now that we have all the html in, we can add the navigational
// pretties.
$("nav a").each(function(){
$( $(this).attr("href") ).slideUp("fast");
})
$(" a").click(function(event){
$( $(this).attr("href") ).slideToggle("slow");
if($(this).attr("href") == "#sliderwrapper"){
$("#mainstage").slideUp();
};
});
// generate the individual portfolio pages on the fly
$(".panel-wrapper a").click(function(event){
var currentitem = ($(this).attr("class")) - 1;
// console.log(currentitem);
var itemCss = {
backgroundColor: "#00ff00"
}
// remove old item
$("#singleitem").css(itemCss);
$("#singleitem").slideUp();
$("#singleitem").remove();
// make new item
console.log("item is " + contentArray[currentitem][4] );
$('#mainstage').append(
'<div id="singleitem" visibility="none">'+
// content of the item
'<div class="itemtitle">'+
// $(this).attr("href") +
contentArray[currentitem][1].toString() +
'</div>'+
'<div class="item">'+
/*
if($(this).isflash == true){
<object type="application/x-shockwave-flash"
data="video_player.swf"
width="640" height="480">
<param name="movie" value="video_player.swf" />
<param name="allowScriptAccess" value="always"/>
<param name="allowFullScreen" value="true"/>
</object>
} else {
$('#mainstage').append(
'<img src='+ contentArray[currentitem][2] +
}
*/
/* known good img src code */
//'<img src=' + contentArray[currentitem][2] +
//'>
/* experimental dynamic version*/
contentArray[currentitem][4].toString() +
'</div><div class="itemdesc">'+
contentArray[currentitem][3].toString() +
'</div>'+
// /item
'</div>'
);
$("#singleitem").slideDown();
});
});
// the Uniquify function
Array.prototype.unique =
function() {
var a = [];
var l = this.length;
for(var i=0; i<l; i++) {
for(var j=i+1; j<l; j++) {
// If this[i] is found later in the array
if (this[i] === this[j])
j = ++i;
}
a.push(this[i]);
}
return a;
};
});
</script>
</head>
<body>
<header>
<h1>
mediapathic
</h1>
</header>
<nav>
<!-- navigation -->
<ul>
<li><a href="#sliderwrapper">Portfolio</a></li>
<li><a href="#find">Find Me</a></li>
</ul>
</nav>
<section>
<div id="intro">
<!-- introduction -->
<h2>Look it's Me</h2>
<p>
Mediapathic is the online collection point of Steen Comer.
I am a motion graphics designer, developer, vj, musician, and overall
ephemerologist. I try to bridge the supposed gap between the worlds of design and
engineering. Mostly these days I am focused on writing code to make beautiful
things happen. This site serves mostly as a portfolio, as well as a gateway to
find other data relevant to me elsewhere.
</p>
<object type="application/x-shockwave-flash" data="media/CuriousBugs.swf" width="640" height="480">
<param name="movie" value="media/CuriousBugs2.swf" />
<param name="allowScriptAccess" value="always"/>
<param name="allowFullScreen" value="true"/>
</object>
</section>
</div>
<img id="logo" src="../images/gear1.png" alt="headimg">
<!-- content -->
<div id="content">
<section>
<div class="coda-slider-wrapper" id="sliderwrapper">
<div class="coda-slider preload" id="portfolio">
<!-- a bunch of content will magically appear here! -->
</div><!-- .coda-slider -->
</div><!-- .coda-slider-wrapper -->
</section>
</div>
<div id="mainstage">
<!--where items live -->
</div>
<div id="find">
<h2> Additional resources </h2>
<p> Customers who enjoyed my website in the past also liked: </p>
<ul>
<li><a href="http://twitter.com/mediapathic">My twitter</a></li>
<li><a href="http://mediapathic.soup.io">My Soup</a></li>
<li><a href="http://mediapathic.tumblr.com">My Tumblr</a></li>
<li><a href="http://flickr.com/pvck">My Flickr</a></li>
<li><a href="http://www.facebook.com/mediapathic">My Book of the Faces</a></li>
</ul>
</div>
<div id="aside">
<!--sidebar -->
</div>
<footer>
<!-- well, yes, the footer -->
</footer>
</body>
</html