![](images/heart.png)
![](images/ucsd_lawn.jpg)
diff --git a/app.js b/app.js index edb9f73ea..7273e8245 100644 --- a/app.js +++ b/app.js @@ -3,12 +3,22 @@ * Module dependencies. */ +const fs = require('fs') var express = require('express'); var http = require('http'); var path = require('path'); var handlebars = require('express3-handlebars') var index = require('./routes/index'); +var club = require('./routes/club'); +var event = require('./routes/event'); +var calendar = require('./routes/calendar'); +var login = require('./routes/login'); +var astro = require('./routes/astro'); +var acm = require('./routes/acm'); +var dsgn = require('./routes/dsgn'); +var beatz = require('./routes/beatz'); +var upcomingEvents = require('./routes/upcomingEvents'); // Example route // var user = require('./routes/user'); @@ -34,7 +44,26 @@ if ('development' == app.get('env')) { app.use(express.errorHandler()); } -app.get('/', index.view); +app.get('/', login.view); +app.get('/club', club.view); +app.get('/index', index.view); +app.get('/event', event.view); +app.get('/calendar', calendar.view); +app.get('/astro', astro.view); +app.get('/acm', acm.view); +app.get('/dsgn', dsgn.view); +app.get('/beatz', beatz.view); +app.get('/saved', upcomingEvents.upload); + +app.post('/addCalendar', function(req,res){ + var string = JSON.stringify(req.body) + fs.writeFile('public/json/calendar.json', string, (err) => { + if (err) { + throw err; + } + console.log("JSON data is saved."); +}); +}); // Example route // app.get('/users', user.list); diff --git a/public/css/calendar.css b/public/css/calendar.css new file mode 100644 index 000000000..a824e6716 --- /dev/null +++ b/public/css/calendar.css @@ -0,0 +1,109 @@ +body { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + font-family: Helvetica, Arial, sans-serif; + background-color: whitesmoke; +} + +section { + display: flex; + width: 80%; + border: 0px solid; + border-radius: 10px; + height: 15%; + margin-top: 20px; + margin-bottom: 20px; + margin: auto; + background-color: white; +} +.main { + display: flex; + flex-wrap: wrap; + flex-direction: column; + align-items: center; + width: 505px; + height: 850px; + background-color: #f2f2f2; + overflow: visible; +} + +h1 { + font-size: 24px; + font-weight: bold; + color: black; + text-align: left; +} + +p { + font-size: 12px; + margin-bottom: 3px; +} + +header { + display: flex; + width: 100%; + height: 10%; + border-bottom: solid 1px; + background-color: #0080ff; +} + +.headerUnit { + display: flex; + justify-content: center; + align-items: center; + text-decoration: none; + text-align: center; + width: 33%; + border-right-style: solid; + border-right-width: 1px; +} + +#divImg { + display: flex; + justify-content: center; + align-items: center; + margin: auto; + width: 20%; +} + +.longTitle { + text-align: center; + font-weight: bold; + font-size: 16px; + color: white; +} + +.sectionUnit { + margin: auto; + width: 70%; +} + +.sectionUnit2 { + margin: auto; + width: 20%; + display: flex; + justify-content: center; + align-items: center; +} +.org { + margin-top: 0; + font-size: 18px; + font-style: italic; +} + +.date { + padding-top: 3%; + margin: auto; +} + +.event-name { + margin-top: auto; + font-weight: bold; + padding-top: 2%; +} + +.label { + width: 80%; +} \ No newline at end of file diff --git a/public/css/club.css b/public/css/club.css new file mode 100644 index 000000000..e6176206b --- /dev/null +++ b/public/css/club.css @@ -0,0 +1,92 @@ +body { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + font-family: Helvetica, Arial, sans-serif; + background-color: whitesmoke; + } + +.main { + display: flex; + flex-wrap: wrap; + flex-direction: column; + justify-content: space-between; + align-items: center; + width: 100%; + height: 850px; + } + +.head{ + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + padding: 30px; +} + +.gallery{ + width: 80%; + height: 20%; + background-color: white; + text-align: center; + font-size: 48px; + margin: auto; +} +.picture{ + height: 100%; + width: 100%; +} + +.description{ + width: 80%; + height: 8%; + margin: auto; + margin-top: 2%; +} + +.events{ + width: 80%; + height: 16%; + margin: auto; + margin-top: 2%; +} + +.board{ + width: 80%; + height: 16%; + margin: auto; + margin-top: 2%; +} + +.social{ + width: 80%; + height: 16%; + margin: auto; + margin-top: 2%; +} +.con{ + margin: auto; + display: flex; + justify-content: space-evenly; + align-items: center; +} +.e{ + margin: auto; + height: 100px; + width: 40%; + text-align: center; + align-items:center; +} +.button{ + background-color: lightgray; + border-radius: 5px; +} +.event_img{ + width: 100%; + height: 100%; +} +.event_text{ + position: absolute; + color: white; +} diff --git a/public/css/event.css b/public/css/event.css new file mode 100644 index 000000000..5899441ef --- /dev/null +++ b/public/css/event.css @@ -0,0 +1,118 @@ +body { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + font-family: Helvetica, Arial, sans-serif; + background-color: whitesmoke; +} + +section { + display: flex; + width: 80%; + border: 0px solid; + border-radius: 10px; + height: 15%; + margin-top: 20px; + margin-bottom: 20px; + background-color: white; +} + +.main { + display: flex; + flex-wrap: wrap; + flex-direction: column; + align-items: center; + width: 505px; + height: 850px; + background-color: #f2f2f2; + overflow: visible; +} + +h1 { + font-size: 24px; + color: black; + font-weight: bold; + text-align: left; +} + +h2 { + margin-bottom: 5px; +} + +p { + font-size: 12px; +} + +a { + text-decoration: none; + color: black; +} + +header { + display: flex; + width: 100%; + height: 10%; + border-bottom: solid 1px; + background-color: #0080ff; +} + +.headerUnit { + display: flex; + justify-content: center; + align-items: center; + text-decoration: none; + text-align: center; + width: 33%; + border-right-style: solid; + border-right-width: 1px; +} + +#divImg { + display: flex; + justify-content: center; + align-items: center; + margin: auto; + width: 20%; +} + +.longTitle { + text-align: center; + font-weight: bold; + font-size: 16px; + color: white; +} + +.sectionUnit { + margin: auto; + width: 70%; +} + +.sectionUnit2 { + margin: auto; + width: 20%; + display: flex; + justify-content: center; + align-items: center; +} + +.org { + margin-top: 0; + font-size: 18px; + font-style: italic; +} + +.date { + padding-top: 3%; + margin: auto; +} + +.event-name { + margin-top: auto; + font-weight: bold; + padding-top: 2%; +} + +.label { + width: 80%; +} diff --git a/public/css/index.css b/public/css/index.css new file mode 100644 index 000000000..8ab2481b1 --- /dev/null +++ b/public/css/index.css @@ -0,0 +1,127 @@ +body { + display: flex; + justify-content: center; + align-items: center; + background-color: whitesmoke; + height: 100vh; + font-family: Helvetica, Arial, sans-serif; + padding: 0; + margin: 0; + } + + .main { + display: flex; + flex-wrap: wrap; + flex-direction: column; + justify-content: space-between; + align-items: center; + width: 100%; + height: 850px; + background-color: #f2f2f2; + padding: 0; + margin: 0; + } + + header { + display: flex; + width: 100%; + height: 10%; + border-bottom: solid 1px; + background-color: #0080ff; + } + + section { + margin: auto; + display: flex; + width: 80%; + border: 0px solid; + border-radius: 10px; + height: 13%; + padding-left: 10px; + background-color: white; + } + + h1 { + font-size: 24px; + } + + form { + width: 100%; + } + + input { + width: 90%; + } + + h2 { + margin-bottom: 0px; + } + + p { + font-size: 12px; + } + + a { + text-decoration: none; + color: black; + } + + .headerUnit { + display: flex; + justify-content: center; + align-items: center; + width: 33%; + border-right: solid 1px; + } + + #divImg { + display: flex; + justify-content: center; + align-items: center; + margin: auto; + width: 20%; + } + + .longTitle { + text-align: center; + font-weight: bold; + font-size: 16px; + margin-top: 5px; + padding-top: 20px; + color: white; + } + + #formInput { + display: flex; + max-height: 30px; + width: 80%; + } + + #box1 { + width: 80%; + display: flex; + align-items: center; + } + + #box2 { + display: flex; + justify-content: center; + align-items: center; + width: 20%; + max-height: 60px; + } + + .sectionUnit { + width: 80%; + } + + .sectionUnit2 { + width: 20%; + display: flex; + justify-content: center; + align-items: center; + } + + .label { + width: 80%; + } diff --git a/public/css/login.css b/public/css/login.css new file mode 100644 index 000000000..8916e5506 --- /dev/null +++ b/public/css/login.css @@ -0,0 +1,68 @@ +body { + display: flex; + justify-content: center; + align-items: center; + background-color: whitesmoke; + font-family: Helvetica, Arial, sans-serif; + padding: 0; + margin: 0; + } + + .main { + width: 100%; + height: 812px; + background-color: #0073d1; + padding: 0; + margin: 0; + } + + h1 { + font-size: 36px; + font-weight: bold; + width: 80%; + margin-left: 20px; + margin-top: 200px; + line-height: 1.2; + } + + h2 { + margin-left: 20px; + } + + .g-signin2 { + margin-left: 20px; + } + + form { + margin-left: 20px; + } + + input { + width: 300px; + height: 60px; + border: none; + border-bottom: solid black 1px; + } + + input::placeholder { + font-size: 16px; + } + + .button { + margin-left: 20px; + margin-top: 50px; + background-color: black; + color: white; + width: 90px; + height: 40px; + display: flex; + justify-content: center; + align-items: center; + } + + a { + text-decoration: none; + color: white; + padding: 0px; + margin: 0px; + } diff --git a/public/images/abagail.png b/public/images/abagail.png new file mode 100644 index 000000000..ce3e69c2d Binary files /dev/null and b/public/images/abagail.png differ diff --git a/public/images/arrowright.png b/public/images/arrowright.png new file mode 100644 index 000000000..b90995e32 Binary files /dev/null and b/public/images/arrowright.png differ diff --git a/public/images/back.jpg b/public/images/back.jpg new file mode 100644 index 000000000..fefc7d553 Binary files /dev/null and b/public/images/back.jpg differ diff --git a/public/images/back_arrow.png b/public/images/back_arrow.png new file mode 100644 index 000000000..5842ebb8f Binary files /dev/null and b/public/images/back_arrow.png differ diff --git a/public/images/bone.png b/public/images/bone.png new file mode 100644 index 000000000..b33cc3383 Binary files /dev/null and b/public/images/bone.png differ diff --git a/public/images/bonfire.jpg b/public/images/bonfire.jpg new file mode 100644 index 000000000..2262e3d75 Binary files /dev/null and b/public/images/bonfire.jpg differ diff --git a/public/images/discord.png b/public/images/discord.png new file mode 100644 index 000000000..6db955cad Binary files /dev/null and b/public/images/discord.png differ diff --git a/public/images/facebook.png b/public/images/facebook.png new file mode 100644 index 000000000..123b4432e Binary files /dev/null and b/public/images/facebook.png differ diff --git a/public/images/filter.png b/public/images/filter.png new file mode 100644 index 000000000..4f2585765 Binary files /dev/null and b/public/images/filter.png differ diff --git a/public/images/gbm.png b/public/images/gbm.png new file mode 100644 index 000000000..85dcd5015 Binary files /dev/null and b/public/images/gbm.png differ diff --git a/public/images/heart calendar.png b/public/images/heart calendar.png new file mode 100644 index 000000000..d320181da Binary files /dev/null and b/public/images/heart calendar.png differ diff --git a/public/images/heart.jpg b/public/images/heart.jpg new file mode 100644 index 000000000..68c3ac991 Binary files /dev/null and b/public/images/heart.jpg differ diff --git a/public/images/heart.png b/public/images/heart.png new file mode 100644 index 000000000..982cd0e25 Binary files /dev/null and b/public/images/heart.png differ diff --git a/public/images/heart_fill.png b/public/images/heart_fill.png new file mode 100644 index 000000000..5adcce8fe Binary files /dev/null and b/public/images/heart_fill.png differ diff --git a/public/images/heart_outline.png b/public/images/heart_outline.png new file mode 100644 index 000000000..d140899df Binary files /dev/null and b/public/images/heart_outline.png differ diff --git a/public/images/instagram.png b/public/images/instagram.png new file mode 100644 index 000000000..75bcfb6c6 Binary files /dev/null and b/public/images/instagram.png differ diff --git a/public/images/katarina.png b/public/images/katarina.png new file mode 100644 index 000000000..e80460d1c Binary files /dev/null and b/public/images/katarina.png differ diff --git a/public/images/pink_heart.png b/public/images/pink_heart.png new file mode 100644 index 000000000..aec183483 Binary files /dev/null and b/public/images/pink_heart.png differ diff --git a/public/images/seeall.png b/public/images/seeall.png new file mode 100644 index 000000000..dd32ab1fd Binary files /dev/null and b/public/images/seeall.png differ diff --git a/public/images/tyler.png b/public/images/tyler.png new file mode 100644 index 000000000..60dd51a19 Binary files /dev/null and b/public/images/tyler.png differ diff --git a/public/images/ucsd_lawn.jpg b/public/images/ucsd_lawn.jpg new file mode 100644 index 000000000..1f4cdf081 Binary files /dev/null and b/public/images/ucsd_lawn.jpg differ diff --git a/public/js/addEvent.js b/public/js/addEvent.js new file mode 100644 index 000000000..9f0bde70a --- /dev/null +++ b/public/js/addEvent.js @@ -0,0 +1,21 @@ + +function addHeart(id) { + var image = document.getElementById(id); + + if(image.src.match("../images/heart_outline.png")) { + for( var i = 0 ; i < events.length; i++){ + if(events[i].id === id){ + calendar.saved_events.push(events[i]); + } + } + var xhr = new XMLHttpRequest(); + xhr.open("POST", "/addCalendar", true); + xhr.setRequestHeader('Content-Type', 'application/json'); + xhr.send(JSON.stringify(calendar)); + image.src = "../images/pink_heart.png"; + } + else { + image.src = "../images/heart_outline.png"; + } +} + diff --git a/public/js/delete.js b/public/js/delete.js new file mode 100644 index 000000000..b42b3177c --- /dev/null +++ b/public/js/delete.js @@ -0,0 +1,9 @@ + +function deleteHeart(dId) { + + $("#"+dId).remove(); + +} + + + diff --git a/public/js/event.js b/public/js/event.js new file mode 100644 index 000000000..4782dbf44 --- /dev/null +++ b/public/js/event.js @@ -0,0 +1,10 @@ +function clickHeart(id) { + var image = document.getElementById(id); + + if (image.src.match("../images/heart_outline.png")) { + image.src = "../images/pink_heart.png"; + } + else { + image.src = "../images/heart_outline.png"; + } +} diff --git a/public/js/index.js b/public/js/index.js new file mode 100644 index 000000000..b16320e86 --- /dev/null +++ b/public/js/index.js @@ -0,0 +1,10 @@ +function clubHeart(id) { + var image = document.getElementById(id); + + if (image.src.match("../images/heart_outline.png")) { + image.src = "../images/pink_heart.png"; + } + else { + image.src = "../images/heart_outline.png"; + } +} diff --git a/public/json/boardMembers.json b/public/json/boardMembers.json new file mode 100644 index 000000000..e69de29bb diff --git a/public/json/calendar.json b/public/json/calendar.json new file mode 100644 index 000000000..6b1c52eac --- /dev/null +++ b/public/json/calendar.json @@ -0,0 +1,12 @@ +{ + "saved_events": [ + { + "clubEvent": "Boba Run", + "clubName": "Design Co", + "location": "Tapioca Express", + "month": "1", + "day": "20", + "id": "boba" + } + ] +} diff --git a/public/json/club.json b/public/json/club.json new file mode 100644 index 000000000..b066d8b1d --- /dev/null +++ b/public/json/club.json @@ -0,0 +1,44 @@ +{ + "club": [ + { + "id": "ACM", + "name": "ACM UCSD", + "description": "ACM UC San Diego is a computing focused organization on campus.", + "image": "http://www.google.com/think/images/prototyping-for-success_articles_lg.jpg", + "idH": "clubHeart1", + "link": "/acm" + }, + { + "id": "astro", + "name": "Astronomy Club", + "description": "Astronomy Club at UCSD aims to promote the interest of astronomy and astrophysics.", + "image": "http://searchwide.com/wp-content/uploads/2013/11/evaluation.jpg", + "idH": "clubHeart2", + "link": "/astro" + }, + { + "id": "beatz", + "name": "Beat @ UCSD", + "description": "To provide a fun and lively atmosphere to continue our passion for a cappella music.", + "image": "http://www.quality-wars.com/wp-content/uploads/Gantt-Chart-Example-2-NO-LETTERS1.jpg", + "idH": "clubHeart3", + "link": "/beatz" + }, + { + "id": "dsgn", + "name": "Design Co", + "description": "We’re a strong and scrappy design community, bridging the gap between designers and industry.", + "image": "http://regmedia.co.uk/2011/03/01/node_code.png", + "idH": "clubHeart4", + "link": "/dsgn" + }, + { + "id": "vsa", + "name": "VSA", + "description": "VSA is an Vietnamese culture org that celebrates inclusivity and community.", + "image": "http://torontopubliclibrary.typepad.com/.a/6a00e5509ea6a18834019b00ff4518970b-800wi", + "idH": "clubHeart5", + "link": "/club" + } + ] +} diff --git a/public/json/up2u.json b/public/json/up2u.json new file mode 100644 index 000000000..2cabeffb0 --- /dev/null +++ b/public/json/up2u.json @@ -0,0 +1,32 @@ +{ + "acm":[ + { + "clubEvent": "GBM #1", + "clubName": "ACM", + "location": "Cognitive Science Building", + "month": "1", + "day": "21" + }], + "desco": [{ + "clubEvent": "Portfolio Review", + "clubName": "Design Co.", + "location": "Rady School of Management", + "month": "1", + "day": "24" + }], + "vsa": [{ + "clubEvent": "Bonfire", + "clubName": "VSA", + "location": "Geisel Loop(pickup)", + "month": "1", + "day": "24" + }], + "ted": [{ + "clubEvent": "GBM #1", + "clubName": "TED@UCSD", + "location": "Center Hall", + "month": "2", + "day": "2" + }] +} + \ No newline at end of file diff --git a/public/json/upcoming.json b/public/json/upcoming.json new file mode 100644 index 000000000..e81552e69 --- /dev/null +++ b/public/json/upcoming.json @@ -0,0 +1,36 @@ +{ + "events": [ + { + "clubEvent": "GBM #1", + "clubName": "ACM", + "location": "Cognitive Science Building", + "month": "1", + "day": "21", + "id": "acm" + }, + { + "clubEvent": "Portfolio Review", + "clubName": "Design Co.", + "location": "Rady School of Management", + "month": "1", + "day": "24", + "id": "desco" + }, + { + "clubEvent": "Bonfire", + "clubName": "VSA", + "location": "Geisel Loop(pickup)", + "month": "1", + "day": "24", + "id": "vsa" + }, + { + "clubEvent": "GBM #1", + "clubName": "TED@UCSD", + "location": "Center Hall", + "month": "2", + "day": "2", + "id": "ted" + } + ] +} diff --git a/routes/acm.js b/routes/acm.js new file mode 100644 index 000000000..5b0324dec --- /dev/null +++ b/routes/acm.js @@ -0,0 +1,8 @@ + +/* + * GET home page. + */ + +exports.view = function(req, res){ + res.render('acm'); + }; \ No newline at end of file diff --git a/routes/astro.js b/routes/astro.js new file mode 100644 index 000000000..6ca88040e --- /dev/null +++ b/routes/astro.js @@ -0,0 +1,8 @@ + +/* + * GET home page. + */ + +exports.view = function(req, res){ + res.render('astro'); + }; \ No newline at end of file diff --git a/routes/beatz.js b/routes/beatz.js new file mode 100644 index 000000000..df327106d --- /dev/null +++ b/routes/beatz.js @@ -0,0 +1,8 @@ + +/* + * GET home page. + */ + +exports.view = function(req, res){ + res.render('beatz'); + }; diff --git a/routes/calendar.js b/routes/calendar.js new file mode 100644 index 000000000..e47fdf6a0 --- /dev/null +++ b/routes/calendar.js @@ -0,0 +1,10 @@ +/* + * GET home page. + */ + + +exports.view = function (req, res) { + var fs = require('fs'); + var calendar = JSON.parse(fs.readFileSync('public/json/calendar.json', 'utf8')); + res.render("calendar", {'calendar': calendar}); +}; diff --git a/routes/club.js b/routes/club.js new file mode 100644 index 000000000..2e6681523 --- /dev/null +++ b/routes/club.js @@ -0,0 +1,8 @@ + +/* + * GET home page. + */ + +exports.view = function(req, res){ + res.render('club'); + }; \ No newline at end of file diff --git a/routes/dsgn.js b/routes/dsgn.js new file mode 100644 index 000000000..2801fdc7f --- /dev/null +++ b/routes/dsgn.js @@ -0,0 +1,8 @@ + +/* + * GET home page. + */ + +exports.view = function(req, res){ + res.render('dsgn'); + }; diff --git a/routes/event.js b/routes/event.js new file mode 100644 index 000000000..d58d5cdf5 --- /dev/null +++ b/routes/event.js @@ -0,0 +1,15 @@ +var upcoming = require("../public/json/upcoming.json"); +var calendar = require("../public/json/calendar.json"); + +upcoming.string = JSON.stringify(upcoming); +calendar = JSON.stringify(calendar); + +exports.view = function(req, res){ + + + + + res.render('event', { + 'upcoming' : upcoming, 'calendar' : calendar + }); + }; \ No newline at end of file diff --git a/routes/index.js b/routes/index.js index 51466f4d5..4a7383c87 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,8 +1,5 @@ - -/* - * GET home page. - */ +var club = require("../public/json/club.json"); exports.view = function(req, res){ - res.render('index'); -}; \ No newline at end of file + res.render('index', club); +}; diff --git a/routes/login.js b/routes/login.js new file mode 100644 index 000000000..b51f60b16 --- /dev/null +++ b/routes/login.js @@ -0,0 +1,3 @@ +exports.view = function(req, res){ + res.render('login'); +}; diff --git a/routes/upcomingEvents.js b/routes/upcomingEvents.js new file mode 100644 index 000000000..98a3810f2 --- /dev/null +++ b/routes/upcomingEvents.js @@ -0,0 +1,9 @@ +/* + * GET home page. + */ + +var calendar = require("../public/json/calendar.json"); + +exports.upload = function(req, res){ + calendar.saved_events.push(newSavedEvent); + }; \ No newline at end of file diff --git a/views/acm.handlebars b/views/acm.handlebars new file mode 100644 index 000000000..ac318bc4a --- /dev/null +++ b/views/acm.handlebars @@ -0,0 +1,170 @@ + + + + +
+ + + + + + + + + + +{{clubName}}
+{{location}}
+ +{{clubName}}
+{{location}}
+ +{{description}}
+