Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Fixing Bower Versions, Fix Flickering
Browse files Browse the repository at this point in the history
  • Loading branch information
amoshaviv committed Mar 5, 2014
1 parent 8c825ff commit a3a7129
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 82 deletions.
4 changes: 2 additions & 2 deletions app/views/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
<![endif]-->
</head>

<body>
<header data-ng-include="'/modules/core/views/header.html'" class="navbar navbar-fixed-top navbar-inverse ng-cloak"></header>
<body class="ng-cloak">
<header data-ng-include="'/modules/core/views/header.html'" class="navbar navbar-fixed-top navbar-inverse"></header>
<section class="content">
<section class="container">
{% block content %}{% endblock %}
Expand Down
18 changes: 9 additions & 9 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"version": "0.2.1",
"description": "Fullstack JavaScript with MongoDB, Express, AngularJS, and Node.js.",
"dependencies": {
"bootstrap": "latest",
"angular": "latest",
"angular-cookies": "latest",
"angular-resource": "latest",
"angular-animate": "latest",
"angular-mocks": "latest",
"angular-bootstrap": "latest",
"angular-ui-utils": "latest",
"angular-ui-router": "#master"
"bootstrap": "~3",
"angular": "~1.2",
"angular-cookies": "~1.2",
"angular-resource": "~1.2",
"angular-animate": "~1.2",
"angular-mocks": "~1.2",
"angular-bootstrap": "~0.10.0",
"angular-ui-utils": "~0.1.0",
"angular-ui-router": "~0.2.9"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"npm": "1.4.x"
},
"scripts": {
"start": "node node_modules/grunt-cli/bin/grunt",
"test": "node node_modules/grunt-cli/bin/grunt test",
"postinstall": "node node_modules/bower/bin/bower install"
"start": "grunt",
"test": "grunt test",
"postinstall": "bower install"
},
"dependencies": {
"express": "~3.4.7",
"express": "~3.4.8",
"consolidate": "~0.10.0",
"swig": "~1.3.2",
"mongoose": "~3.8.8",
Expand Down
22 changes: 4 additions & 18 deletions public/css/common.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
body {
padding-top:50px;
.content {
margin-top: 50px;
}

a.undecorated-link:hover {
text-decoration: none;
}

footer {
position:fixed;
left:0px;
bottom:0px;
height:30px;
width:100%;
background:#ddd;
-webkit-box-shadow:0 8px 6px 6px black;
-moz-box-shadow:0 8px 6px 6px black;
box-shadow:0 8px 6px 6px black
}

footer p {
padding:5px 0 12px 10px
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
2 changes: 1 addition & 1 deletion public/js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ var ApplicationConfiguration = (function() {
applicationModuleVendorDependencies: applicationModuleVendorDependencies,
registerModule: registerModule
};
})();
})();
29 changes: 16 additions & 13 deletions public/modules/core/controllers/header.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
'use strict';

angular.module('mean.core').controller('HeaderController', ['$scope', 'Authentication',
function($scope, Authentication) {
$scope.authentication = Authentication;
function($scope, Authentication) {
$scope.authentication = Authentication;
$scope.isCollapsed = false;

$scope.menu = [{
title: 'Articles',
link: 'articles',
uiRoute: '/articles'
}, {
title: 'New Article',
link: 'articles/create',
uiRoute: '/articles/create'
}];
$scope.menu = [{
title: 'Articles',
link: 'articles',
uiRoute: '/articles'
}, {
title: 'New Article',
link: 'articles/create',
uiRoute: '/articles/create'
}];

$scope.isCollapsed = false;
}
$scope.toggleCollapsibleMenu = function() {
$scope.isCollapsed = !$scope.isCollapsed;
};
}
]);
70 changes: 35 additions & 35 deletions public/modules/core/views/header.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
<div class="container" data-ng-controller="HeaderController">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-ng-click="isCollapsed = !isCollapsed">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="/#!/" class="navbar-brand">MEAN.JS</a>
</div>
<nav class="collapse navbar-collapse" collapse="!isCollapsed" role="navigation">
<ul class="nav navbar-nav" data-ng-show="authentication.user">
<li data-ng-repeat="item in menu" data-ng-show="authentication.user" ui-route="{{item.uiRoute}}" ng-class="{active: $uiRoute}">
<a href="/#!/{{item.link}}">{{item.title}}</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" data-ng-hide="authentication.user">
<li ui-route="/signup" ng-class="{active: $uiRoute}">
<a href="/#!/signup">Signup</a>
</li>
<li class="divider-vertical"></li>
<li ui-route="/signin" ng-class="{active: $uiRoute}">
<a href="/#!/signin">Signin</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" data-ng-show="authentication.user">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-ng-click="toggleCollapsibleMenu()">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="/#!/" class="navbar-brand">MEAN.JS</a>
</div>
<nav class="collapse navbar-collapse" collapse="!isCollapsed" role="navigation">
<ul class="nav navbar-nav" data-ng-show="authentication.user">
<li data-ng-repeat="item in menu" data-ng-show="authentication.user" ui-route="{{item.uiRoute}}" ng-class="{active: $uiRoute}">
<a href="/#!/{{item.link}}">{{item.title}}</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" data-ng-hide="authentication.user">
<li ui-route="/signup" ng-class="{active: $uiRoute}">
<a href="/#!/signup">Signup</a>
</li>
<li class="divider-vertical"></li>
<li ui-route="/signin" ng-class="{active: $uiRoute}">
<a href="/#!/signin">Signin</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" data-ng-show="authentication.user">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
{{authentication.user.displayName}} <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="/auth/signout">Signout</a>
</li>
</ul>
</li>
</ul>
</nav>
<ul class="dropdown-menu">
<li>
<a href="/auth/signout">Signout</a>
</li>
</ul>
</li>
</ul>
</nav>
</div>

0 comments on commit a3a7129

Please sign in to comment.