cat, home, tag,search pages

This commit is contained in:
infeeeee
2019-08-06 19:24:58 +02:00
parent 02e6844883
commit 8e00b8717b
24 changed files with 392 additions and 848 deletions

43
js/lib/jquery.fittext.js Normal file
View File

@@ -0,0 +1,43 @@
/*global jQuery */
/*!
* FitText.js 1.2
*
* Copyright 2011, Dave Rupert http://daverupert.com
* Released under the WTFPL license
* http://sam.zoy.org/wtfpl/
*
* Date: Thu May 05 14:23:00 2011 -0600
*/
(function( $ ){
$.fn.fitText = function( kompressor, options ) {
// Setup options
var compressor = kompressor || 1,
settings = $.extend({
'minFontSize' : Number.NEGATIVE_INFINITY,
'maxFontSize' : Number.POSITIVE_INFINITY
}, options);
return this.each(function(){
// Store the object
var $this = $(this);
// Resizer() resizes items based on the object width divided by the compressor * 10
var resizer = function () {
$this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)));
};
// Call once to set.
resizer();
// Call on resize. Opera debounces their resize by default.
$(window).on('resize.fittext orientationchange.fittext', resizer);
});
};
})( jQuery );

View File

@@ -212,7 +212,6 @@
if (!isMobile) {
if (isMasonryPage) {
//no overflowY
$('html').css({ overflowY: "hidden" })
@@ -270,30 +269,14 @@
} else {
$(".home_wrapper-big .metadata").addClass("noBottomScrollbar")
}
//fit title
$(".archivetitle h1").fitText(0.6)
}//isMasonryPage end
}// !isMobile end
//returns three random numebers 0-5
function randomNumbers() {
// All numbers are equal
var numberOne = 3;
var numberTwo = 3;
var numberThree = 3;
// run this loop until numberOne is different than numberThree
do {
numberOne = Math.floor(Math.random() * 5);
} while (numberOne === numberThree);
// run this loop until numberTwo is different than numberThree and numberOne
do {
numberTwo = Math.floor(Math.random() * 5);
} while (numberTwo === numberThree || numberTwo === numberOne);
var i = [numberOne, numberTwo, numberThree]
return i
}
function random2() {
const choices = [
[1, 3],
@@ -490,10 +473,6 @@
})
/* --------------------------- scroll with keyboard --------------------------- */
var kd = false
$('html *:not(input)').keydown(function (event) {
if (kd) {