Skip to content

Commit

Permalink
Added privacy policy, tagline and cleaned up design
Browse files Browse the repository at this point in the history
  • Loading branch information
virajmahesh committed Mar 21, 2015
1 parent b2ef970 commit 8126bfd
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 7 deletions.
40 changes: 37 additions & 3 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,24 @@ h2 {
background: #306896 !important;
}

.mouseover {
border-radius: 10px;
background: rgba(240, 129, 131, 0.0);
padding: 5px;
padding-left: 10px;
padding-right: 10px;
}

#begin {
width: 100%;
padding: 10px;
padding: 20px;
margin: 1.1em auto;
font-size: 1.3em;

/* Button shadow for 3D effect */
/* Button shadow for 3D effect
box-shadow: 0 9px 0 #264064;
-webkit-box-shadow: 0 9px 0 #264064;
-moz-box-shadow: 0 9px 0 #264064;
-moz-box-shadow: 0 9px 0 #264064; */
}

/* Centers the Begin button */
Expand Down Expand Up @@ -294,4 +302,30 @@ md-select {

.md-select-label {
text-align: right !important;
}

.tagline {
margin-top: 10px;
font-size: 1.5em;
}

.italic {
font-style: italic;
padding-right: 0.3em;
}

footer {
font-size: 1.2em;
margin-top: 60px;
margin-bottom: 10px;
text-align: center;
width: 100%;
}

.ucb_logo {
width: 3%;
height: 3%;
max-width: 20px;
max-height: 20px;
opacity: 0.75;
}
19 changes: 16 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
<!-- Navbar Items-->
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#" class="item active-item">Home</a></li>
<li><a class="item" href="about.html">About</a></li>
<li><a class="item" href="#" ng-click="showRegister($event)">Join Our Mailing List</a></li>
<li class="active"><a href="#" class="item active-item"><span class="mouseover">Home</span></a></li>
<li><a class="item" href="about.html"><span class="mouseover">About</span></a></li>
<li><a class="item" href="#" ng-click="showRegister($event)"><span class="mouseover">Join Our Mailing List</span></a></li>
</ul>
</div>

Expand All @@ -57,6 +57,11 @@
<!-- Page Content -->
<div class="content container">
<h1>Jester 5.0</h1>
<div class="row tagline">
<div class="col-md-12 text-center">
Jokes For <span class="italic">Your</span> Sense of Humor
</div>
</div>
<div class="disclaimer">
Note: Some jokes may be considered offensive. If you are
offended by mild ethnic, sexist or religious jokes, please
Expand All @@ -73,6 +78,14 @@ <h1>Jester 5.0</h1>
</div>
</div>

<footer class="text-center" ng-controller="jester-homepage-controller">
Jester is a project by the UC Berkeley Lab for Automation and Science Engineering
<img src="img/ucb logo.png" class="ucb_logo"/><br>
<a href="#">
<span ng-click="showPrivacyAlert($event)">Privacy Policy</span>
</a>
</footer>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
Expand Down
29 changes: 29 additions & 0 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ function RegisterController($scope, $mdDialog) {
}


function PrivacyController($scope, $mdDialog) {
$scope.submit = function() {
$mdDialog.cancel();
}
}


/**
* Controller for the logout dialog
* @param $scope
Expand Down Expand Up @@ -92,6 +99,18 @@ $(document).ready(function () {
$(window).resize(function () {
justifyNavbar();
});
var item = $('.item');
item.mouseenter(function() {
if ($(this).hasClass('.active-item') == true) {
console.log("Hi");
$(this).children('.mouseover').css('background', 'rgba(240, 129, 131, 0.65)');
}
});
item.mouseleave(function() {
if ($(this).hasClass('.active-item')) {
$(this).children('.mouseover').css('background', 'rgba(240, 129, 131, 0.0)');
}
});
});


Expand Down Expand Up @@ -135,6 +154,15 @@ angular.module('jester', ['ngMaterial'])
});
};
})
.controller('jester-homepage-controller', function($scope, $mdDialog) {
$scope.showPrivacyAlert = function(ev) {
$mdDialog.show({
controller: PrivacyController,
templateUrl: 'privacy.tmpl.html',
targetEvent: event
});
};
})
.controller('joke-controller', function ($scope, $http, $mdDialog) {
// Set default rating
$scope.rating = 0;
Expand Down Expand Up @@ -176,6 +204,7 @@ angular.module('jester', ['ngMaterial'])
logSliderMovement($scope, $http);
}
});

})
// Directly inject html
.filter('unsafe', function ($sce) {
Expand Down
10 changes: 10 additions & 0 deletions privacy.tmpl.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<md-dialog aria-label="Privacy" class="angular-modal">
<md-content class="modal-content">
<p class="modal-heading">Privacy Policy</p>
<p>Comments and suggestions will be scanned to omit identifiable information.
We respect your privacy and will not share your email address with third parties.</p>
<div id="register-button-group">
<md-button class="md-raised md-primary positive dialog-button" ng-click="submit()">Got it!</md-button>
</div>
</md-content>
</md-dialog>
2 changes: 1 addition & 1 deletion register.tmpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<input label="Email" ng-model="user.email" type="email" class="long">
</md-input-container>
<div id="select-holder">
<md-select ng-model="user.source">
<md-select ng-model="user.source" placeholder="Where did you hear about Jester?">
<md-option value="Search Engine">Search Engine</md-option>
<md-option value="Social Network">Social Network</md-option>
<md-option value="Advertisment">Advertisment</md-option>
Expand Down

0 comments on commit 8126bfd

Please sign in to comment.