This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Customize locale Moment JS | |
* @description Enables Moment.js plugin | |
*/ | |
(function() { | |
function plural(word, num) { | |
var forms = word.split('_'); | |
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_header X-XSS-Protection "1; mode=block"; | |
add_header X-Frame-Options "SAMEORIGIN"; | |
add_header Referrer-Policy "strict-origin-when-cross-origin"; | |
add_header X-Download-Options "noopen"; | |
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; | |
add_header X-Content-Type-Options "nosniff"; | |
add_header Content-Security-Policy-Report-Only ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Makes the first letter of the line in the capital | |
* @return string | |
*/ | |
function upFirstLetter($str, $encoding = 'UTF-8') | |
{ | |
return mb_strtoupper(mb_substr($str, 0, 1, $encoding), $encoding) | |
. mb_substr($str, 1, null, $encoding); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function heightDetect() { | |
$(".main_head").css("height", $(window).height()); | |
}; | |
heightDetect(); | |
$(window).resize(function() { | |
heightDetect(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#loader { | |
background: none repeat scroll 0 0 #ffffff; | |
bottom: 0; | |
height: 100%; | |
left: 0; | |
position: fixed; | |
right: 0; | |
top: 0; | |
width: 100%; | |
z-index: 9999; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("img, a").on("dragstart", function(event) { event.preventDefault(); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.ondragstart = noselect; | |
document.onselectstart = noselect; | |
// document.oncontextmenu = noselect; | |
function noselect() {return false;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
$(function() { | |
$(".youtube").each(function() { | |
$(this).css('background-image', 'url(//i.ytimg.com/vi/' + this.id + '/sddefault.jpg)'); | |
$(this).append($('<div/>', {'class': 'play'})); | |
$(document).delegate('#'+this.id, 'click', function() { | |
var iframe_url = "https://www.youtube.com/embed/" + this.id + "?autoplay=1&autohide=1"; | |
if ($(this).data('params')) iframe_url+='&'+$(this).data('params'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('a[href^="#"]').bind('click.smoothscroll',function (e) { | |
e.preventDefault(); | |
var target = this.hash, | |
$target = $(target); | |
$('html, body').stop().animate({ | |
'scrollTop': $target.offset().top | |
}, 500, 'swing', function () { | |
window.location.hash = target; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteCond %{HTTP_USER_AGENT} wget [NC] | |
RewriteRule .* - [F] |