diff --git a/misc/demo/assets/app.js b/misc/demo/assets/app.js
index c62d9cd478..bb47105830 100644
--- a/misc/demo/assets/app.js
+++ b/misc/demo/assets/app.js
@@ -1,4 +1,5 @@
angular.module('bootstrapDemoApp', ['ui.bootstrap', 'plunker'], function($httpProvider){
+ FastClick.attach(document.body);
delete $httpProvider.defaults.headers.common['X-Requested-With'];
});
@@ -52,4 +53,4 @@ var SelectModulesCtrl = function($scope, $modalInstance, modules) {
$scope.cancel = function () {
$modalInstance.dismiss();
};
-};
\ No newline at end of file
+};
diff --git a/misc/demo/assets/demo.css b/misc/demo/assets/demo.css
index a67e22e713..d1cadcddd3 100644
--- a/misc/demo/assets/demo.css
+++ b/misc/demo/assets/demo.css
@@ -32,53 +32,259 @@ section {
background-color: #f5f5f5;
}
-.jumbotron {
- position: relative;
- padding: 40px 0;
- color: #fff;
+.bs-social {
+ margin-top: 20px;
+ margin-bottom: 20px;
text-align: center;
- text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075);
- background: #020031;
- background: -moz-linear-gradient(45deg, #020031 0%, #6d3353 100%);
- background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#020031), color-stop(100%,#6d3353));
- background: -webkit-linear-gradient(45deg, #020031 0%,#6d3353 100%);
- background: -o-linear-gradient(45deg, #020031 0%,#6d3353 100%);
- background: -ms-linear-gradient(45deg, #020031 0%,#6d3353 100%);
- background: linear-gradient(45deg, #020031 0%,#6d3353 100%);
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#020031', endColorstr='#6d3353',GradientType=1 );
- -webkit-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
- -moz-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
- box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
- border-radius: 0;
- -moz-border-radius: 0;
- -webkit-border-radius: 0;
- -o-border-radius: 0;
-}
-.bs-docs-social {
- margin-top: 1em;
- padding: 15px 0;
- text-align: center;
- background-color: rgba(245,245,245,0.3);
- border-top: 1px solid rgba(255,255,255,0.3);
- border-bottom: 1px solid rgba(221,221,221,0.3);
+}
+
+@media (min-width: 768px) {
+
+ .bs-social {
+ text-align: left;
+ }
+
}
.nav, .pagination, .carousel, .panel-title a {
cursor: pointer;
}
-.bs-docs-social-buttons {
- margin-left: 0;
+.bs-social-buttons {
+ display: inline-block;
margin-bottom: 0;
padding-left: 0;
list-style: none;
}
-.bs-docs-social-buttons li {
+.bs-social-buttons li {
display: inline-block;
padding: 5px 8px;
line-height: 1;
}
+@media (max-width: 767px) {
+
+ .visible-xs.collapse.in {
+ display: block!important;
+ }
+ .visible-xs.collapse {
+ display: none!important;
+ }
+
+}
+
+.navbar .collapse {
+ border-top: 1px solid #e7e7e7;
+ margin-left: -15px;
+ margin-right: -15px;
+ padding-right: 15px;
+ padding-left: 15px;
+}
+
+.show-grid {
+ margin-bottom: 15px;
+}
+
+/*
+ * Container
+ *
+ * Tweak to width of container.
+ */
+
+/*@media (min-width: 1200px) {
+ .container{
+ max-width: 970px;
+ }
+}*/
+
+/*
+ * Tabs
+ *
+ * Tweaks to the Tabs.
+ */
+
+.code .nav-tabs {
+border-bottom: 1px solid #ccc;
+}
+
+.code pre, .code code {
+ border-top: none;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+
+.code .nav-tabs>li.active>a, .code .nav-tabs>li.active>a:hover, .code .nav-tabs>li.active>a:focus {
+background-color: #f8f8f8;
+border: 1px solid #ccc;
+border-bottom-color: transparent;
+}
+
+/*
+ * Button Inverse
+ *
+ * Buttons in the masthead.
+ */
+
+.btn-outline-inverse {
+color: #fff;
+background-color: transparent;
+border-color: #cdbfe3;
+margin: 10px;
+}
+
+@media (min-width: 768px) {
+
+ .btn-outline-inverse {
+ width: auto;
+ margin: 20px 5px 20px 0;
+ padding: 18px 24px;
+ font-size: 21px;
+ }
+
+}
+
+.btn-outline-inverse:hover, .btn-outline-inverse:focus, .btn-outline-inverse:active {
+color: #563d7c;
+text-shadow: none;
+background-color: #fff;
+border-color: #fff;
+}
+
+
+/* Page headers */
+.bs-header {
+ padding: 30px 15px 40px; /* side padding builds on .container 15px, so 30px */
+ font-size: 16px;
+ text-align: center;
+ text-shadow: 0 1px 0 rgba(0,0,0,.15);
+ color: #cdbfe3;
+ background-color: #563d7c;
+ background-image: url(header.png);
+}
+.bs-header a {
+ color: #fff;
+ font-weight: normal;
+}
+.bs-header h1 {
+ color: #fff;
+}
+.bs-header p {
+ font-weight: 200;
+ line-height: 1.4;
+}
+.bs-header .container {
+ position: relative;
+}
+
+@media (min-width: 768px) {
+ .bs-header {
+ font-size: 30px;
+ text-align: left;
+ }
+ .bs-header h1 {
+ font-size: 100px;
+ line-height: 1;
+ }
+}
+
+@media (min-width: 992px) {
+ .bs-header p {
+ margin-right: 25%;
+ }
+}
+
+.navbar-inner {
+ -webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.175);
+ box-shadow: 0 3px 3px rgba(0,0,0,0.175);
+}
+
+/*
+ * Side navigation
+ *
+ * Scrollspy and affixed enhanced navigation to highlight sections and secondary
+ * sections of docs content.
+ */
+
+/* By default it's not affixed in mobile views, so undo that */
+.bs-sidebar.affix {
+ position: static;
+}
+
+/* First level of nav */
+.bs-sidenav {
+ margin-top: 30px;
+ margin-bottom: 30px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ text-shadow: 0 1px 0 #fff;
+ background-color: #f7f5fa;
+ border-radius: 5px;
+}
+
+/* All levels of nav */
+.bs-sidebar .nav > li > a {
+ display: block;
+ color: #716b7a;
+ padding: 5px 20px;
+}
+.bs-sidebar .nav > li > a:hover,
+.bs-sidebar .nav > li > a:focus {
+ text-decoration: none;
+ background-color: #e5e3e9;
+ border-right: 1px solid #dbd8e0;
+}
+.bs-sidebar .nav > .active > a,
+.bs-sidebar .nav > .active:hover > a,
+.bs-sidebar .nav > .active:focus > a {
+ font-weight: bold;
+ color: #563d7c;
+ background-color: transparent;
+ border-right: 1px solid #563d7c;
+}
+
+/* Nav: second level (shown on .active) */
+.bs-sidebar .nav .nav {
+ display: none; /* Hide by default, but at >768px, show it */
+ margin-bottom: 8px;
+}
+.bs-sidebar .nav .nav > li > a {
+ padding-top: 3px;
+ padding-bottom: 3px;
+ padding-left: 30px;
+ font-size: 90%;
+}
+
+/* Show and affix the side nav when space allows it */
+@media (min-width: 992px) {
+ .bs-sidebar .nav > .active > ul {
+ display: block;
+ }
+ /* Widen the fixed sidebar */
+ .bs-sidebar.affix,
+ .bs-sidebar.affix-bottom {
+ width: 213px;
+ }
+ .bs-sidebar.affix {
+ position: fixed; /* Undo the static from mobile first approach */
+ top: 80px;
+ }
+ .bs-sidebar.affix-bottom {
+ position: absolute; /* Undo the static from mobile first approach */
+ }
+ .bs-sidebar.affix-bottom .bs-sidenav,
+ .bs-sidebar.affix .bs-sidenav {
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+}
+@media (min-width: 1200px) {
+ /* Widen the fixed sidebar again */
+ .bs-sidebar.affix-bottom,
+ .bs-sidebar.affix {
+ width: 263px;
+ }
+}
+
/* Not enough room on mobile for markup tab, js tab, and plunk btn.
And no one cares about plunk button on a phone anyway */
@@ -95,7 +301,7 @@ section {
}
.header-placeholder {
- height: 175px;
+ height: 50px;
}
@media screen and (min-width: 768px) {
@@ -114,4 +320,4 @@ section {
margin-left: 10px;
}
-}
\ No newline at end of file
+}
diff --git a/misc/demo/assets/header.png b/misc/demo/assets/header.png
new file mode 100644
index 0000000000..785dd104d3
Binary files /dev/null and b/misc/demo/assets/header.png differ
diff --git a/misc/demo/assets/smoothscroll-angular-custom.js b/misc/demo/assets/smoothscroll-angular-custom.js
new file mode 100644
index 0000000000..80a0c1ff55
--- /dev/null
+++ b/misc/demo/assets/smoothscroll-angular-custom.js
@@ -0,0 +1,94 @@
+/*
+ * https://github.com/alicelieutier/smoothScroll/
+ * A teeny tiny, standard compliant, smooth scroll script with ease-in-out effect and no jQuery (or any other dependancy, FWIW).
+ * MIT License
+ */
+window.smoothScroll = (function(){
+// We do not want this script to be applied in browsers that do not support those
+// That means no smoothscroll on IE9 and below.
+if(document.querySelectorAll === void 0 || window.pageYOffset === void 0 || history.pushState === void 0) { return; }
+
+// Get the top position of an element in the document
+var getTop = function(element) {
+ // return value of html.getBoundingClientRect().top ... IE : 0, other browsers : -pageYOffset
+ if(element.nodeName === 'HTML') return -window.pageYOffset
+ return element.getBoundingClientRect().top + window.pageYOffset;
+}
+// ease in out function thanks to:
+// http://blog.greweb.fr/2012/02/bezier-curve-based-easing-functions-from-concept-to-implementation/
+var easeInOutCubic = function (t) { return t<.5 ? 4*t*t*t : (t-1)*(2*t-2)*(2*t-2)+1 }
+
+// calculate the scroll position we should be in
+// given the start and end point of the scroll
+// the time elapsed from the beginning of the scroll
+// and the total duration of the scroll (default 500ms)
+var position = function(start, end, elapsed, duration) {
+ if (elapsed > duration) return end;
+ return start + (end - start) * easeInOutCubic(elapsed / duration); // <-- you can change the easing funtion there
+ // return start + (end - start) * (elapsed / duration); // <-- this would give a linear scroll
+}
+
+// we use requestAnimationFrame to be called by the browser before every repaint
+// if the first argument is an element then scroll to the top of this element
+// if the first argument is numeric then scroll to this location
+// if the callback exist, it is called when the scrolling is finished
+var smoothScroll = function(el, duration, callback){
+ duration = duration || 500;
+ var start = window.pageYOffset;
+
+ if (typeof el === 'number') {
+ var end = parseInt(el);
+ } else {
+ var end = getTop(el);
+ }
+
+ var clock = Date.now();
+ var requestAnimationFrame = window.requestAnimationFrame ||
+ window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame ||
+ function(fn){window.setTimeout(fn, 15);};
+
+ var step = function(){
+ var elapsed = Date.now() - clock;
+ window.scroll(0, position(start, end, elapsed, duration));
+ if (elapsed > duration) {
+ if (typeof callback === 'function') {
+ callback(el);
+ }
+ } else {
+ requestAnimationFrame(step);
+ }
+ }
+ step();
+}
+
+var linkHandler = function(ev) {
+ ev.preventDefault();
+
+ if (location.hash !== this.hash) {
+ //NOTE(@ajoslin): Changed this line to stop $digest errors
+ //window.history.pushState(null, null, this.hash)
+ angular.element(document).injector().get('$location').hash(this.hash);
+ }
+ // using the history api to solve issue #1 - back doesn't work
+ // most browser don't update :target when the history api is used:
+ // THIS IS A BUG FROM THE BROWSERS.
+ // change the scrolling duration in this call
+ smoothScroll(document.getElementById(this.hash.substring(1)), 500, function(el) {
+ location.replace('#' + el.id)
+ // this will cause the :target to be activated.
+ });
+}
+
+// We look for all the internal links in the documents and attach the smoothscroll function
+document.addEventListener("DOMContentLoaded", function () {
+ var internal = document.querySelectorAll('a[href^="#"]'), a;
+ for(var i=internal.length; a=internal[--i];){
+ a.addEventListener("click", linkHandler, false);
+ }
+});
+
+// return smoothscroll API
+return smoothScroll;
+
+})();
+
diff --git a/misc/demo/index.html b/misc/demo/index.html
index 14e0e70068..feb7b87a79 100644
--- a/misc/demo/index.html
+++ b/misc/demo/index.html
@@ -1,17 +1,19 @@
-
+
+
Angular directives for Twitter's Bootstrap
-
+
+
-
+
@@ -19,107 +21,120 @@
-