Skip to content

Instantly share code, notes, and snippets.

View iamrobert's full-sized avatar

Robert Stark iamrobert

View GitHub Profile
@iamrobert
iamrobert / _icons.scss
Last active November 28, 2023 15:49
IAMROBERT ICONS FILE
/*
* =======================================================================
+ ICONS
-----------------------------------------------------------------------
* =======================================================================
*/
/*! purgecss start ignore */
@iamrobert
iamrobert / favi.php
Created November 26, 2023 03:49
Favicon Joomla
<?php
/* iamrobert.com | TAIWAN -------------------------------------------------
_ __ __
(_)__ ___ _ _______ / / ___ ____/ /_
/ / _ `/ ' \/ __/ _ \/ _ \/ -_) __/ __/
/_/\_,_/_/_/_/_/ \___/_.__/\__/_/ \__/
===================================================== DIGITAL DESIGN STUDIO
# author Robert Stark
# copyright Copyright 2023 iamrobert.com All rights reserved.
@iamrobert
iamrobert / video-player.js
Last active November 24, 2023 05:11
JS PLAYER - uses plyr.io and generates Youtube thumbs
/* + VIDEO PLAYER
======================================================================*/
var current_player = null;
app.videoPlayer = {
init: function () {
if (!document.querySelector(".js-player")) {
// console.log('no-plyr');
return;
} else {
@iamrobert
iamrobert / new-window.js
Created March 6, 2023 11:47
Open LInk in new window via JS
//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);
@iamrobert
iamrobert / bad.html
Created December 20, 2022 11:39
Bad Html Example to clean on paste
<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>
@iamrobert
iamrobert / demo.html
Created December 17, 2022 14:05
LT Broswer can't read :is()
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
:is(.green) {
color: green;
background:lime;
@iamrobert
iamrobert / locomotive-gists.js
Last active December 17, 2022 10:23
Locomotive JS gists - #anchor scrolls and tabs
/* + 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) => {
/*
* Accessible AccordionTabs, by Matthias Ott (@m_ott)
*
* Based on the work of @stowball (https://codepen.io/stowball/pen/xVWwWe)
*
*/
(function () {
'use strict';
@iamrobert
iamrobert / item-slider.php
Created October 2, 2022 14:19
FLEXIContent slider for youtube or image
<?php
// No direct access
defined( '_JEXEC' )or die( 'Restricted access' );
// GET URL
//function url(){
// return sprintf(
// "%s://%s",
@iamrobert
iamrobert / item-gallery.php
Last active September 27, 2022 07:59
FLEXIContent item.php