Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
srct.gmu.io
Commits
ae42f81a
Commit
ae42f81a
authored
Feb 28, 2014
by
Daniel W Bond
Browse files
first (unsuccessful) shot at using parallaxjs
parent
3a572e2b
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
ae42f81a
...
...
@@ -48,7 +48,7 @@ only review by peers
**Also Needs to Be Done**
*
fix the css so there's the nicer titles on all the pages
*
set some stuff up, e.g. with the people page, so adding new individuals doesn't involve touching the template
*
Fi
x carousel through pictures on
front page
*
Fi
gure out parallaxjs (use jquery) for
front page
*
Figure out intellectual property with GMU
*
add piwik opt out link
*
Set up the documents with ability to download pdfs and latex files
...
...
srctweb/website/static/js/parallax.min.js
0 → 100644
View file @
ae42f81a
//============================================================
//
// The MIT License
//
// Copyright (C) 2014 Matthew Wagerfield - @mwagerfield
//
// Permission is hereby granted, free of charge, to any
// person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the
// Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute,
// sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do
// so, subject to the following conditions:
//
// The above copyright notice and this permission notice
// shall be included in all copies or substantial portions
// of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY
// OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
// EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
// OR OTHER DEALINGS IN THE SOFTWARE.
//
//============================================================
(
function
(
t
,
i
,
e
){
"
use strict
"
;
function
s
(
t
,
i
){
this
.
element
=
t
,
this
.
layers
=
t
.
getElementsByClassName
(
"
layer
"
);
var
e
=
{
calibrateX
:
this
.
data
(
this
.
element
,
"
calibrate-x
"
),
calibrateY
:
this
.
data
(
this
.
element
,
"
calibrate-y
"
),
invertX
:
this
.
data
(
this
.
element
,
"
invert-x
"
),
invertY
:
this
.
data
(
this
.
element
,
"
invert-y
"
),
limitX
:
this
.
data
(
this
.
element
,
"
limit-x
"
),
limitY
:
this
.
data
(
this
.
element
,
"
limit-y
"
),
scalarX
:
this
.
data
(
this
.
element
,
"
scalar-x
"
),
scalarY
:
this
.
data
(
this
.
element
,
"
scalar-y
"
),
frictionX
:
this
.
data
(
this
.
element
,
"
friction-x
"
),
frictionY
:
this
.
data
(
this
.
element
,
"
friction-y
"
)};
for
(
var
s
in
e
)
null
===
e
[
s
]
&&
delete
e
[
s
];
this
.
extend
(
this
,
a
,
i
,
e
),
this
.
calibrationTimer
=
null
,
this
.
calibrationFlag
=!
0
,
this
.
enabled
=!
1
,
this
.
depths
=
[],
this
.
raf
=
null
,
this
.
ox
=
0
,
this
.
oy
=
0
,
this
.
ow
=
0
,
this
.
oh
=
0
,
this
.
cx
=
0
,
this
.
cy
=
0
,
this
.
ix
=
0
,
this
.
iy
=
0
,
this
.
mx
=
0
,
this
.
my
=
0
,
this
.
vx
=
0
,
this
.
vy
=
0
,
this
.
onMouseMove
=
this
.
onMouseMove
.
bind
(
this
),
this
.
onDeviceOrientation
=
this
.
onDeviceOrientation
.
bind
(
this
),
this
.
onOrientationTimer
=
this
.
onOrientationTimer
.
bind
(
this
),
this
.
onCalibrationTimer
=
this
.
onCalibrationTimer
.
bind
(
this
),
this
.
onAnimationFrame
=
this
.
onAnimationFrame
.
bind
(
this
),
this
.
onWindowResize
=
this
.
onWindowResize
.
bind
(
this
),
this
.
initialise
()}
var
o
=
"
Parallax
"
,
n
=
30
,
a
=
{
calibrationThreshold
:
100
,
calibrationDelay
:
500
,
supportDelay
:
500
,
calibrateX
:
!
1
,
calibrateY
:
!
0
,
invertX
:
!
0
,
invertY
:
!
0
,
limitX
:
!
1
,
limitY
:
!
1
,
scalarX
:
10
,
scalarY
:
10
,
frictionX
:.
1
,
frictionY
:.
1
};
s
.
prototype
.
extend
=
function
(){
if
(
arguments
.
length
>
1
)
for
(
var
t
=
arguments
[
0
],
i
=
1
,
e
=
arguments
.
length
;
e
>
i
;
i
++
){
var
s
=
arguments
[
i
];
for
(
var
o
in
s
)
t
[
o
]
=
s
[
o
]}},
s
.
prototype
.
data
=
function
(
t
,
i
){
return
this
.
deserialize
(
t
.
getAttribute
(
"
data-
"
+
i
))},
s
.
prototype
.
deserialize
=
function
(
t
){
return
"
true
"
===
t
?
!
0
:
"
false
"
===
t
?
!
1
:
"
null
"
===
t
?
null
:
!
isNaN
(
parseFloat
(
t
))
&&
isFinite
(
t
)?
parseFloat
(
t
):
t
},
s
.
prototype
.
offset
=
function
(
t
){
for
(
var
e
,
s
,
o
=
0
,
n
=
0
;
t
&&!
isNaN
(
t
.
offsetLeft
)
&&!
isNaN
(
t
.
offsetTop
);)
t
===
i
.
body
?(
e
=
i
.
documentElement
.
scrollLeft
,
s
=
i
.
documentElement
.
scrollTop
):(
e
=
t
.
scrollLeft
,
s
=
t
.
scrollTop
),
o
+=
t
.
offsetLeft
-
e
,
n
+=
t
.
offsetTop
-
s
,
t
=
t
.
offsetParent
;
return
{
top
:
n
,
left
:
o
}},
s
.
prototype
.
camelCase
=
function
(
t
){
return
t
.
replace
(
/-+
(
.
)?
/g
,
function
(
t
,
i
){
return
i
?
i
.
toUpperCase
():
""
})},
s
.
prototype
.
transformSupport
=
function
(
s
){
for
(
var
o
=
i
.
createElement
(
"
div
"
),
n
=!
1
,
a
=
null
,
r
=!
1
,
h
=
null
,
l
=
null
,
p
=
0
,
m
=
this
.
vendors
.
length
;
m
>
p
;
p
++
)
if
(
null
!==
this
.
vendors
[
p
]?(
h
=
this
.
vendors
[
p
][
0
]
+
"
transform
"
,
l
=
this
.
vendors
[
p
][
1
]
+
"
Transform
"
):(
h
=
"
transform
"
,
l
=
"
transform
"
),
o
.
style
[
l
]
!==
e
){
n
=!
0
;
break
}
switch
(
s
){
case
"
2D
"
:
r
=
n
;
break
;
case
"
3D
"
:
n
&&
(
i
.
body
.
appendChild
(
o
),
o
.
style
[
l
]
=
"
translate3d(1px,1px,1px)
"
,
a
=
t
.
getComputedStyle
(
o
).
getPropertyValue
(
h
),
r
=
a
!==
e
&&
a
.
length
>
0
&&
"
none
"
!==
a
,
i
.
body
.
removeChild
(
o
))}
return
r
},
s
.
prototype
.
ww
=
null
,
s
.
prototype
.
wh
=
null
,
s
.
prototype
.
hw
=
null
,
s
.
prototype
.
hh
=
null
,
s
.
prototype
.
portrait
=
null
,
s
.
prototype
.
desktop
=!
navigator
.
userAgent
.
match
(
/
(
iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7
)
/i
),
s
.
prototype
.
vendors
=
[
null
,[
"
-webkit-
"
,
"
webkit
"
],[
"
-moz-
"
,
"
Moz
"
],[
"
-o-
"
,
"
O
"
],[
"
-ms-
"
,
"
ms
"
]],
s
.
prototype
.
motionSupport
=!!
t
.
DeviceMotionEvent
,
s
.
prototype
.
orientationSupport
=!!
t
.
DeviceOrientationEvent
,
s
.
prototype
.
orientationStatus
=
0
,
s
.
prototype
.
transform2DSupport
=
s
.
prototype
.
transformSupport
(
"
2D
"
),
s
.
prototype
.
transform3DSupport
=
s
.
prototype
.
transformSupport
(
"
3D
"
),
s
.
prototype
.
initialise
=
function
(){
this
.
transform3DSupport
&&
this
.
accelerate
(
this
.
element
);
var
i
=
t
.
getComputedStyle
(
this
.
element
);
"
static
"
===
i
.
getPropertyValue
(
"
position
"
)
&&
(
this
.
element
.
style
.
position
=
"
relative
"
);
for
(
var
e
=
0
,
s
=
this
.
layers
.
length
;
s
>
e
;
e
++
){
var
o
=
this
.
layers
[
e
];
this
.
transform3DSupport
&&
this
.
accelerate
(
o
),
o
.
style
.
position
=
e
?
"
absolute
"
:
"
relative
"
,
o
.
style
.
display
=
"
block
"
,
o
.
style
.
height
=
"
100%
"
,
o
.
style
.
width
=
"
100%
"
,
o
.
style
.
left
=
0
,
o
.
style
.
top
=
0
,
this
.
depths
.
push
(
this
.
data
(
o
,
"
depth
"
)
||
0
)}
this
.
updateDimensions
(),
this
.
enable
(),
this
.
queueCalibration
(
this
.
calibrationDelay
)},
s
.
prototype
.
updateDimensions
=
function
(){
this
.
ox
=
this
.
offset
(
this
.
element
).
left
,
this
.
oy
=
this
.
offset
(
this
.
element
).
top
,
this
.
ow
=
this
.
element
.
offsetWidth
,
this
.
oh
=
this
.
element
.
offsetHeight
,
this
.
ww
=
t
.
innerWidth
,
this
.
wh
=
t
.
innerHeight
,
this
.
hw
=
this
.
ww
/
2
,
this
.
hh
=
this
.
wh
/
2
},
s
.
prototype
.
queueCalibration
=
function
(
t
){
clearTimeout
(
this
.
calibrationTimer
),
this
.
calibrationTimer
=
setTimeout
(
this
.
onCalibrationTimer
,
t
)},
s
.
prototype
.
enable
=
function
(){
this
.
enabled
||
(
this
.
enabled
=!
0
,
this
.
orientationSupport
?(
this
.
portrait
=
null
,
t
.
addEventListener
(
"
deviceorientation
"
,
this
.
onDeviceOrientation
),
setTimeout
(
this
.
onOrientationTimer
,
this
.
supportDelay
)):(
this
.
cx
=
0
,
this
.
cy
=
0
,
this
.
portrait
=!
1
,
t
.
addEventListener
(
"
mousemove
"
,
this
.
onMouseMove
)),
t
.
addEventListener
(
"
resize
"
,
this
.
onWindowResize
),
this
.
raf
=
requestAnimationFrame
(
this
.
onAnimationFrame
))},
s
.
prototype
.
disable
=
function
(){
this
.
enabled
&&
(
this
.
enabled
=!
1
,
this
.
orientationSupport
?
t
.
removeEventListener
(
"
deviceorientation
"
,
this
.
onDeviceOrientation
):
t
.
removeEventListener
(
"
mousemove
"
,
this
.
onMouseMove
),
t
.
removeEventListener
(
"
resize
"
,
this
.
onWindowResize
),
cancelAnimationFrame
(
this
.
raf
))},
s
.
prototype
.
calibrate
=
function
(
t
,
i
){
this
.
calibrateX
=
t
===
e
?
this
.
calibrateX
:
t
,
this
.
calibrateY
=
i
===
e
?
this
.
calibrateY
:
i
},
s
.
prototype
.
invert
=
function
(
t
,
i
){
this
.
invertX
=
t
===
e
?
this
.
invertX
:
t
,
this
.
invertY
=
i
===
e
?
this
.
invertY
:
i
},
s
.
prototype
.
friction
=
function
(
t
,
i
){
this
.
frictionX
=
t
===
e
?
this
.
frictionX
:
t
,
this
.
frictionY
=
i
===
e
?
this
.
frictionY
:
i
},
s
.
prototype
.
scalar
=
function
(
t
,
i
){
this
.
scalarX
=
t
===
e
?
this
.
scalarX
:
t
,
this
.
scalarY
=
i
===
e
?
this
.
scalarY
:
i
},
s
.
prototype
.
limit
=
function
(
t
,
i
){
this
.
limitX
=
t
===
e
?
this
.
limitX
:
t
,
this
.
limitY
=
i
===
e
?
this
.
limitY
:
i
},
s
.
prototype
.
clamp
=
function
(
t
,
i
,
e
){
return
t
=
Math
.
max
(
t
,
i
),
t
=
Math
.
min
(
t
,
e
)},
s
.
prototype
.
css
=
function
(
t
,
i
,
s
){
for
(
var
o
=
null
,
n
=
0
,
a
=
this
.
vendors
.
length
;
a
>
n
;
n
++
)
if
(
o
=
null
!==
this
.
vendors
[
n
]?
this
.
camelCase
(
this
.
vendors
[
n
][
1
]
+
"
-
"
+
i
):
i
,
t
.
style
[
o
]
!==
e
){
t
.
style
[
o
]
=
s
;
break
}},
s
.
prototype
.
accelerate
=
function
(
t
){
this
.
css
(
t
,
"
transform
"
,
"
translate3d(0,0,0)
"
),
this
.
css
(
t
,
"
transform-style
"
,
"
preserve-3d
"
),
this
.
css
(
t
,
"
backface-visibility
"
,
"
hidden
"
)},
s
.
prototype
.
setPosition
=
function
(
t
,
i
,
e
){
i
+=
"
%
"
,
e
+=
"
%
"
,
this
.
transform3DSupport
?
this
.
css
(
t
,
"
transform
"
,
"
translate3d(
"
+
i
+
"
,
"
+
e
+
"
,0)
"
):
this
.
transform2DSupport
?
this
.
css
(
t
,
"
transform
"
,
"
translate(
"
+
i
+
"
,
"
+
e
+
"
)
"
):(
t
.
style
.
left
=
i
,
t
.
style
.
top
=
e
)},
s
.
prototype
.
onOrientationTimer
=
function
(){
this
.
orientationSupport
&&
0
===
this
.
orientationStatus
&&
(
this
.
disable
(),
this
.
orientationSupport
=!
1
,
this
.
enable
())},
s
.
prototype
.
onCalibrationTimer
=
function
(){
this
.
calibrationFlag
=!
0
},
s
.
prototype
.
onWindowResize
=
function
(){
this
.
updateDimensions
()},
s
.
prototype
.
onAnimationFrame
=
function
(){
var
t
=
this
.
ix
-
this
.
cx
,
i
=
this
.
iy
-
this
.
cy
;(
Math
.
abs
(
t
)
>
this
.
calibrationThreshold
||
Math
.
abs
(
i
)
>
this
.
calibrationThreshold
)
&&
this
.
queueCalibration
(
0
),
this
.
portrait
?(
this
.
mx
=
(
this
.
calibrateX
?
i
:
this
.
iy
)
*
this
.
scalarX
,
this
.
my
=
(
this
.
calibrateY
?
t
:
this
.
ix
)
*
this
.
scalarY
):(
this
.
mx
=
(
this
.
calibrateX
?
t
:
this
.
ix
)
*
this
.
scalarX
,
this
.
my
=
(
this
.
calibrateY
?
i
:
this
.
iy
)
*
this
.
scalarY
),
isNaN
(
parseFloat
(
this
.
limitX
))
||
(
this
.
mx
=
this
.
clamp
(
this
.
mx
,
-
this
.
limitX
,
this
.
limitX
)),
isNaN
(
parseFloat
(
this
.
limitY
))
||
(
this
.
my
=
this
.
clamp
(
this
.
my
,
-
this
.
limitY
,
this
.
limitY
)),
this
.
vx
+=
(
this
.
mx
-
this
.
vx
)
*
this
.
frictionX
,
this
.
vy
+=
(
this
.
my
-
this
.
vy
)
*
this
.
frictionY
;
for
(
var
e
=
0
,
s
=
this
.
layers
.
length
;
s
>
e
;
e
++
){
var
o
=
this
.
layers
[
e
],
n
=
this
.
depths
[
e
],
a
=
this
.
vx
*
n
*
(
this
.
invertX
?
-
1
:
1
),
r
=
this
.
vy
*
n
*
(
this
.
invertY
?
-
1
:
1
);
this
.
setPosition
(
o
,
a
,
r
)}
this
.
raf
=
requestAnimationFrame
(
this
.
onAnimationFrame
)},
s
.
prototype
.
onDeviceOrientation
=
function
(
t
){
if
(
!
this
.
desktop
&&
null
!==
t
.
beta
&&
null
!==
t
.
gamma
){
this
.
orientationStatus
=
1
;
var
i
=
(
t
.
beta
||
0
)
/
n
,
e
=
(
t
.
gamma
||
0
)
/
n
,
s
=
this
.
wh
>
this
.
ww
;
this
.
portrait
!==
s
&&
(
this
.
portrait
=
s
,
this
.
calibrationFlag
=!
0
),
this
.
calibrationFlag
&&
(
this
.
calibrationFlag
=!
1
,
this
.
cx
=
i
,
this
.
cy
=
e
),
this
.
ix
=
i
,
this
.
iy
=
e
}},
s
.
prototype
.
onMouseMove
=
function
(
t
){
this
.
ix
=
(
t
.
pageX
-
this
.
hw
)
/
this
.
hw
,
this
.
iy
=
(
t
.
pageY
-
this
.
hh
)
/
this
.
hh
},
t
[
o
]
=
s
})(
window
,
document
),
function
(){
for
(
var
t
=
0
,
i
=
[
"
ms
"
,
"
moz
"
,
"
webkit
"
,
"
o
"
],
e
=
0
;
i
.
length
>
e
&&!
window
.
requestAnimationFrame
;
++
e
)
window
.
requestAnimationFrame
=
window
[
i
[
e
]
+
"
RequestAnimationFrame
"
],
window
.
cancelAnimationFrame
=
window
[
i
[
e
]
+
"
CancelAnimationFrame
"
]
||
window
[
i
[
e
]
+
"
CancelRequestAnimationFrame
"
];
window
.
requestAnimationFrame
||
(
window
.
requestAnimationFrame
=
function
(
i
){
var
e
=
(
new
Date
).
getTime
(),
s
=
Math
.
max
(
0
,
16
-
(
e
-
t
)),
o
=
window
.
setTimeout
(
function
(){
i
(
e
+
s
)},
s
);
return
t
=
e
+
s
,
o
}),
window
.
cancelAnimationFrame
||
(
window
.
cancelAnimationFrame
=
function
(
t
){
clearTimeout
(
t
)})}();
srctweb/website/templates/index.html
View file @
ae42f81a
...
...
@@ -6,14 +6,22 @@ SRCT
{% block jumbotron %}
<div
class=
"jumbotron jumbostyle"
>
<div
class=
"container"
>
<div
class=
"text-center transparency"
>
<h1><strong>
SRCT
</strong></h1>
<p><h2>
Student-Run Computing and Technology
</h2></p>
<!-- <ul id="jumboparallax">
<li class="layer" data-depth="0.50"> -->
<div
class=
"jumbotron jumbostyle"
>
<!-- <li class="layer" data-depth="0.00"> -->
<div
class=
"text-center transparency"
>
<h1><strong>
SRCT
</strong></h1>
<p><h2>
Student-Run Computing and Technology
</h2></p>
</div>
<!-- </li> -->
</div>
</div>
<!--container-->
</div>
<!-- </li>
</ul> -->
{% endblock %}
...
...
@@ -53,4 +61,9 @@ out our <a href="{{ url_for('calendar') }}">calendar</a>, or visit our
<a
href=
"https://www.facebook.com/MasonSRCT"
>
Facebook
</a>
or
<a
href=
"https://www.twitter.com/MasonSRCT"
>
Twitter
</a>
pages.
</p>
<!-- <script src="/static/js/parallax.min.js"></script>
var scene = document.getElementById('jumboparallax');
var parallax = new Parallax(jumboparallax); -->
{% endblock %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment