removes reliance on bootstrap; moves necessary code to css/js

This commit is contained in:
Ashley Blewer
2017-10-18 16:02:04 -04:00
parent c552ffe699
commit 48a51a6f6a
5 changed files with 2056 additions and 1963 deletions

6
js/bootstrap.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,21 +1,17 @@
$(document).ready(function() {
$(function () {
$('[data-toggle="tooltip"]').tooltip()
});
// open recipe window if a hash is found in URL
if(window.location.hash) {
id = window.location.hash
$(id).collapse('show');
$('html, body').animate({ scrollTop: $(id).offset().top}, 1000);
id = window.location.hash.substring(1)
document.getElementById(id).checked = true;
$('html, body').animate({ scrollTop: $(window.location.hash).offset().top}, 1000);
$(id + " .link").empty();
$(id + " .link").append("<small>Link to this command: <a href="+window.location.href+">"+window.location.href+"</a></small>");
}
// add hash URL when recipe is opened
$('span[data-toggle="collapse"]').on("click", function(){
id = $(this).attr("data-target");
$('label[class="recipe"]').on("click", function(){
id = $(this).attr("for");
window.location.hash = id
$(id + " .link").empty();
$(id + " .link").append("<small>Link to this command: <a href="+window.location.href+">"+window.location.href+"</a></small>");