Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new frontend for sportzilla 2017 #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added bosm/__init__.pyc
Binary file not shown.
Binary file added bosm/settings.pyc
Binary file not shown.
Binary file added sportzilla/__init__.pyc
Binary file not shown.
Binary file added sportzilla/apps.pyc
Binary file not shown.
131 changes: 111 additions & 20 deletions static/css/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
*{text-align: center; }

#top-nav {
font-family: 'Major Mono Display', monospace;
font-size: 13px;
}

.quesAvailableDiv {
background: rgba(0,0,0,1);
}

html,body
{
padding: 0;
Expand Down Expand Up @@ -46,7 +55,8 @@ h1
.horizon
{
z-index: 1;
width: 5000px;
width: 5200px;
height: 107vh;
}

.second
Expand All @@ -58,8 +68,21 @@ h1
.front
{
z-index: 1000;
width: 12000px;
width: 12100px;
height: 95vh;
}

#road {
position: fixed;
bottom: 0;
}

#backImg {
position: fixed;
bottom: 0;
height: 110vh;
}

.popup
{
background-color: black;
Expand Down Expand Up @@ -103,7 +126,7 @@ h1
opacity: 0.85;
background-color: black;
display: flex;
justify-content: center;
justify-content: center;
}
[class*="sim-Body"]{
width: 100%;
Expand All @@ -117,7 +140,7 @@ h1
[class*="sim-Footer"]{
display: flex;
align-items: center;
justify-content: center;
justify-content: center;
background-color: black;
width: 100%;
height: 40px;
Expand Down Expand Up @@ -159,7 +182,7 @@ h1
z-index: 2000;
background-color: black;
padding: 1vh;
display: flex;
display: flex;
justify-content: space-around;
width: 100vw;
padding-top: 1vh;
Expand Down Expand Up @@ -198,11 +221,16 @@ h1
position: fixed;
display: block;
z-index: 4000;
height: 66vh;
top: 17vh;
background: rgba(0,0,0,1);
font-family: 'Major Mono Display', monospace;
line-height: 20px;
}

#eve {
position: fixed;
bottom: 8vh;
bottom: -20vh;
left: 30vw;
z-index: 3000;
transform : scale(0.3);
Expand Down Expand Up @@ -261,7 +289,7 @@ h1

.leaderboard-wrapper {
margin-bottom: 5px;

}
#your-position {
margin-bottom: 5px;
Expand Down Expand Up @@ -379,7 +407,7 @@ h1
-ms-transform: translateX(-100%); /* IE 9 */
transform: translateX(-100%); /* Firefox 16+, IE 10+, Opera */

-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}

Expand All @@ -388,13 +416,13 @@ h1
-ms-transform: translateX(100%); /* IE 9 */
transform: translateX(100%); /* Firefox 16+, IE 10+, Opera */

-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}

.loaded #loader {
opacity: 0;
-webkit-transition: all 0.3s ease-out;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
.loaded #loader-wrapper {
Expand All @@ -404,10 +432,10 @@ h1
-ms-transform: translateY(-100%); /* IE 9 */
transform: translateY(-100%); /* Firefox 16+, IE 10+, Opera */

-webkit-transition: all 0.3s 1s ease-out;
-webkit-transition: all 0.3s 1s ease-out;
transition: all 0.3s 1s ease-out;
}

/* JavaScript Turned Off */
.no-js #loader-wrapper {
display: none;
Expand Down Expand Up @@ -529,13 +557,13 @@ h1
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
background-image: linear-gradient(
-45deg,
rgba(255, 255, 255, .2) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, .2) 50%,
rgba(255, 255, 255, .2) 75%,
transparent 75%,
-45deg,
rgba(255, 255, 255, .2) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, .2) 50%,
rgba(255, 255, 255, .2) 75%,
transparent 75%,
transparent
);
background-size: 50px 50px;
Expand Down Expand Up @@ -573,3 +601,66 @@ h1
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}

@media screen and (max-height: 1100px) and (max-width: 1400px) {
#eve {
bottom: -9vh;
}

.horizon
{
z-index: 1;
width: 10000px;
height: 107vh;
}
}

@media screen and (max-width: 1400px) and (max-height: 700px) {
#eve {
bottom: -13vh;
}

.horizon
{
z-index: 1;
width: 6400px;
height: 107vh;
}
}

@media screen and (max-height: 600px) {
#eve {
bottom: -15vh;
}

#instructionsDiv {
font-size: 15px;
}
}

@media screen and (max-width: 1030px) and (max-height: 800px) {
.horizon
{
z-index: 1;
width: 4800px;
height: 107vh;
}
}

@media screen and (max-width: 800px) and (max-height: 450px) {
.horizon
{
z-index: 1;
width: 7000px;
height: 107vh;
}
}

