LH :: Updated the structure so that it's more in line with wireframe

- Added logic to display login/logout and navbar menu
This commit is contained in:
Lim Han 2015-02-03 21:11:09 +08:00
parent 0fb4c8acfc
commit 756e74f7cc
12 changed files with 38 additions and 37 deletions

View file

@ -33,6 +33,9 @@
<script src="plugins/jquery/jquery-2.1.0.min.js"></script>
<script src="plugins/jquery-ui/jquery-ui.min.js"></script>
<!-- bootstrap javascript -->
<script src="js/lib/bootstrap.js"></script>
<!-- build:js({app,.tmp}) scripts/main.js -->
<script src="js/lib/angular.js"></script>
<script src="js/lib/angular-ui-router.js"></script>

File diff suppressed because one or more lines are too long

View file

@ -11,19 +11,16 @@
</div>
</div>
<data-ui-view></data-ui-view>
<data-ng-include src="'components/main/_services.html'"></data-ng-include>
<data-ng-include src="'components/landing/_services.html'"></data-ng-include>
<!-- Testimonials -->
<data-ng-include src="'components/main/_testimonials.html'"></data-ng-include>
<data-ng-include src="'components/landing/_testimonials.html'"></data-ng-include>
<!-- Companies -->
<data-ng-include src="'components/main/_companies.html'"></data-ng-include>
<data-ng-include src="'components/landing/_companies.html'"></data-ng-include>
<!-- Make an appointment call to action -->
<data-ng-include src="'components/main/_appointment.html'"></data-ng-include>
<data-ng-include src="'components/landing/_appointment.html'"></data-ng-include>
<!-- Add Owner / Register -->
<data-ng-include src="'components/main/_add_owner.html'"></data-ng-include>
<data-ng-include src="'components/landing/_add_owner.html'"></data-ng-include>

View file

@ -1,5 +1,17 @@
var MainController = function($scope, $rootScope, $state) {
$scope.getSession = function() {
return $scope.session;
};
$scope.login = function() {
$scope.session = { 'username' : 'test' };
};
$scope.logout = function() {
$scope.session = null;
};
$scope.menuTabs = [ {
'name' : 'Main Page',
'url' : '#',

View file

@ -19,7 +19,7 @@
</div>
<!-- Featured pets -->
<section id="pets" class="sections">
<section id="owners" class="sections">
<div class="container">
<div class="nav-tabs-filter">
<a href="#add_owner" role="button" class="btn btn-primary pull-right">Register Now - It's Free!</a>

View file

@ -9,41 +9,30 @@ app.controller('AboutController', AboutControllerDeclaration);
app.config(['stateHelperProvider','$urlRouterProvider','$urlMatcherFactoryProvider',function(stateHelperProvider,$urlRouterProvider,$urlMatcherFactoryProvider) {
$urlRouterProvider.when("/","/about").otherwise("/about");
$urlRouterProvider.otherwise("/");
$urlMatcherFactoryProvider.strictMode(false)
stateHelperProvider.state({
name: "home",
url: "",
templateUrl: "components/main/main.html",
name: "landing",
url: "/",
templateUrl: "components/landing/landing.html",
controller: "MainController",
abstract: true
}).state({
name: "home.vets",
name: "vets",
url: "/vets",
templateUrl: "components/veterinarians/veterinarians.html",
controller: "VeterinarianController",
}).state({
name: "home.about",
url: "/about",
templateUrl: "components/about/about.html",
controller: "AboutController"
}).state({
name: "home.pets",
name: "pets",
url: "/pets",
templateUrl: "components/pets/pets.html",
controller: "PetController"
}).state({
name: "home.owners",
name: "owners",
url: "/owners",
templateUrl: "components/owners/owners.html",
controller: "OwnerController"
}).state({
name: "home.visits",
url: "/visits",
templateUrl: "components/visits/visits.html",
controller: "VisitController"
});
} ]);