Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Commit

Permalink
Merge pull request #7 from nikhiljohn10/master
Browse files Browse the repository at this point in the history
1.0.0 - First version complete
  • Loading branch information
nikhiljohn10 committed Apr 27, 2015
2 parents 7de1b7b + 838aac5 commit 0d5ac50
Show file tree
Hide file tree
Showing 11 changed files with 286 additions and 87 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ Inital Planning
---------------
## Technologies using in this project :

- AngularJS (Frontend Framework)
- SailsJS (Backend Framework)
- NodeJS
- ExpressJS
- EJS (Template Engine)
- MVC Architecture
- MariaDB (Database)
- Redis (Web storage)
- Forever (Production server deamon)
- PM2 (Production server deamon)
- Bootstrap (CSS Framework)
- Coffee Script (Optional suggestion)


## Target :
Expand Down
40 changes: 40 additions & 0 deletions api/controllers/MainController.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* MainController
*
* @description :: Server-side logic for managing Mains
* @help :: See http://links.sailsjs.org/docs/controllers
*/

module.exports = {

index: function(req, res) {
var options = {
region: "Kerala",
limit: 7,
start_date: (new Date()).toISOString()
};
getEvents(options, function(err, data) {
return res.view("homepage", {
events: data
});
});
}
};

function getEvents(opt, callback) {
var request = require("request");
var url = "https://reps.mozilla.org/api/v1/event/?";
if (opt.region)
url += "&region=" + opt.region;
if (opt.limit)
url += "&limit=" + opt.limit;
if (opt.start_date)
url += "&start__gte=" + opt.start_date;
request(url, function(error, response, data) {
if (!error) {
callback(error, JSON.parse(data));
} else {
console.log(error);
}
});
}
51 changes: 32 additions & 19 deletions assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,13 @@ div.tabzilla {
border-top: 2px solid #fff;
}

main div.events,
main div.our-best,
main div.mk-stats,
main div.newsletter {
padding-top: 50px;
main div.full-container {
padding-top: 100px;
padding-bottom: 50px;
}
div.full-container h1{
padding-bottom: 50px;
}

img.main-logo {
width: 100%;
margin-top: -44px;
Expand All @@ -339,6 +338,7 @@ img.main-logo {
main header {
position: relative;
}

/*
Events
======
Expand Down Expand Up @@ -429,6 +429,10 @@ div.more-events .month {
font-size: 20px;
}

div.no-events{
padding-bottom: 60px;
}

@media screen and (max-width: 767px) {
div.newsletter button[type=submit] {
margin-top: 20px !important;
Expand Down Expand Up @@ -478,6 +482,28 @@ div.left-vertical-line {
border-left: 1px solid rgba(0, 0, 0, 0);
}
}
/*
Milestones
==========
*/

div.milestones div.stones>div.row{
padding-top: 60px;
padding-bottom: 40px;
}

div.milestones div.stones img{
width: 100%;
}

div.milestones div.stones iframe{
width: 100%;
}

/*
Gallery
==========
*/
/*
Mozk Stats
==========
Expand Down Expand Up @@ -589,19 +615,6 @@ footer a:active {
position: relative;
}

.footer-bottom {
color: #fff;
padding-top: 10px;
padding-bottom: 10px;
background: none repeat scroll 0% 0% #252F41;
border-top: 1px solid #A7A7C5;
}

.footer-bottom p {
font-size: 12px;
margin: 0px;
}

div.wrapper ul,
div.wrapper ol {
margin-top: 0px;
Expand Down
Binary file added assets/images/dinokids.jpg
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 assets/images/hackergirls.jpg
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 assets/images/html5devconfkochi.jpg
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 assets/images/makerpartykochi.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions config/policies.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ module.exports.policies = {
* *
***************************************************************************/

// '*': true,

'*': false,
main: {
'index': true
}
/***************************************************************************
* *
* Here's an example of mapping some policies to run before a controller *
Expand Down
5 changes: 2 additions & 3 deletions config/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ module.exports.routes = {
* *
***************************************************************************/

'/': {
view: 'homepage'
}
'/': 'Main.index',
'/main/index': {response: 'notFound'}

/***************************************************************************
* *
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"rc": "~0.5.0",
"include-all": "~0.1.3",
"ejs": "~0.8.4",
"request": "~2.55.0",
"grunt": "0.4.2",
"grunt-sync": "~0.0.4",
"grunt-contrib-copy": "~0.5.0",
Expand Down
Loading

0 comments on commit 0d5ac50

Please sign in to comment.