Skip to content

Instantly share code, notes, and snippets.

View iamrobert's full-sized avatar

Robert Stark iamrobert

View GitHub Profile
@iamrobert
iamrobert / playr-v2.html
Last active July 6, 2021 05:23
plyr.jo + lazyload youtube
(function(){
//PRECONNECT TO YOUTUBE
var linkTag = document.createElement('link');
linkTag.rel = 'preconnect';
linkTag.href = 'https://img.youtube.com';
//inject tag in the head of the document
document.head.appendChild(linkTag);
@iamrobert
iamrobert / t-transition.js
Created June 23, 2021 18:06
Barba Until Animation is done!
pageTransition: Barba.BaseTransition.extend({
start: function () {
Promise.all([this.newContainerLoading, this.animIn()])
.then(this.animOut.bind(this))
.then(function () {
app.onPageTransitionCompleted();
});
},
animIn: function () {
@iamrobert
iamrobert / getCSS-getJS.js
Created May 31, 2021 15:42
Vanilla JS | Get CSS & JS Example
/* + GET JS
-----------------------------------------------------------------------
https://stackoverflow.com/questions/16839698/jquery-getscript-alternative-in-native-javascript
==========================================================================*/
var getJS = function getJS(url) {
return new Promise(function(resolve, reject) {
var script = document.createElement("script");
script.src = url;
script.async = true;
@iamrobert
iamrobert / codyhouse-mega-menu.js
Created May 23, 2021 12:48
CodyHouse Mega Menu with level 1 click, and disable on mobile
// File#: _3_mega-site-navigation
// Usage: codyhouse.co/license
// iamrobert code to prevent click on touch
(function () {
var MegaNav = function (element) {
this.element = element;
this.search = this.element.getElementsByClassName('js-mega-nav__search');
this.searchActiveController = false;
this.menu = this.element.getElementsByClassName('js-mega-nav__nav');
this.menuItems = this.menu[0].getElementsByClassName('js-mega-nav__item');
@iamrobert
iamrobert / zurb-prepros.js
Last active May 23, 2021 08:19
Prepros Zurb FIle
/* + FOUNDATION 6.6.3 JS PREPOS FILE
======================================================================
1. Copy Files From dist/js/plugins folder on github
2. Remove @prepend for unneeded files
3. Probably best to start from bottom for uneeded files
----------------------------------------------------------------------
*/
//CORE FILES
//@prepend zf/foundation.core.min.js
//@prepend zf/foundation.util.box.min.js
@iamrobert
iamrobert / select.txt
Created March 29, 2021 12:22
TAIWAN AREA and REGIONS (FLEXIContent Select FIelds)
001_keelung_city::基隆市%%
002_taipei_city::台北市%%
003_new_taipei_city::新北市%%
004_hsinchu_city::新竹市%%
005_hsinchu_county::新竹縣%%
006_taoyuan_city::桃園市%%
007_miaoli_county::苗栗縣%%
008_taichung_city::台中市%%
009-changhua_county::彰化縣%%
010_nantou_county::南投縣%%
@iamrobert
iamrobert / dealer3.php
Last active February 16, 2021 07:10
FLEXIcontent UCM: Dealer with City > Region
<style>
* {
box-sizing: border-box;
}
.cell-items {
margin-right: 15px;
}
.cell-item {
width: 50%;
float: left;
@iamrobert
iamrobert / dealer2.php
Last active February 16, 2021 07:11
FLEXIcontent UCM:: Order by 2 fields. City.... Region: 2 DropDowns
<style>
*{
box-sizing: border-box;
}
.cell-items{
margin-right: 15px;
}
.cell-item{
width: 50%;
float: left;
@iamrobert
iamrobert / dealer.php
Last active February 16, 2021 06:39
FLEXIcontent Universal Module - Dealer by Magellan
<?php
/*
* =======================================================================
+ DEALER TEMPLATE
-----------------------------------------------------------------------
Jan 2019
* =======================================================================
*/
@iamrobert
iamrobert / Joomla Less Compiler php7.4 fix
Last active July 17, 2020 08:58
Less Compiler lessc-0.3.9.php php7.4 compatibility fix |
Less Compiler:
https://extensions.joomla.org/extension/miscellaneous/development/less-compiler/
https://github.com/ndeet/plg_system_less
The lessc-0.3.9.php is incompatible with php7.4. It gives the following notices:
https://github.com/ndeet/plg_system_less/issues/39
So replace this file: