Skip to content

Commit

Permalink
Make documentation compatible with the new js
Browse files Browse the repository at this point in the history
  • Loading branch information
almasaeed2010 committed Feb 26, 2017
1 parent 383d685 commit 3f5abdb
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 59 deletions.
15 changes: 10 additions & 5 deletions documentation/build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="skin-blue fixed" data-spy="scroll" data-target="#scrollspy">
<body class="skin-blue" data-spy="scroll" data-target="#scrollspy">
<div class="wrapper">

<header class="main-header">
Expand All @@ -38,7 +38,7 @@
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
<span class="sr-only">Toggle navigation</span>
</a>
<!-- Navbar Right Menu -->
Expand Down Expand Up @@ -102,6 +102,11 @@ <h1>

<!-- Main content -->
<div class="content body">
<p class="lead">
This documentation is for versions 2.3 and under.
If you are looking for documentation for version 2.4 and above,
please visit <a href="https://almsaeedstudio.com/adminlte-docs">our online documentation</a>.
</p>

include "introduction.html"

Expand Down Expand Up @@ -176,14 +181,14 @@ <h1>

</div><!-- ./wrapper -->

<!-- jQuery 2.2.3 -->
<script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- jQuery 3.1.1 -->
<script src="../plugins/jQuery/jquery-3.1.1.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="../bootstrap/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="../plugins/fastclick/fastclick.min.js"></script>
<!-- AdminLTE App -->
<script src="../dist/js/app.min.js"></script>
<script src="../dist/js/adminlte.min.js"></script>
<!-- SlimScroll 1.3.0 -->
<script src="../plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
Expand Down
111 changes: 61 additions & 50 deletions documentation/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,73 @@
* Documentation JS script
*/
$(function () {
var slideToTop = $("<div />");
slideToTop.html('<i class="fa fa-chevron-up"></i>');
slideToTop.css({
position: 'fixed',
bottom: '20px',
right: '25px',
width: '40px',
height: '40px',
color: '#eee',
'font-size': '',
'line-height': '40px',
'text-align': 'center',
'use strict'

var $slideToTop = $('<div />')

$slideToTop.html('<i class="fa fa-chevron-up"></i>')

$slideToTop.css({
position : 'fixed',
bottom : '20px',
right : '25px',
width : '40px',
height : '40px',
color : '#eee',
'font-size' : '',
'line-height' : '40px',
'text-align' : 'center',
'background-color': '#222d32',
cursor: 'pointer',
'border-radius': '5px',
'z-index': '99999',
opacity: '.7',
'display': 'none'
});
slideToTop.on('mouseenter', function () {
$(this).css('opacity', '1');
});
slideToTop.on('mouseout', function () {
$(this).css('opacity', '.7');
});
$('.wrapper').append(slideToTop);
cursor : 'pointer',
'border-radius' : '5px',
'z-index' : '99999',
opacity : '.7',
'display' : 'none'
})

$slideToTop.on('mouseenter', function () {
$(this).css('opacity', '1')
})

$slideToTop.on('mouseout', function () {
$(this).css('opacity', '.7')
})

$('.wrapper').append($slideToTop)

$(window).scroll(function () {
if ($(window).scrollTop() >= 150) {
if (!$(slideToTop).is(':visible')) {
$(slideToTop).fadeIn(500);
if (!$($slideToTop).is(':visible')) {
$($slideToTop).fadeIn(500)
}
} else {
$(slideToTop).fadeOut(500);
$($slideToTop).fadeOut(500)
}
});
$(slideToTop).click(function () {
$("body").animate({
})

$($slideToTop).click(function () {
$('body').animate({
scrollTop: 0
}, 500);
});
$(".sidebar-menu li:not(.treeview) a").click(function () {
var $this = $(this);
var target = $this.attr("href");
}, 500)
})

$('.sidebar-menu li:not(.treeview) a').click(function () {
var $this = $(this)
var target = $this.attr('href')
if (typeof target === 'string') {
$("body").animate({
scrollTop: ($(target).offset().top) + "px"
}, 500);
$('body').animate({
scrollTop: ($(target).offset().top) + 'px'
}, 500)
}
});
//Skin switcher
var current_skin = "skin-blue";
$('#layout-skins-list [data-skin]').click(function(e) {
e.preventDefault();
var skinName = $(this).data('skin');
$('body').removeClass(current_skin);
$('body').addClass(skinName);
current_skin = skinName;
});
});
})
// Skin switcher
var currentSkin = 'skin-blue'

$('#layout-skins-list [data-skin]').click(function (e) {
e.preventDefault()
var skinName = $(this).data('skin')
$('body').removeClass(currentSkin)
$('body').addClass(skinName)
currentSkin = skinName
})
})
8 changes: 4 additions & 4 deletions documentation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
<span class="sr-only">Toggle navigation</span>
</a>
<!-- Navbar Right Menu -->
Expand Down Expand Up @@ -2151,14 +2151,14 @@ <h3>AdminLTE</h3>

</div><!-- ./wrapper -->

<!-- jQuery 2.2.3 -->
<script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- jQuery 3.1.1 -->
<script src="../plugins/jQuery/jquery-3.1.1.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="../bootstrap/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="../plugins/fastclick/fastclick.min.js"></script>
<!-- AdminLTE App -->
<script src="../dist/js/app.min.js"></script>
<script src="../dist/js/adminlte.min.js"></script>
<!-- SlimScroll 1.3.0 -->
<script src="../plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
Expand Down

0 comments on commit 3f5abdb

Please sign in to comment.