Skip to content

Instantly share code, notes, and snippets.

View gisu's full-sized avatar

sascha fuchs gisu

View GitHub Profile
@gisu
gisu / image.vue
Created March 16, 2019 16:04
Vue Wrapper for Imgix
<template>
<figure
class="eg-image relative"
@clicks="clickTransfer()"
>
<div
:class="[bgColorClass, { 'h-full w-full': background, rounded, 'skeleton': showSkeleton}]"
:style="[presized ? styleObject : '']"
>
<no-ssr>
/// Generate Coordinates based on Grid Matrix and the selected area
///
/// @group core - cssgrid
///
/// @param {string} $area - Name of the Area
/// @param {map} $map - Map of your grid area matrix
/// @param {bool} $columnGap - If you use Gap for Columns
/// @param {bool} $rowGap - If you use Gap for Rows
///
/// @example scss - scss
/// Generate a Grid Template Area from a Grid Map
///
/// @group core - cssgrid
///
/// @param {string} $area - Name of the Area
/// @param {map} $map - Map of your grid area matrix
///
/// @example scss - scss
/// $gridAreaMap: (
/// row1: ('logo', 'nav', 'nav', 'nav'),
@gisu
gisu / cssgrid-columandrow.scss
Last active July 25, 2017 10:20
Generate Column and Rows
/// Add Gap between the boxes
///
/// @group core - cssgrid
///
/// @param {list} $boxes - List with box sizes
/// @param {string} $gap - Optional column gap
@function box-gap($boxes, $gap) {
$box: ();
@for $i from 1 through length($boxes) {
@gisu
gisu / _cssgrid.scss
Last active May 7, 2020 17:51
For converting Grid Spec 2 to Grid Spec 1
// ===================================================
// CSS Grid Layout Helper
//
// To convert some of the CSS Grid Spec 2 features to Spec 1
//
// Author: Sascha Fuchs
//
// ===================================================
/// Add Gap between the boxes
@gisu
gisu / macroMediaImageSet.php
Last active February 4, 2017 13:12
Wordpress Image Generation
<?php
/**
* Media Image Set Reference
* =========================
* Generate a Media Image Set for Lazyload in different formats. It references to
* the defined Images Sizes, to make it Smarter
*
* @param {object} $image = Image (Uses a ACF Image Array)
* @param {string} $classname = Classname from the Element
* @param {string} $format = Imageformat [uncropped, wide, extrawide, square, rect]
@gisu
gisu / imagesizes.php
Last active February 4, 2017 12:54
Wordpress Image Generation and Handling
<?php
/**
Image Sizes
===========
Build a Set of different Imagesets
Part of your function.php
*/
// Uncopped Image Sizes
$UNCROPPED_SIZES = [
@gisu
gisu / img.html
Created December 15, 2016 14:45 — forked from brettburwell/img.html
Craft macro to centralize the markup and config for responsive images
{# ================================================================== #}
{# ================================================================== #}
{# Responsive Images
{# ================================================================== #}
{# ================================================================== #}
{#
{% import '_macros/img' as macroImg %}
Macro to centralize the markup and config for responsive images.
@gisu
gisu / Multienvironment Worpdress.txt
Last active December 20, 2015 12:00
Multienvironment Worpdress
Include a directory in your Theme folder with the name `wp-config` and include here the File for your Environment.
@gisu
gisu / SassMeister-input-HTML.html
Created September 28, 2015 16:51
Generated by SassMeister.com.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="container">
<div class="left"></div>
<div class="right"></div>