Skip to content

Instantly share code, notes, and snippets.

@jonathanarbely
Last active April 11, 2018 06:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanarbely/6b0396f2181e8d670ba4b65e3ae4629f to your computer and use it in GitHub Desktop.
Save jonathanarbely/6b0396f2181e8d670ba4b65e3ae4629f to your computer and use it in GitHub Desktop.
Pug Mixin Example
// _stepper.pug
mixin stepper(title, name, val, inactive)
p.c-hitlist__label= title
if inactive
.stepper__wrapper.disabled__wrapper(id=name+'Stepper')
// Decrease value (disabled/default)
button.stepper__dec(type='button', disabled)
img(src=IMG_pfad+'icons/ih-iconset/minus-676767.svg')
// Textinput for direct value-manipulation (inactive + predefined value/default)
if val
input.c-hitlist__input.stepper__input(type='text', placeholder='beliebig', name=name, id=name, value=val, disabled)
// Increase value (disabled/default)
button.stepper__inc(type='button', disabled)
img(src=IMG_pfad+'icons/ih-iconset/plus-676767.svg')
include _input-tooltip.pug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment