Skip to content

Instantly share code, notes, and snippets.

@manabuyasuda
Last active December 14, 2021 07:09
Show Gist options
  • Select an option

  • Save manabuyasuda/11b9b56360bca9d60e28189c870bc5b3 to your computer and use it in GitHub Desktop.

Select an option

Save manabuyasuda/11b9b56360bca9d60e28189c870bc5b3 to your computer and use it in GitHub Desktop.
//- @param {Object} params
//- @param {boolean|string} params.start [false] start属性値を出力するかの真偽値、または出力する数値
//-
//- @examples Input
//- +ListOrder
//- +ListOrder_Item リスト1
//- +ListOrder_Item リスト2
//- +ListOrder_Child
//- +ListOrder_Item リスト2-1
//- +ListOrder_Item リスト2-2
//-
//- @examples Output
//- <ol class="sw-ListOrder">
//- <li>リスト1</li>
//- <li>リスト2
//- <ol class="sw-ListOrder_Child">
//- <li>リスト2-1</li>
//- <li>リスト2-2</li>
//- </ol>
//- </li>
//- </ol>
mixin ListOrder(params={})
- const props = Object.assign({ start: false }, params)
ol.sw-ListOrder(start=props.start)&attributes(attributes)
block
mixin ListOrder_Item
li&attributes(attributes)
block
mixin ListOrder_Child
ol.sw-ListOrder_Child&attributes(attributes)
block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment