Skip to content

Commit 4dd4ca5

Browse files
committedFeb 14, 2012
assignment template
1 parent a836a6a commit 4dd4ca5

22 files changed

+7105
-0
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

‎LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
This source code for this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
2+
http://creativecommons.org/licenses/by-nc-sa/3.0/
3+
4+
This site contains code from several open source projects:
5+
6+
Twitter Bootstrap
7+
https://github.com/twitter/bootstrap/blob/master/LICENSE
8+
9+
jQuery
10+
https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt
11+
12+
Backbone.js
13+
https://github.com/documentcloud/backbone/blob/master/LICENSE
14+
15+
Fancybox2
16+
https://github.com/fancyapps/fancyBox
17+
http://creativecommons.org/licenses/by-nc/3.0/
18+
19+
The author of this site reserves copyright on their original content content.

‎README.markdown

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Information Architecture

‎images/187.jpg

5.49 KB
Loading

‎images/glyphicons-halflings-white.png

4.25 KB
Loading

‎images/glyphicons-halflings.png

4.25 KB
Loading

‎index.html

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>A Generic Page</title>
6+
<meta name="description" content="something good should go here">
7+
<meta name="author" content="your name should go here">
8+
9+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
10+
<!--[if lt IE 9]>
11+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
12+
<![endif]-->
13+
14+
<!-- Base Stylsheets http://twitter.github.com/bootstrap/ -->
15+
<link rel="stylesheet" href="stylesheets/lib/bootstrap.css" >
16+
<link rel="stylesheet" href="stylesheets/lib/jquery.fancybox.css" >
17+
18+
19+
<!-- Your Stylesheets -->
20+
<link rel="stylesheet" href="stylesheets/main.css" >
21+
22+
23+
<!-- jQuery http://jquery.com/ -->
24+
<script src="javascripts/lib/jquery-1.7.1.min.js"></script>
25+
26+
<!-- Bootstrap Javascripts http://twitter.github.com/bootstrap/javascript.html -->
27+
<script src="javascripts/lib/bootstrap.js"></script>
28+
29+
<!-- Fancybox Lightbox http://fancyapps.com/fancybox/#examples -->
30+
<script src="javascripts/lib/jquery.fancybox.js"></script>
31+
32+
33+
<!-- Your Javascripts -->
34+
<script src="javascripts/main.js"></script>
35+
36+
</head>
37+
38+
<body>
39+
<div class="container">
40+
41+
Put Stuff Here
42+
43+
</div> <!-- end container -->
44+
45+
</body>
46+
</html>

‎javascripts/lib/bootstrap.js

+1,722
Large diffs are not rendered by default.

‎javascripts/lib/jquery-1.7.1.min.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎javascripts/lib/jquery.fancybox.js

+1,310
Large diffs are not rendered by default.

‎javascripts/main.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
$(document).ready(function() {
2+
3+
/*Put your Javascript code here*/
4+
5+
/*
6+
Simple image gallery. Use default settings
7+
*/
8+
$('.fancybox').fancybox();
9+
10+
});

‎stylesheets/lib/blank.gif

43 Bytes
Loading

‎stylesheets/lib/bootstrap.css

+3,363
Large diffs are not rendered by default.

‎stylesheets/lib/fancybox_loading.gif

5.83 KB
Loading

‎stylesheets/lib/fancybox_sprite.png

2.69 KB
Loading
2.34 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
#fancybox-buttons {
2+
position: fixed;
3+
left: 0;
4+
width: 100%;
5+
z-index: 1005;
6+
}
7+
8+
#fancybox-buttons.top {
9+
top: 10px;
10+
}
11+
12+
#fancybox-buttons.bottom {
13+
bottom: 10px;
14+
}
15+
16+
#fancybox-buttons ul {
17+
display: block;
18+
width: 170px;
19+
height: 30px;
20+
margin: 0 auto;
21+
padding: 0;
22+
list-style: none;
23+
background: #111;
24+
-webkit-box-shadow: 0 1px 3px #000,0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05);
25+
-moz-box-shadow: 0 1px 3px #000,0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05);
26+
background: #111 -webkit-gradient(linear,0% 0%,0% 100%,from(rgba(255,255,255,.2)),color-stop(.5,rgba(255,255,255,.15)),color-stop(.5,rgba(255,255,255,.1)),to(rgba(255,255,255,.15)));
27+
background: #111 -moz-linear-gradient(top,rgba(255,255,255,.2) 0%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.1) 50%,rgba(255,255,255,.15) 100%);
28+
border-radius: 3px;
29+
}
30+
31+
#fancybox-buttons ul li {
32+
float: left;
33+
margin: 0;
34+
padding: 0;
35+
}
36+
37+
#fancybox-buttons a {
38+
display: block;
39+
width: 30px;
40+
height: 30px;
41+
text-indent: -9999px;
42+
background-image: url('fancybox_buttons.png');
43+
background-repeat: no-repeat;
44+
outline: none;
45+
}
46+
47+
#fancybox-buttons a.btnPrev {
48+
width: 32px;
49+
background-position: 6px 0;
50+
}
51+
52+
#fancybox-buttons a.btnNext {
53+
background-position: -33px 0;
54+
border-right: 1px solid #3e3e3e;
55+
}
56+
57+
#fancybox-buttons a.btnPlay {
58+
background-position: 0 -30px;
59+
}
60+
61+
#fancybox-buttons a.btnPlayOn {
62+
background-position: -30px -30px;
63+
}
64+
65+
#fancybox-buttons a.btnToggle {
66+
background-position: 3px -60px;
67+
border-left: 1px solid #111;
68+
border-right: 1px solid #3e3e3e;
69+
width: 35px
70+
}
71+
72+
#fancybox-buttons a.btnToggleOn {
73+
background-position: -27px -60px;
74+
}
75+
76+
#fancybox-buttons a.btnClose {
77+
border-left: 1px solid #111;
78+
width: 38px;
79+
background-position: -57px 0px;
80+
}
81+
82+
#fancybox-buttons a.btnDisabled {
83+
opacity : 0.5;
84+
cursor: default;
85+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/*!
2+
* Buttons helper for fancyBox
3+
* version: 1.0.2
4+
* @requires fancyBox v2.0 or later
5+
*
6+
* Usage:
7+
* $(".fancybox").fancybox({
8+
* buttons: {
9+
* position : 'top'
10+
* }
11+
* });
12+
*
13+
* Options:
14+
* tpl - HTML template
15+
* position - 'top' or 'bottom'
16+
*
17+
*/
18+
(function ($) {
19+
//Shortcut for fancyBox object
20+
var F = $.fancybox;
21+
22+
//Add helper object
23+
F.helpers.buttons = {
24+
tpl: '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:jQuery.fancybox.close();"></a></li></ul></div>',
25+
list: null,
26+
buttons: {},
27+
28+
update: function () {
29+
var toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
30+
31+
//Size toggle button
32+
if (F.current.canShrink) {
33+
toggle.addClass('btnToggleOn');
34+
35+
} else if (!F.current.canExpand) {
36+
toggle.addClass('btnDisabled');
37+
}
38+
},
39+
40+
beforeLoad: function (opts) {
41+
//Remove self if gallery do not have at least two items
42+
if (F.group.length < 2) {
43+
F.coming.helpers.buttons = false;
44+
F.coming.closeBtn = true;
45+
46+
return;
47+
}
48+
49+
//Increase top margin to give space for buttons
50+
F.coming.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
51+
},
52+
53+
onPlayStart: function () {
54+
if (this.list) {
55+
this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
56+
}
57+
},
58+
59+
onPlayEnd: function () {
60+
if (this.list) {
61+
this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
62+
}
63+
},
64+
65+
afterShow: function (opts) {
66+
var buttons;
67+
68+
if (!this.list) {
69+
this.list = $(opts.tpl || this.tpl).addClass(opts.position || 'top').appendTo('body');
70+
71+
this.buttons = {
72+
prev : this.list.find('.btnPrev').click( F.prev ),
73+
next : this.list.find('.btnNext').click( F.next ),
74+
play : this.list.find('.btnPlay').click( F.play ),
75+
toggle : this.list.find('.btnToggle').click( F.toggle )
76+
}
77+
}
78+
79+
buttons = this.buttons;
80+
81+
//Prev
82+
if (F.current.index > 0 || F.current.loop) {
83+
buttons.prev.removeClass('btnDisabled');
84+
} else {
85+
buttons.prev.addClass('btnDisabled');
86+
}
87+
88+
//Next / Play
89+
if (F.current.loop || F.current.index < F.group.length - 1) {
90+
buttons.next.removeClass('btnDisabled');
91+
buttons.play.removeClass('btnDisabled');
92+
93+
} else {
94+
buttons.next.addClass('btnDisabled');
95+
buttons.play.addClass('btnDisabled');
96+
}
97+
98+
this.update();
99+
},
100+
101+
onUpdate: function () {
102+
this.update();
103+
},
104+
105+
beforeClose: function () {
106+
if (this.list) {
107+
this.list.remove();
108+
}
109+
110+
this.list = null;
111+
this.buttons = {};
112+
}
113+
};
114+
115+
}(jQuery));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#fancybox-thumbs {
2+
position: fixed;
3+
left: 0px;
4+
width: 100%;
5+
overflow: hidden;
6+
z-index: 1005;
7+
}
8+
9+
#fancybox-thumbs.bottom {
10+
bottom: 2px;
11+
}
12+
13+
#fancybox-thumbs.top {
14+
top: 2px;
15+
}
16+
17+
#fancybox-thumbs ul {
18+
position: relative;
19+
list-style: none;
20+
margin: 0;
21+
padding: 0;
22+
}
23+
24+
#fancybox-thumbs ul li {
25+
float: left;
26+
padding: 1px;
27+
opacity: 0.5;
28+
}
29+
30+
#fancybox-thumbs ul li.active {
31+
opacity: 0.75;
32+
padding: 0;
33+
border: 1px solid #fff;
34+
}
35+
36+
#fancybox-thumbs ul li:hover {
37+
opacity: 1;
38+
}
39+
40+
#fancybox-thumbs ul li a {
41+
display: block;
42+
position: relative;
43+
overflow: hidden;
44+
border: 1px solid #222;
45+
background: #111;
46+
outline: none;
47+
}
48+
49+
#fancybox-thumbs ul li img {
50+
display: block;
51+
position: relative;
52+
border: 0;
53+
padding: 0;
54+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
/*!
2+
* Thumbnail helper for fancyBox
3+
* version: 1.0.2
4+
* @requires fancyBox v2.0 or later
5+
*
6+
* Usage:
7+
* $(".fancybox").fancybox({
8+
* thumbs: {
9+
* width : 50,
10+
* height : 50
11+
* }
12+
* });
13+
*
14+
* Options:
15+
* width - thumbnail width
16+
* height - thumbnail height
17+
* source - function to obtain the URL of the thumbnail image
18+
* position - 'top' or 'bottom'
19+
*
20+
*/
21+
(function ($) {
22+
//Shortcut for fancyBox object
23+
var F = $.fancybox;
24+
25+
//Add helper object
26+
F.helpers.thumbs = {
27+
wrap: null,
28+
list: null,
29+
width: 0,
30+
31+
//Default function to obtain the URL of the thumbnail image
32+
source: function (el) {
33+
var img = $(el).find('img');
34+
35+
return img.length ? img.attr('src') : el.href;
36+
},
37+
38+
init: function (opts) {
39+
var that = this,
40+
list,
41+
thumbWidth = opts.width || 50,
42+
thumbHeight = opts.height || 50,
43+
thumbSource = opts.source || this.source;
44+
45+
//Build list structure
46+
list = '';
47+
48+
for (var n = 0; n < F.group.length; n++) {
49+
list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>';
50+
}
51+
52+
this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position || 'bottom').appendTo('body');
53+
this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap);
54+
55+
//Load each thumbnail
56+
$.each(F.group, function (i) {
57+
$("<img />").load(function () {
58+
var width = this.width,
59+
height = this.height,
60+
widthRatio, heightRatio, parent;
61+
62+
if (!that.list || !width || !height) {
63+
return;
64+
}
65+
66+
//Calculate thumbnail width/height and center it
67+
widthRatio = width / thumbWidth;
68+
heightRatio = height / thumbHeight;
69+
parent = that.list.children().eq(i).find('a');
70+
71+
if (widthRatio >= 1 && heightRatio >= 1) {
72+
if (widthRatio > heightRatio) {
73+
width = Math.floor(width / heightRatio);
74+
height = thumbHeight;
75+
76+
} else {
77+
width = thumbWidth;
78+
height = Math.floor(height / widthRatio);
79+
}
80+
}
81+
82+
$(this).css({
83+
width: width,
84+
height: height,
85+
top: Math.floor(thumbHeight / 2 - height / 2),
86+
left: Math.floor(thumbWidth / 2 - width / 2)
87+
});
88+
89+
parent.width(thumbWidth).height(thumbHeight);
90+
91+
$(this).hide().appendTo(parent).fadeIn(300);
92+
93+
}).attr('src', thumbSource(this));
94+
});
95+
96+
//Set initial width
97+
this.width = this.list.children().eq(0).outerWidth();
98+
99+
this.list.width(this.width * (F.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (F.current.index * this.width + this.width * 0.5)));
100+
},
101+
102+
//Center list
103+
update: function (opts) {
104+
if (this.list) {
105+
this.list.stop(true).animate({
106+
'left': Math.floor($(window).width() * 0.5 - (F.current.index * this.width + this.width * 0.5))
107+
}, 150);
108+
}
109+
},
110+
111+
beforeLoad: function (opts) {
112+
//Remove self if gallery do not have at least two items
113+
if (F.group.length < 2) {
114+
F.coming.helpers.thumbs = false;
115+
116+
return;
117+
}
118+
119+
//Increase bottom margin to give space for thumbs
120+
F.coming.margin[ opts.position === 'top' ? 0 : 2 ] = opts.height + 30;
121+
},
122+
123+
afterShow: function (opts) {
124+
//Check if exists and create or update list
125+
if (this.list) {
126+
this.update(opts);
127+
128+
} else {
129+
this.init(opts);
130+
}
131+
132+
//Set active element
133+
this.list.children().removeClass('active').eq(F.current.index).addClass('active');
134+
},
135+
136+
onUpdate: function () {
137+
this.update();
138+
},
139+
140+
beforeClose: function () {
141+
if (this.wrap) {
142+
this.wrap.remove();
143+
}
144+
145+
this.wrap = null;
146+
this.list = null;
147+
this.width = 0;
148+
}
149+
}
150+
151+
}(jQuery));

‎stylesheets/lib/jquery.fancybox.css

+224
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
/*! fancyBox v2.0.4 fancyapps.com | fancyapps.com/fancybox/#license */
2+
.fancybox-tmp iframe, .fancybox-tmp object {
3+
vertical-align: top;
4+
padding: 0;
5+
margin: 0;
6+
}
7+
8+
.fancybox-wrap {
9+
position: absolute;
10+
top: 0;
11+
left: 0;
12+
z-index: 1002;
13+
}
14+
15+
.fancybox-outer {
16+
padding: 0;
17+
margin: 0;
18+
background: #f9f9f9;
19+
color: #444;
20+
text-shadow: none;
21+
-webkit-border-radius: 4px;
22+
-moz-border-radius: 4px;
23+
border-radius: 4px;
24+
}
25+
26+
.fancybox-opened {
27+
z-index: 1003;
28+
}
29+
30+
.fancybox-opened .fancybox-outer {
31+
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
32+
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
33+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
34+
}
35+
36+
.fancybox-inner {
37+
width: 100%;
38+
height: 100%;
39+
padding: 0;
40+
margin: 0;
41+
position: relative;
42+
outline: none;
43+
overflow: hidden;
44+
}
45+
46+
.fancybox-error {
47+
color: #444;
48+
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
49+
margin: 0;
50+
padding: 10px;
51+
}
52+
53+
.fancybox-image, .fancybox-iframe {
54+
display: block;
55+
width: 100%;
56+
height: 100%;
57+
border: 0;
58+
padding: 0;
59+
margin: 0;
60+
vertical-align: top;
61+
}
62+
63+
.fancybox-image {
64+
max-width: 100%;
65+
max-height: 100%;
66+
}
67+
68+
#fancybox-loading {
69+
position: fixed;
70+
top: 50%;
71+
left: 50%;
72+
margin-top: -21px;
73+
margin-left: -21px;
74+
width: 42px;
75+
height: 42px;
76+
background: url('fancybox_loading.gif');
77+
opacity: 0.8;
78+
cursor: pointer;
79+
z-index: 1010;
80+
}
81+
82+
.fancybox-close, .fancybox-prev span, .fancybox-next span {
83+
background-image: url('fancybox_sprite.png');
84+
}
85+
86+
.fancybox-close {
87+
position: absolute;
88+
top: -18px;
89+
right: -18px;
90+
width: 36px;
91+
height: 36px;
92+
cursor: pointer;
93+
z-index: 1004;
94+
}
95+
96+
.fancybox-prev, .fancybox-next {
97+
position: absolute;
98+
top: 0;
99+
width: 40%;
100+
height: 100%;
101+
cursor: pointer;
102+
background: transparent url('blank.gif'); /* helps IE */
103+
z-index: 1003;
104+
}
105+
106+
.fancybox-prev {
107+
left: 0;
108+
}
109+
110+
.fancybox-next {
111+
right: 0;
112+
}
113+
114+
.fancybox-prev span, .fancybox-next span {
115+
position: absolute;
116+
top: 50%;
117+
left: -9999px;
118+
width: 36px;
119+
height: 36px;
120+
margin-top: -18px;
121+
cursor: pointer;
122+
z-index: 1003;
123+
}
124+
125+
.fancybox-prev span {
126+
background-position: 0 -36px;
127+
}
128+
129+
.fancybox-next span {
130+
background-position: 0 -72px;
131+
}
132+
133+
.fancybox-prev:hover, .fancybox-next:hover {
134+
visibility: visible;
135+
}
136+
137+
.fancybox-prev:hover span {
138+
left: 20px;
139+
}
140+
141+
.fancybox-next:hover span {
142+
left: auto;
143+
right: 20px;
144+
}
145+
146+
.fancybox-tmp {
147+
position: absolute;
148+
top: -9999px;
149+
left: -9999px;
150+
padding: 0;
151+
overflow: visible;
152+
visibility: hidden;
153+
}
154+
155+
/* Overlay helper */
156+
157+
#fancybox-overlay {
158+
position: absolute;
159+
top: 0;
160+
left: 0;
161+
overflow: hidden;
162+
display: none;
163+
z-index: 1001;
164+
background: #000;
165+
}
166+
167+
/* Title helper */
168+
169+
.fancybox-title {
170+
visibility: hidden;
171+
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
172+
position: relative;
173+
text-shadow: none;
174+
z-index: 1005;
175+
}
176+
177+
.fancybox-opened .fancybox-title {
178+
visibility: visible;
179+
}
180+
181+
.fancybox-title-float-wrap {
182+
position: absolute;
183+
bottom: 0;
184+
right: 50%;
185+
margin-bottom: -35px;
186+
z-index: 1003;
187+
text-align: center;
188+
}
189+
190+
.fancybox-title-float-wrap .child {
191+
display: inline-block;
192+
margin-right: -100%;
193+
padding: 2px 20px;
194+
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
195+
background: rgba(0, 0, 0, 0.8);
196+
-webkit-border-radius: 15px;
197+
-moz-border-radius: 15px;
198+
border-radius: 15px;
199+
text-shadow: 0 1px 2px #222;
200+
color: #FFF;
201+
font-weight: bold;
202+
line-height: 24px;
203+
white-space: nowrap;
204+
}
205+
206+
.fancybox-title-outside-wrap {
207+
position: relative;
208+
margin-top: 10px;
209+
color: #fff;
210+
}
211+
212+
.fancybox-title-inside-wrap {
213+
margin-top: 10px;
214+
}
215+
216+
.fancybox-title-over-wrap {
217+
position: absolute;
218+
bottom: 0;
219+
left: 0;
220+
color: #fff;
221+
padding: 10px;
222+
background: #000;
223+
background: rgba(0, 0, 0, .8);
224+
}

‎stylesheets/main.css

Whitespace-only changes.

0 commit comments

Comments
 (0)
Please sign in to comment.