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
app.imgBaselineHeight = { | |
init: function () { | |
function calculateCSSVar(variableName) { | |
const tempEl = document.createElement('div'); | |
tempEl.style.marginTop = `var(${variableName})`; | |
tempEl.style.position = 'absolute'; | |
tempEl.style.visibility = 'hidden'; | |
document.body.appendChild(tempEl); | |
const computedStyle = getComputedStyle(tempEl).marginTop; |
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
var urlParams = new URLSearchParams(window.location.search); | |
if (urlParams.has('grid')) { | |
document.body.classList.add("bgrid"); | |
} | |
/* + BGRID | |
======================================================================*/ | |
// Keyboard event listener for Ctrl + ; |
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
# CSS/JS auto-versioning | |
RewriteEngine On | |
RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L] |
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
/* | |
* ======================================================================= | |
+ ICONS | |
----------------------------------------------------------------------- | |
* ======================================================================= | |
*/ | |
/*! purgecss start ignore */ | |
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 | |
/* iamrobert.com | TAIWAN ------------------------------------------------- | |
_ __ __ | |
(_)__ ___ _ _______ / / ___ ____/ /_ | |
/ / _ `/ ' \/ __/ _ \/ _ \/ -_) __/ __/ | |
/_/\_,_/_/_/_/_/ \___/_.__/\__/_/ \__/ | |
===================================================== DIGITAL DESIGN STUDIO | |
# author Robert Stark | |
# copyright Copyright 2023 iamrobert.com All rights reserved. |
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
/* + VIDEO PLAYER | |
======================================================================*/ | |
var current_player = null; | |
app.videoPlayer = { | |
init: function () { | |
if (!document.querySelector(".js-player")) { | |
// console.log('no-plyr'); | |
return; | |
} else { |
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
//4. SET EXTERNAL LINKS | |
function setRelAttribute() { | |
var elems = document.body.querySelectorAll('.mainbody a:not([class^="glightbox"])'); | |
var l = window.location.hostname; | |
var regex = new RegExp('^https?:\/\/' + l.replace(/\./g, '\\.') + '(\/.*)*$|^\/.*$'); | |
for (var i = 0; i < elems.length; i++) { | |
var elem = elems[i]; | |
var isInternal = regex.test(elem.href); |
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
<h3 class="class">Some supported heading</h3> | |
<h6>non supported heading</h6> | |
<style type="text/css"> | |
font { | |
font-family: arial; | |
font-size: 140%; | |
} | |
</style> | |
<h1><p>PASTE CHECK</p></h1> | |
<h1><a href="#">PASTE CHECK</a></p></h1> |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Untitled Document</title> | |
<style> | |
:is(.green) { | |
color: green; | |
background:lime; |
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
/* + LOCOMOTIVE ANCHORS | |
https://github.com/locomotivemtl/locomotive-scroll/issues/175#issuecomment-1082541029 | |
======================================================================*/ | |
const anchorLinks = document.querySelectorAll('.mainbody a[href^=\\#]:not(.no-loco):not([href$=\\#])'); | |
anchorLinks.forEach((anchorLink) => { | |
let hashval = anchorLink.getAttribute('href'); | |
let target = document.querySelector(hashval); | |
anchorLink.addEventListener('click', (e) => { |
NewerOlder