@media screen and (max-height: 380px) {
.horizon
{
z-index: 1;
width: 4700px;
height: 107vh;
}
}
Binary file added static/images/FullBackg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/FullFront.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/spritesheet3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 21 additions & 22 deletions static/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ av=[1,1,1,1,1] ; // availabilty of questions for each stadium 1:available 0:not
left=[0.125,0.31,0.52,0.72,0.92]; // left constraint for popup visibility
right=[0.16,0.36,0.56,0.77,0.97]; // right constraint for popup visibility
// device detection
if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)
if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)
|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))
{
left=[0.125,0.31,0.505,0.705,0.89];
Expand All @@ -24,34 +24,34 @@ var userName = document.getElementById('username');
width: 'auto',
// optional: define the height the user can scroll, otherwise the overall length will be taken as scrollable height
onScroll: function(percent)
{
{
//optional: callback function that will be called when the user scrolls down, useful for animating other things on the page
console.log(percent);
for(i=0;i<5;i++)
// console.log(percent);
for(i=0;i<3;i++)
{
if (percent>left[i]&&percent<right[i])
if (percent>left[i]&&percent<right[i])
{
if (av[i]==1)
document.getElementById("Available"+String(i+1)).style.display='block';
else
else
document.getElementById("NotAvailable"+String(i+1)).style.display='block';
}

}
else
{
document.getElementById("Available"+String(i+1)).style.display='none';
document.getElementById("NotAvailable"+String(i+1)).style.display='none';
}
}
}
var wide = Math.floor(percent * 100);
var progress = wide + '%';
document.getElementById('progressDone').style.width=progress;
}
});
}(jQuery));
function dismissDiv(x)
function dismissDiv(x)
{
for(i=0;i<5;i++)
for(i=0;i<3;i++)
{
document.getElementById('Quiz'+String(i+1)).style.display='none';
}
Expand Down Expand Up @@ -87,7 +87,7 @@ var userName = document.getElementById('username');
getLeaderboard();
document.getElementById('leaderboardDiv').style.display='block';
}

function disable_scroll(){
document.getElementsByTagName("body")[0].style.overflowY="hidden";
}
Expand Down Expand Up @@ -129,8 +129,8 @@ function getInitialQuestions(current) { //Invoked when first time any Stadium di
type: "GET",
data: {'number':current},
dataType: 'json',
beforeSend : function() {
document.getElementsByClassName('requestStatus')[current-1].innerHTML = "Loading Question...";
beforeSend : function() {
document.getElementsByClassName('requestStatus')[current-1].innerHTML = "Loading Question...";
},
// handle a successful response
success : function(jsondata) {
Expand All @@ -152,7 +152,7 @@ function getInitialQuestions(current) { //Invoked when first time any Stadium di
error : function() {
console.log("Error"); // provide a bit more info about the error to the console
},
complete : function() {
complete : function() {
document.getElementsByClassName('requestStatus')[current-1].innerHTML = "";
}
});
Expand All @@ -164,8 +164,8 @@ function getAnsResponse(answer, qno, current) { //Question no. Answer is passed.
type: "GET",
data: {'answerof':answer,'number':current},
dataType: 'json',
beforeSend : function() {
document.getElementsByClassName('requestStatus')[current-1].innerHTML = "Loading Question...";
beforeSend : function() {
document.getElementsByClassName('requestStatus')[current-1].innerHTML = "Loading Question...";
},
// handle a successful response
success : function(jsondata) {
Expand All @@ -187,7 +187,7 @@ function getAnsResponse(answer, qno, current) { //Question no. Answer is passed.
error : function() {
console.log("Error"); // provide a bit more info about the error to the console
},
complete : function() {
complete : function() {
document.getElementsByClassName('requestStatus')[current-1].innerHTML = "";
}
});
Expand All @@ -198,8 +198,8 @@ function getSkipResponse(qno, current) { //Question Number attempted passed when
type: "GET",
data: {'number':current},
dataType: 'json',
beforeSend : function() {
document.getElementsByClassName('requestStatus')[current-1].innerHTML = "Loading Question...";
beforeSend : function() {
document.getElementsByClassName('requestStatus')[current-1].innerHTML = "Loading Question...";
},
// handle a successful response
success : function(jsondata) {
Expand All @@ -221,7 +221,7 @@ function getSkipResponse(qno, current) { //Question Number attempted passed when
error : function() {
console.log("Error"); // provide a bit more info about the error to the console
},
complete : function() {
complete : function() {
document.getElementsByClassName('requestStatus')[current-1].innerHTML = "";
}
});
Expand Down Expand Up @@ -267,4 +267,3 @@ function getLeaderboard() {
}
})
}

Binary file added static/main/font/Sketch 3D.otf
Binary file not shown.
Binary file added static/main/font/Sketch 3D.pdf
Binary file not shown.
Binary file added static/main/font/Sketch 3D.woff
Binary file not shown.
Binary file added static/main/font/sketch_3d.zip
Binary file not shown.
1 change: 1 addition & 0 deletions static/main/js/newJs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading