Skip to content

Instantly share code, notes, and snippets.

View wheelmaker24's full-sized avatar

Nikolaus Rademacher wheelmaker24

View GitHub Profile
@wheelmaker24
wheelmaker24 / tailwind-plugin-responsive-spacings.js
Created April 13, 2022 09:16
Tailwind Plugin Responsive Spacings
/**
* Tailwind Plugin Responsive Spacings
*
* This is a WIP tailwind plugin that aims to create responsive utility classes
* for everything spacing related.
*
* Taking the values from a `theme.responsiveSpacings` object within
* the `tailwind.config.js` file, this function creates utility classes
* for margin, padding, width, height, maxWidth and gap that change
* in their respective screen settings. For this the config object
import Link from 'next/link'
import { useState } from 'react'
import { useRouter } from 'next/router'
type Props = {
links: Array<{
name: string
path: string
}>
}

Keybase proof

I hereby claim:

  • I am wheelmaker24 on github.
  • I am wheelmaker24 (https://keybase.io/wheelmaker24) on keybase.
  • I have a public key ASAhM9faNY4e9xhDIMZPHwdznoAF6IAQ4NOUqbzkyi5bnQo

To claim this, I am signing this object:

@wheelmaker24
wheelmaker24 / jquery-accordion.js
Last active July 25, 2017 18:59
Simple jQuery accordion
$('.accordion dd:not(:first-of-type)').hide();
$('.accordion dt').on('click', function (e) {
e.preventDefault();
$(this).parent('dl.accordion').children('dd:visible').slideUp('slow');
$(this).nextUntil('dt').filter(':not(:visible)').slideDown('slow');
});
/**
* HTML code:
*