mirror of
https://github.com/Damillora/Yuika
synced 2024-11-05 10:27:32 +00:00
1 line
13 KiB
Plaintext
1 line
13 KiB
Plaintext
{"version":3,"sources":["nav.js","infinite-scroll.js","jquery.fitvids.js","nav-collapse.js"],"names":["sliderheight","a","divHeight","$","height","css","background-color","window","document","nextElement","querySelector","feedElement","buffer","ticking","loading","lastScrollY","scrollY","lastWindowHeight","innerHeight","lastDocumentHeight","documentElement","scrollHeight","addEventListener","onScroll","passive","onResize","requestTick","onPageLoad","this","status","removeEventListener","response","querySelectorAll","forEach","item","appendChild","importNode","resNextElement","href","onUpdate","xhr","XMLHttpRequest","responseType","open","send","requestAnimationFrame","fn","fitVids","options","settings","customSelector","ignore","getElementById","head","getElementsByTagName","div","createElement","innerHTML","childNodes","extend","each","selectors","push","ignoreList","$allVideos","find","join","not","$this","parents","length","tagName","toLowerCase","parent","isNaN","attr","aspectRatio","parseInt","width","videoName","_count","wrap","removeAttr","jQuery","Zepto","ready","nav","feed","update","trigger","getBoundingClientRect","top","classList","add","remove","click","menu","is","slideDown","slideUp"],"mappings":"AAEA,SAAAA,aAAAC,GACAC,UAAAC,EAAA,WAAAC,SACAH,EACAE,EAAA,QAAAE,IAAA,CAAAC,mBAAA,YAEAH,EAAA,QAAAE,IAAA,CAAAC,mBAAA,MCQA,SAAAC,EAAAC,GAEA,IAAAC,EAAAD,EAAAE,cAAA,kBACA,GAAAD,EAAA,CAKA,IAAAE,EAAAH,EAAAE,cAAA,cACA,GAAAC,EAAA,CAIA,IAAAC,EAAA,IAEAC,GAAA,EACAC,GAAA,EAEAC,EAAAR,EAAAS,QACAC,EAAAV,EAAAW,YACAC,EAAAX,EAAAY,gBAAAC,aAwEAd,EAAAe,iBAAA,SAAAC,EAAA,CAAAC,SAAA,IACAjB,EAAAe,iBAAA,SAAAG,GAEAC,KAzEA,SAAAC,IACA,GAAA,MAAAC,KAAAC,OAGA,OAFAtB,EAAAuB,oBAAA,SAAAP,QACAhB,EAAAuB,oBAAA,SAAAL,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2E,IACA,IAAAC,EAAAF,EAAAG,wBAAAC,IAAApF,OAAAS,QAIAyE,EAAA,IAAA1E,GACAuE,EAAAM,UAAAC,IAAA,SACAP,EAAAM,UAAAC,IAAA,aACAP,EAAAM,UAAAE,OAAA,cAEAR,EAAAM,UAAAE,OAAA,SACAR,EAAAM,UAAAE,OAAA,aACAR,EAAAM,UAAAC,IAAA,aAGAhF,GAAA,EAGAN,OAAAe,iBAAA,SApCA,WACAP,EAAAR,OAAAS,QACAU,KAkCA,CAAAF,SAAA,IACAjB,OAAAe,iBAAA,SAhCA,WACAf,OAAAW,YACAf,EAAAK,UAAAJ,SACAsB,MA6BA,GAEA8D,MHtCArF,EAAA,aAAA4F,MAAA,WACA,IAAAC,EAAA7F,EAAA,QACAA,EAAA,aACA6F,EAAAC,GAAA,YACAjG,cAAA,GACAgG,EAAAE,UAAA,MAEAF,EAAAG,QAAA,IAAA,WACAnG,cAAA","file":"yuika.js","sourcesContent":["\n\nfunction sliderheight(a) {\n divHeight = $('.navbar').height();\n if(a) {\n $('.nav').css({'background-color' : '#3b90c6'});\n } else {\n $('.nav').css({'background-color' : ''});\n }\n}\n\n $(\"#menushow\").click(function() {\n var menu = $(\".nav\");\n var menubtn = $(\"#menushow\");\n if(menu.is(\":hidden\")) {\n sliderheight(true);\n menu.slideDown(250);\n } else {\n menu.slideUp(250, function() {\n sliderheight(false) ;\n });\n }\n });\n\n","/* eslint-env browser */\n\n/**\n * Infinite Scroll\n * Used on all pages where there is a list of posts (homepage, tag index, etc).\n *\n * When the page is scrolled to 300px from the bottom, the next page of posts\n * is fetched by following the the <link rel=\"next\" href=\"...\"> that is output\n * by {{ghost_head}}.\n *\n * The individual post items are extracted from the fetched pages by looking for\n * a wrapper element with the class \"post-card\". Any found elements are appended\n * to the element with the class \"post-feed\" in the currently viewed page.\n */\n\n(function (window, document) {\n // next link element\n var nextElement = document.querySelector('link[rel=next]');\n if (!nextElement) {\n return;\n }\n\n // post feed element\n var feedElement = document.querySelector('.post-feed');\n if (!feedElement) {\n return;\n }\n\n var buffer = 300;\n\n var ticking = false;\n var loading = false;\n\n var lastScrollY = window.scrollY;\n var lastWindowHeight = window.innerHeight;\n var lastDocumentHeight = document.documentElement.scrollHeight;\n\n function onPageLoad() {\n if (this.status === 404) {\n window.removeEventListener('scroll', onScroll);\n window.removeEventListener('resize', onResize);\n return;\n }\n\n // append contents\n var postElements = this.response.querySelectorAll('.post-card');\n postElements.forEach(function (item) {\n // document.importNode is important, without it the item's owner\n // document will be different which can break resizing of\n // `object-fit: cover` images in Safari\n feedElement.appendChild(document.importNode(item, true));\n });\n\n // set next link\n var resNextElement = this.response.querySelector('link[rel=next]');\n if (resNextElement) {\n nextElement.href = resNextElement.href;\n } else {\n window.removeEventListener('scroll', onScroll);\n window.removeEventListener('resize', onResize);\n }\n\n // sync status\n lastDocumentHeight = document.documentElement.scrollHeight;\n ticking = false;\n loading = false;\n }\n\n function onUpdate() {\n // return if already loading\n if (loading) {\n return;\n }\n\n // return if not scroll to the bottom\n if (lastScrollY + lastWindowHeight <= lastDocumentHeight - buffer) {\n ticking = false;\n return;\n }\n\n loading = true;\n\n var xhr = new window.XMLHttpRequest();\n xhr.responseType = 'document';\n\n xhr.addEventListener('load', onPageLoad);\n\n xhr.open('GET', nextElement.href);\n xhr.send(null);\n }\n\n function requestTick() {\n ticking || window.requestAnimationFrame(onUpdate);\n ticking = true;\n }\n\n function onScroll() {\n lastScrollY = window.scrollY;\n requestTick();\n }\n\n function onResize() {\n lastWindowHeight = window.innerHeight;\n lastDocumentHeight = document.documentElement.scrollHeight;\n requestTick();\n }\n\n window.addEventListener('scroll', onScroll, {passive: true});\n window.addEventListener('resize', onResize);\n\n requestTick();\n})(window, document);\n","/*jshint browser:true */\n/*!\n* FitVids 1.3\n*\n*\n* Copyright 2017, Chris Coyier + Dave Rupert + Ghost Foundation\n* This is an unofficial release, ported by John O'Nolan\n* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/\n* Released under the MIT license\n*\n*/\n\n;(function( $ ){\n\n 'use strict';\n\n $.fn.fitVids = function( options ) {\n var settings = {\n customSelector: null,\n ignore: null\n };\n\n if(!document.getElementById('fit-vids-style')) {\n // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js\n var head = document.head || document.getElementsByTagName('head')[0];\n var css = '.fluid-width-video-container{flex-grow: 1;width:100%;}.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';\n var div = document.createElement(\"div\");\n div.innerHTML = '<p>x</p><style id=\"fit-vids-style\">' + css + '</style>';\n head.appendChild(div.childNodes[1]);\n }\n\n if ( options ) {\n $.extend( settings, options );\n }\n\n return this.each(function(){\n var selectors = [\n 'iframe[src*=\"player.vimeo.com\"]',\n 'iframe[src*=\"youtube.com\"]',\n 'iframe[src*=\"youtube-nocookie.com\"]',\n 'iframe[src*=\"kickstarter.com\"][src*=\"video.html\"]',\n 'object',\n 'embed'\n ];\n\n if (settings.customSelector) {\n selectors.push(settings.customSelector);\n }\n\n var ignoreList = '.fitvidsignore';\n\n if(settings.ignore) {\n ignoreList = ignoreList + ', ' + settings.ignore;\n }\n\n var $allVideos = $(this).find(selectors.join(','));\n $allVideos = $allVideos.not('object object'); // SwfObj conflict patch\n $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.\n\n $allVideos.each(function(){\n var $this = $(this);\n if($this.parents(ignoreList).length > 0) {\n return; // Disable FitVids on this video.\n }\n if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }\n if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))\n {\n $this.attr('height', 9);\n $this.attr('width', 16);\n }\n var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),\n width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),\n aspectRatio = height / width;\n if(!$this.attr('name')){\n var videoName = 'fitvid' + $.fn.fitVids._count;\n $this.attr('name', videoName);\n $.fn.fitVids._count++;\n }\n $this.wrap('<div class=\"fluid-width-video-container\"><div class=\"fluid-width-video-wrapper\"></div></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');\n $this.removeAttr('height').removeAttr('width');\n });\n });\n };\n\n // Internal counter for unique video names.\n $.fn.fitVids._count = 0;\n\n// Works with either jQuery or Zepto\n})( window.jQuery || window.Zepto );\n"," $(document).ready(function () {\n \n var nav = document.querySelector('.index-navbar');\n var feed = document.querySelector('#post');\n\n var lastScrollY = window.scrollY;\n var lastWindowHeight = window.innerHeight;\n var lastDocumentHeight = $(document).height();\n var ticking = false;\n\n function onScroll() {\n lastScrollY = window.scrollY;\n requestTick();\n }\n\n function onResize() {\n lastWindowHeight = window.innerHeight;\n lastDocumentHeight = $(document).height();\n requestTick();\n }\n\n function requestTick() {\n if (!ticking) {\n requestAnimationFrame(update);\n }\n ticking = true;\n }\n\n function update() {\n var trigger = feed.getBoundingClientRect().top + window.scrollY;\n var progressMax = lastDocumentHeight - lastWindowHeight;\n\n // show/hide nav\n if (lastScrollY >= trigger - 20) {\n nav.classList.add('fixed');\n nav.classList.add('nav-fixed');\n nav.classList.remove('absolute');\n } else {\n nav.classList.remove('fixed');\n nav.classList.remove('nav-fixed');\n nav.classList.add('absolute');\n }\n\n ticking = false;\n }\n\n window.addEventListener('scroll', onScroll, { passive: true });\n window.addEventListener('resize', onResize, false);\n\n update();\n\n });\n\n"]} |