Skip to content

Commit

Permalink
landing page touch up
Browse files Browse the repository at this point in the history
  • Loading branch information
teckliew committed Sep 27, 2015
1 parent 646368c commit 72341ae
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 23 deletions.
5 changes: 4 additions & 1 deletion client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
<link rel="icon" sizes="16x16" href="/favicon.ico?v=2">
</head>
<template name="home">
{{> navbar}}
{{#if thisurl}}
{{else}}
{{> navbar}}
{{/if}}
<div class="main section">
{{> yield}}
</div>
Expand Down
41 changes: 28 additions & 13 deletions client/landing.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
<template name="landing">
<div class="container">
<div class="row">
Create a new Event &nbsp;
<a class="btn-floating btn-large red" href="/newevent">
<i class="large material-icons">mode_edit</i>
</a>
Scan an image &nbsp;
<a class="btn-floating btn-large red" href="/scanner">
<i class="zmdi zmdi-camera"></i>
</a>
View your events &nbsp;
<a class="btn-floating btn-large red" href="/eventlist">
<i class="zmdi zmdi-view-list"></i>
</a>

<div class="coverPage">
<a href='/newevent'><img src="../secretPartyLogo.png" alt=""></a>
<br>
<span id="wordmark">Secret Party</span>
<br>
<div class="row" style="margin-top: 20px;">
<div class="col s4">
<a class="btn-floating btn-large red" href="/newevent">
<i class="large material-icons">mode_edit</i>
</a>
</div>
<div class="col s4">
<a class="btn-floating btn-large red" href="/scanner">
<i class="zmdi zmdi-camera"></i>
</a>
</div>
<div class="col s4">
<a class="btn-floating btn-large red" href="/eventlist">
<i class="zmdi zmdi-view-list"></i>
</a>
</div>
</div>
<div class="row">
<div class="col s4"><small>Create a new Event</small></div>
<div class="col s4"><small>Scan an image</small></div>
<div class="col s4"><small>View your events</small></div>
</div>
</div>
</div>
</template>
24 changes: 20 additions & 4 deletions client/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ nav {
}
}

.hidden {
display: none;
}

.landingPage {
background-color: $coal;
}


.page-footer {
background: -webkit-linear-gradient(left top, $purple , $lightpurple); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(bottom right, $purple, $lightpurple); /* For Opera 11.1 to 12.0 */
Expand Down Expand Up @@ -71,10 +80,17 @@ nav {
color: white;
}

#wordmark {
font-variant: small-caps;
}

.landing{
overflow: auto;
margin: auto;
position: relative;
.coverPage {
position: absolute;
left: 50%;
top: 50%;
ms-transform: translate(-50%, -50%); /* IE 9 */
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-family: 'Roboto', sans-serif;
text-align: center;
}
2 changes: 1 addition & 1 deletion client/navigation.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template name="navbar">
<nav class="z-depth-0 teal">
<nav id="navbar" class="z-depth-0 teal">
<a href="#" data-activates="sidenav" class="navbutton"><i class="material-icons" id="menubutton">menu</i></a>
<ul class="side-nav" id="sidenav">
<li><a class="waves-effect waves-light" href="/newevent">Create New Event</a></li>
Expand Down
31 changes: 27 additions & 4 deletions lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,34 @@ Router.map(function() {
})
})

Router.route('/events/:params', {
Router.route('/events/:_id', {
template: 'eventPage',
data: function() {
console.log(this.params.params);
var currentEvent = this.params.params;
return Events.findOne({ _id: currentEvent })
var currentEvent = this.params._id;
var eventdetail = Events.findOne({ _id: currentEvent }, {_id: 0});
for (var key in eventdetail){
console.log(eventdetail[key]);
}
return eventdetail;
}
})


//create a txt file
// Router.map(function() {
// this.route('txtFile', {
// where: 'server',
// path: '/events/:_id',
// action: function() {
// var filename = 'textfile' + '.txt';
// var text = "random text";
// var headers = {
// 'Content-Type': 'text/plain',
// 'Content-Disposition': "attachment; filename=" + filename
// };
//
// this.response.writeHead(200, headers);
// return this.response.end(text);
// }
// })
// });

0 comments on commit 72341ae

Please sign in to comment.