summaryrefslogtreecommitdiff
path: root/public/vendor/showup
diff options
context:
space:
mode:
Diffstat (limited to 'public/vendor/showup')
-rwxr-xr-xpublic/vendor/showup/showup.css125
-rwxr-xr-xpublic/vendor/showup/showup.js87
2 files changed, 212 insertions, 0 deletions
diff --git a/public/vendor/showup/showup.css b/public/vendor/showup/showup.css
new file mode 100755
index 00000000..d92523fa
--- /dev/null
+++ b/public/vendor/showup/showup.css
@@ -0,0 +1,125 @@
+/*
+ * Showup.js jQuery Plugin
+ * http://github.com/jonschlinkert/showup
+ *
+ * Copyright (c) 2013 Jon Schlinkert, contributors
+ * Licensed under the MIT License (MIT).
+ */
+
+/**
+ * Docs navbar transitions effects
+ */
+
+.navbar-tall,
+.navbar-show {
+ -webkit-transition: -webkit-transform .3s;
+ -moz-transition: -moz-transform .3s;
+ -o-transition: -o-transform .3s;
+ transition: transform .3s;
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ transform: translate(0, 0);
+}
+
+.navbar-hide {
+ -webkit-transition: -webkit-transform .2s;
+ -moz-transition: -moz-transform .2s;
+ -o-transition: -o-transform .2s;
+ transition: transform .2s;
+ -webkit-transform: translate(0, -60px);
+ -ms-transform: translate(0, -60px);
+ transform: translate(0, -60px);
+}
+
+
+.navbar-tall,
+.navbar-short,
+.navbar-tall .navbar-brand,
+.navbar-short .navbar-brand,
+.navbar-tall .navbar-nav > li > a,
+.navbar-short .navbar-nav > li > a {
+ -webkit-transition: all 0.2s linear;
+ transition: all 0.2s linear;
+}
+
+.navbar-short {
+ min-height: 40px;
+}
+.navbar-short .navbar-brand {
+ font-size: 16px;
+ padding: 13px 15px 10px;
+}
+.navbar-short .navbar-nav > li > a {
+ padding-top: 12px;
+ padding-bottom: 12px;
+}
+
+
+.navbar-tall {
+ min-height: 70px;
+}
+.navbar-tall .navbar-brand {
+ font-size: 24px;
+ padding: 25px 15px;
+}
+.navbar-tall .navbar-nav > li > a {
+ padding-top: 25px;
+}
+
+
+
+/**
+ * Docs Buttons
+ */
+
+/* Fixed button, bottom right */
+.btn-fixed-bottom {
+ position: fixed;
+ bottom: 30px;
+ display: none;
+ z-index: 5;
+ width: 40px;
+ height: 40px;
+}
+
+/* Toggles navbar classes */
+.btn-hide-show {
+ margin-right: 10px;
+}
+
+/* Light theme */
+.btn-light {
+ color: #555;
+ background-color: rgba(0, 0, 0,.1);
+}
+.btn-light:hover {
+ color: #111;
+ background-color: rgba(0, 0, 0,.25);
+}
+
+/* Dark theme */
+.btn-dark {
+ color: #fff;
+ background-color: rgba(0, 0, 0,.5);
+}
+.btn-dark:hover {
+ color: #fff;
+ background-color: rgba(0, 0, 0,.9);
+}
+
+/* Buttons displayed throughout the content */
+.btn-showup {
+ position: relative;
+ color: #fff;
+ font-weight: normal;
+ background-color: #463265;
+ border-color: #3F2961;
+}
+
+.btn-showup:hover,
+.btn-showup:focus {
+ color: #fff;
+ outline: none;
+ background-color: #39235A;
+ border-color: #39235A;
+} \ No newline at end of file
diff --git a/public/vendor/showup/showup.js b/public/vendor/showup/showup.js
new file mode 100755
index 00000000..f4f2267e
--- /dev/null
+++ b/public/vendor/showup/showup.js
@@ -0,0 +1,87 @@
+/*
+ * Showup.js jQuery Plugin
+ * http://github.com/jonschlinkert/showup
+ *
+ * Copyright (c) 2013 Jon Schlinkert, contributors
+ * Licensed under the MIT License (MIT).
+ */
+
+
+(function( $ ) {
+ $.fn.showUp = function(ele, options) {
+ options = options || {};
+
+ var target = $(ele);
+ var down = options.down || 'navbar-hide';
+ var up = options.up || 'navbar-show';
+ var btnHideShow = options.btnHideShow || '.btn-hide-show';
+ var hideOffset = options.offset || 60;
+ var previousScroll = 0;
+ var isHide = false;
+
+ $(window).scroll(function () {
+ checkScrollTop();
+ });
+
+ $(window).resize(function () {
+ checkScrollTop();
+ });
+
+ $(window).mousewheel(function () {
+ checkScrollTop();
+ });
+
+ function checkScrollTop()
+ {
+ target.clearQueue();
+ target.stop();
+ var currentScroll = $(this).scrollTop();
+ if (currentScroll > hideOffset) {
+ if(Math.abs(previousScroll - currentScroll) < 50) return;
+ if (currentScroll > previousScroll) {
+ // Action on scroll down
+ target.removeClass(up).addClass(down);
+ } else if (currentScroll < previousScroll) {
+ // Action on scroll up
+ target.removeClass(down).addClass(up);
+ }
+ } else {
+ target.removeClass(down).addClass(up);
+ }
+ previousScroll = $(this).scrollTop();
+ }
+
+ // Toggle visibility of target on click
+ $(btnHideShow).click(function () {
+ if (target.hasClass(down)) {
+ target.removeClass(down).addClass(up);
+ } else {
+ target.removeClass(up).addClass(down);
+ }
+ });
+ };
+})( jQuery );
+
+// TODO: make customizable
+$(document).ready(function () {
+ var duration = 420;
+ var showOffset = 220;
+ var btnFixed = '.btn-fixed-bottom';
+ var btnToTopClass = '.back-to-top';
+
+ $(window).scroll(function () {
+ if ($(this).scrollTop() > showOffset) {
+ $(btnFixed).fadeIn(duration);
+ } else {
+ $(btnFixed).fadeOut(duration);
+ }
+ });
+
+ $(btnToTopClass).click(function (event) {
+ event.preventDefault();
+ $('html, body').animate({
+ scrollTop: 0
+ }, duration);
+ return false;
+ });
+}); \ No newline at end of file