Skip to content

Instantly share code, notes, and snippets.

View erikpantzar's full-sized avatar
🎯
Focusing

Erik Pantzar erikpantzar

🎯
Focusing
View GitHub Profile
function time() {
const OFFSET = 90;
const now = new Date();
const hourT = now.getHours();
const minT = now.getMinutes();
const secT = now.getSeconds();
const hd = 360/12;
const mhd = hd/60;
export default accordion;
function accordion(arrayOfAccordions = []) {
for(let i = 0; i<arrayOfAccordions.length; i++) {
arrayOfAccordions[i].addEventListener('click', (el) => {
if(el.target.classList.contains('js-accordion-toggler')) {
el.target.parentNode.classList.toggle('accordion__item--expanded');
}
return false;
});
<div class="page">
<h1 class="page-title">
Hello my name if flvio
</h1>
<a href="#" class="page-cta">
This is something i want to show you
</a>
@erikpantzar
erikpantzar / Gulpfile.js.md
Last active November 14, 2016 14:27
basic less setup

Gulpfile

Now with my gulp setup, you just include what you want for tasks in this kind of fashion (I also have like Sass references in my watch.js and server.js, so you gotta update that to suit your needs)

var gulp = require('./gulp')([
    'browserify',
    'clean',
    'sasslint',
    'sass',
    'server',
.dropdown {
max-width: 100%;
background: darken(#fff, 2%);
display: block;
width: 260px;
font-size: 16px;
line-height: 45px;
position: relative;
margin: 10px;

Do we accept this pattern?

Check this url: Babel: Defaultparams => es6 to es5

Wanted es6 feature

function productInMarket(productMarkets = '', userMarket= '') {
  if (productMarkets.length > 0) {
    return productMarkets.indexOf(userMarket) > -1;
@erikpantzar
erikpantzar / Generic.html
Last active October 14, 2016 11:27
Start of refactor all the atc into a flipout directive
<html>
<element-item attr="123"></element-item>
</html>
<timer name="" alert="">
<timer-countdown></timer-countdown>
<timer-controls></timer-controls>
<timer-notifier></timer-notifier>
</timer>