Skip to content

Commit

Permalink
informals automated
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak1556 committed Sep 21, 2012
1 parent 4393d27 commit 9f5f277
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 50 deletions.
37 changes: 7 additions & 30 deletions css/main.css
Expand Up @@ -895,35 +895,6 @@ body {
} }


.updates span{ .updates span{
<<<<<<< HEAD
margin-left : 130px;
background : #fff;
}

#root h3{
display : none;
}

.eventx {
margin-left: 20px;
display : none;
}

.ev_title {
font-weight: bold;
}

.ev_prize {
color: red; font-weight: bold;
}

.ev_sub_head {
font-weight: bold; font-size: 80%;
}

.eventx ul {
margin-top: 0;
=======
margin-left : 130px; margin-left : 130px;
background : #fff; background : #fff;
} }
Expand All @@ -937,7 +908,7 @@ body {
display : none; display : none;
} }


.ev_title { .ev_title{
font-weight: bold; font-weight: bold;
padding-bottom: 10px; padding-bottom: 10px;
} }
Expand Down Expand Up @@ -980,4 +951,10 @@ body {


.eventx ul { .eventx ul {
margin-top: 0; margin-top: 0;
}

.inf_title{
font-weight: bold;
padding-bottom: 10px;
padding-top : 10px;
} }
4 changes: 2 additions & 2 deletions index.php
Expand Up @@ -455,8 +455,8 @@
</div> </div>
<div id="informals" style="text-align: left; "> <div id="informals" style="text-align: left; ">
<h2 style="text-align: center; ">Informals</h2> <h2 style="text-align: center; ">Informals</h2>
<p>Paintballing (where you and a bunch of your friends can team up, strategize and play against another team), Shooting and Archery (target events), Zorbing (Two people are put into a giant rubber inflated ball,and rolled around), Talent hunts, etc... need any more be said!! And at a much lower rate than they normally come! The Informals are quite literally at the heart of what makes Festember such a success, besides the loads of competitions. They form a platform for you to meet and make friends with people you don't know, and take back glorious memories. The RETRO informals promise to be bigger than life, and take you places you would never have dreamt of going.</p> <!-- <p>Paintballing (where you and a bunch of your friends can team up, strategize and play against another team), Shooting and Archery (target events), Zorbing (Two people are put into a giant rubber inflated ball,and rolled around), Talent hunts, etc... need any more be said!! And at a much lower rate than they normally come! The Informals are quite literally at the heart of what makes Festember such a success, besides the loads of competitions. They form a platform for you to meet and make friends with people you don't know, and take back glorious memories. The RETRO informals promise to be bigger than life, and take you places you would never have dreamt of going.</p>-->
</div> </div>
<div id="nothing"> <div id="nothing">
Expand Down
35 changes: 20 additions & 15 deletions js/event_content.js
Expand Up @@ -15,36 +15,40 @@ var Informals = function (){
}; };
Informals.fn = Informals.prototype={ Informals.fn = Informals.prototype={
"Informals": [ "Informals": [
{ {
"description": "Highness beckons you to informals. The only difference between rationality and insanity is that insanity has no limits. Festember Informals is back again for another breathtaking and thrilling edition . So beat the heat in our lounge or play your favorite fun time sports...showcase your talent....... ...experience craziness off limits at informals ...live your dreams and plunge into the pool of happiness...... lot of exciting games and cash prizes to be won...FESTEMBER INFORMALS 12 \"INSANITY in SANITY\" " "title" : "",
} "description": "Highness beckons you to informals. The only difference between rationality and insanity is that insanity has no limits. Festember Informals is back again for another breathtaking and thrilling edition . So beat the heat in our lounge or play your favorite fun time sports...showcase your talent....... ...experience craziness off limits at informals ...live your dreams and plunge into the pool of happiness...... lot of exciting games and cash prizes to be won...FESTEMBER INFORMALS 12 \"INSANITY in SANITY\" "
], },
"children": [ {
{ "title" : "Paintball",
"Paintball": {
"description": "Bring real life wartime experience into reality. Display your skill with stealth and knock out your opponents. Participants are provided with guns with paint pellets to eliminate enemies. Festember paintball conducted by famous Adroitt Paintball, Chennai ." "description": "Bring real life wartime experience into reality. Display your skill with stealth and knock out your opponents. Participants are provided with guns with paint pellets to eliminate enemies. Festember paintball conducted by famous Adroitt Paintball, Chennai ."
}, },
"Water Zorbing": { {
"title" : "Water Zorbing",
"description": "Festember informals gives u a chance to experience a totally bizarre and fun contraption that shows you how life in a bubble is like." "description": "Festember informals gives u a chance to experience a totally bizarre and fun contraption that shows you how life in a bubble is like."
}, },
"Minute to win it": { {
"title" : "Minute to win it",
"description": "Small time tasks to be completed in a minute. Festember informals presents minute to win it couple/double team event. Lots of exciting prizes to be won. " "description": "Small time tasks to be completed in a minute. Festember informals presents minute to win it couple/double team event. Lots of exciting prizes to be won. "
}, },
"Obstacle course": { {
"title" : "Obstacle course",
"description": "When a man meets an obstacle he can't destroy it but has to conquer it. I suppose this is the reason which makes the game so well worth playing. Battle of strength and mental composure. Test your physical fitness and finish first to clinch the flag." "description": "When a man meets an obstacle he can't destroy it but has to conquer it. I suppose this is the reason which makes the game so well worth playing. Battle of strength and mental composure. Test your physical fitness and finish first to clinch the flag."
}, },
"Street football": { {
"title" : "Street football",
"description": "So u think u can rule the streets of NIT-trichy? Then get your team and prove it. Held at nights, participate in our high intensity battle of supremacy on the streets." "description": "So u think u can rule the streets of NIT-trichy? Then get your team and prove it. Held at nights, participate in our high intensity battle of supremacy on the streets."
}, },
"Network Gaming": { {
"title" : "Network Gaming",
"description": "Ever popular network games CS DOTA FIFA NFS tournaments to be held. Cash prizes to be won." "description": "Ever popular network games CS DOTA FIFA NFS tournaments to be held. Cash prizes to be won."
}, },
"Retro Sports": { {
"title" : "Retro Sports",
"description": "Ever feel like re-living your childhood. Be yourself, bring out the child in you and take part in our enjoyable nostalgic games of the past." "description": "Ever feel like re-living your childhood. Be yourself, bring out the child in you and take part in our enjoyable nostalgic games of the past."
} }
}
] ]
} } ;




