From c11b2b5f1ca8396b2eb95c9e4d20f3c7adda55dd Mon Sep 17 00:00:00 2001 From: Jason Weaver Date: Wed, 16 Oct 2013 14:21:17 -0500 Subject: [PATCH 1/6] Remove jQuery dependency. Default to bootstrap components written in pure AngularJS. --- app/views/includes/foot.jade | 5 ----- bower.json | 3 +-- public/js/init.js | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/views/includes/foot.jade b/app/views/includes/foot.jade index 0ed95b26..c18dc188 100755 --- a/app/views/includes/foot.jade +++ b/app/views/includes/foot.jade @@ -1,8 +1,3 @@ -script(type='text/javascript', src='/lib/jquery/jquery.js') - -//Bootstrap -script(type='text/javascript', src='/lib/bootstrap-assets/js/bootstrap.js') - //AngularJS script(type='text/javascript', src='/lib/angular/angular.js') script(type='text/javascript', src='/lib/angular-cookies/angular-cookies.js') diff --git a/bower.json b/bower.json index e00fcd87..5f3586b4 100644 --- a/bower.json +++ b/bower.json @@ -8,7 +8,6 @@ "angular-cookies": "~1.0.6", "angular-bootstrap": "~0.4.0", "angular-ui-utils": "0.0.4", - "json3": "~3.2.4", - "jquery": "~1.9.1" + "json3": "~3.2.4" } } diff --git a/public/js/init.js b/public/js/init.js index fa2955c8..f77b4f2a 100644 --- a/public/js/init.js +++ b/public/js/init.js @@ -6,7 +6,7 @@ window.init = function() { window.bootstrap(); }; -$(document).ready(function() { +angular.element(document).ready(function() { //Fixing facebook bug with redirect if (window.location.hash == "#_=_") window.location.hash = ""; From f77f71571497e0f8b37f53fca00d75f87ab04cc7 Mon Sep 17 00:00:00 2001 From: Jason Weaver Date: Thu, 17 Oct 2013 00:30:06 -0500 Subject: [PATCH 2/6] Dont bower install bootstrap-assets. Grab twitter bootstrap css from git. --- app/views/includes/head.jade | 4 ++-- bower.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/includes/head.jade b/app/views/includes/head.jade index 07d1d486..169af6d7 100755 --- a/app/views/includes/head.jade +++ b/app/views/includes/head.jade @@ -19,8 +19,8 @@ head meta(property='og:site_name', content='MEAN - A Modern Stack') meta(property='fb:admins', content='APP_ADMIN') - link(rel='stylesheet', href='/lib/bootstrap-assets/css/bootstrap.css') - link(rel='stylesheet', href='/lib/bootstrap-assets/css/bootstrap-responsive.css') + link(rel='stylesheet', href='/lib/bootstrap-css/index.css') + link(rel='stylesheet', href='/lib/bootstrap-responsive-css/index.css') link(rel='stylesheet', href='/css/common.css') link(rel='stylesheet', href='/css/views/articles.css') diff --git a/bower.json b/bower.json index 5f3586b4..834b4b56 100644 --- a/bower.json +++ b/bower.json @@ -2,7 +2,8 @@ "name": "mean", "version": "1.0.0", "dependencies": { - "bootstrap-assets": "2.3.2", + "bootstrap-css": "https://raw.github.com/twbs/bootstrap/v2.3.2/docs/assets/css/bootstrap.css", + "bootstrap-responsive-css": "https://raw.github.com/twbs/bootstrap/v2.3.2/docs/assets/css/bootstrap-responsive.css", "angular": "~1.0.6", "angular-resource": "~1.0.6", "angular-cookies": "~1.0.6", From 0773d240946cb04757e024606c1276888a2f6449 Mon Sep 17 00:00:00 2001 From: Jason Weaver Date: Sun, 20 Oct 2013 15:59:32 -0500 Subject: [PATCH 3/6] Updated to use @fyockm bootstrap-css-only repo. Changed header markup to use bootstrap 3 --- app/views/includes/head.jade | 4 +-- app/views/layouts/default.jade | 2 +- bower.json | 5 ++- public/views/header.html | 56 ++++++++++++++++++---------------- 4 files changed, 34 insertions(+), 33 deletions(-) diff --git a/app/views/includes/head.jade b/app/views/includes/head.jade index 169af6d7..ca125347 100755 --- a/app/views/includes/head.jade +++ b/app/views/includes/head.jade @@ -19,8 +19,8 @@ head meta(property='og:site_name', content='MEAN - A Modern Stack') meta(property='fb:admins', content='APP_ADMIN') - link(rel='stylesheet', href='/lib/bootstrap-css/index.css') - link(rel='stylesheet', href='/lib/bootstrap-responsive-css/index.css') + link(rel='stylesheet', href='/lib/bootstrap-css-only/css/bootstrap.min.css') + link(rel='stylesheet', href='/lib/bootstrap-css-only/css/bootstrap-theme.min.css') link(rel='stylesheet', href='/css/common.css') link(rel='stylesheet', href='/css/views/articles.css') diff --git a/app/views/layouts/default.jade b/app/views/layouts/default.jade index f2ffb493..5e242b17 100755 --- a/app/views/layouts/default.jade +++ b/app/views/layouts/default.jade @@ -2,7 +2,7 @@ html(lang='en', xmlns='http://www.w3.org/1999/xhtml', xmlns:fb='https://www.facebook.com/2008/fbml', itemscope='itemscope', itemtype='http://schema.org/Product') include ../includes/head body - header.navbar.navbar-fixed-top.navbar-inverse(data-ng-include="'views/header.html'") + .navbar.navbar-inverse.navbar-fixed-top(data-ng-include="'views/header.html'", data-role="navigation") section.content section.container block content diff --git a/bower.json b/bower.json index 834b4b56..54b07e00 100644 --- a/bower.json +++ b/bower.json @@ -2,12 +2,11 @@ "name": "mean", "version": "1.0.0", "dependencies": { - "bootstrap-css": "https://raw.github.com/twbs/bootstrap/v2.3.2/docs/assets/css/bootstrap.css", - "bootstrap-responsive-css": "https://raw.github.com/twbs/bootstrap/v2.3.2/docs/assets/css/bootstrap-responsive.css", + "bootstrap-css-only": "latest", "angular": "~1.0.6", "angular-resource": "~1.0.6", "angular-cookies": "~1.0.6", - "angular-bootstrap": "~0.4.0", + "angular-bootstrap": "latest", "angular-ui-utils": "0.0.4", "json3": "~3.2.4" } diff --git a/public/views/header.html b/public/views/header.html index 75678125..a545dbb8 100644 --- a/public/views/header.html +++ b/public/views/header.html @@ -1,28 +1,30 @@ -