Event.fn = Event.prototype={ Event.fn = Event.prototype={
Expand Down Expand Up @@ -1120,4 +1124,5 @@ Event.fn = Event.prototype={
] ]
} }
window.fEvent = Event; window.fEvent = Event;
window.fInformals = Informals;
})(); })();
42 changes: 39 additions & 3 deletions js/main.js
Expand Up @@ -689,14 +689,45 @@
})(); })();
*/ */
//////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////
function displayInformals(x){
var j, str = "";
for(j = 0; j < x.length; ++j) {
var k;
console.log(x[j].title);
str += '<div class="informalsx">';
if(x[j].title !== undefined && x[j].title !== "")
str += '<div class="inf_title '+ (x[j].title).replace(/[\(\)?'\s]/g, "") +'">' + x[j].title + "</div>";

if(x[j].description !== undefined)
str += '<div class="inf_description">' + x[j].description + "</div>";

str += "</div>";
}
return str;
}

function displayInformalsList(x) {
var str = "";
for(i in x) {
var j;
console.log(i);
str += "<h3>" + i + "</h3>";
if(x[i].constructor == Array)
str += displayInformals(x[i]);

}
return str;
}


function displayEvents(x) { function displayEvents(x) {
var j, str = ""; var j, str = "";
for(j = 0; j < x.length; ++j) { for(j = 0; j < x.length; ++j) {
var k; var k;
//console.log (x[j].title); console.log (x[j].title);
str += '<div class="eventx">'; str += '<div class="eventx">';
if(x[j].title !== undefined && x[j].title !== "")
str += '<div class="ev_title '+ (x[j].title).replace(/[\(\)?'\s]/g, "") +'">' + x[j].title + "</div>"; str += '<div class="ev_title '+ (x[j].title).replace(/[\(\)?'\s]/g, "") +'">' + x[j].title + "</div>";

if(x[j].deadline !== undefined && x[j].deadline !== "") if(x[j].deadline !== undefined && x[j].deadline !== "")
str += '<div class="ev_deadline">Dead Line: ' + x[j].deadline + "</div>"; str += '<div class="ev_deadline">Dead Line: ' + x[j].deadline + "</div>";


Expand Down Expand Up @@ -757,6 +788,7 @@
if(x[i].constructor == Array) { if(x[i].constructor == Array) {
var etitle; var etitle;
for(j = 0; j < x[i].length; j++) { for(j = 0; j < x[i].length; j++) {
if(x[i][j].title !== undefined && x[i][j].title !== "")
etitle = (x[i][j].title).replace(/[\(\)?'\s]/g, ""); etitle = (x[i][j].title).replace(/[\(\)?'\s]/g, "");
str += '<li><a>' + x[i][j].title + '</a></li>'; str += '<li><a>' + x[i][j].title + '</a></li>';
} }
Expand All @@ -772,9 +804,13 @@




var create_event_content = (function(){ var create_event_content = (function(){
var i, str = "", x = fEvent(); var i, str = "", str1 = "", x = fEvent(), y = fInformals();

str1 = displayInformalsList(y);
document.getElementById("informals").innerHTML = str1;

str = displayEventList(x); str = displayEventList(x);
document.getElementById("root").innerHTML = str; document.getElementById("root").innerHTML = str;
str = ""; str = "";
str += getList(x); str += getList(x);
document.getElementById("list").innerHTML = str; document.getElementById("list").innerHTML = str;
Expand Down

0 comments on commit 9f5f277

Please sign in to comment.