Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. article
  2. h1 welcome to the css stepper:
  3. ul
  4. li work only with CSS
  5. li can add an item by only copying the markup
  6. li small CSS foot-print
  7. ul.container
  8. li.container__item
  9. h2 with debug
  10. .stepper(data-debug)
  11. - let name = `stepper-3`
  12. each val, index in ['Description', 'Duration', 'Due Time', 'youpi' ]
  13. - const id = `${name}-${index}`
  14. - const isFirst = index === 0
  15. input.stepper__input(id=id name=name type="radio" checked=isFirst)
  16. .stepper__step
  17. label.stepper__button(for=id)= val
  18. li.container__item
  19. h2 more steps
  20. .stepper
  21. - name = `stepper-5`
  22. each val, index in ['Description', 'Duration', 'Due Time', 'youpi', 'clapou' ]
  23. - const id = `${name}-${index}`
  24. - const isFirst = index === 0
  25. input.stepper__input(id=id name=name type="radio" checked=isFirst)
  26. .stepper__step
  27. label.stepper__button(for=id)
  28. p.stepper__content=val
  29.  
  30. - const steps = [
  31. - { label: `chocolate`, content: `crunchy` },
  32. - { label: `vanilla`, content: `coming from heaven` },
  33. - { label: `strawberry`, content: `red and sweet` },
  34. - { label: `manga`, content: `we need more yellow` },
  35. - { label: `banana`, content: `banananananana Batman!` },
  36. - { label: `apple`, content: `The one that don't make you sleep` },
  37. - { label: `orange`, content: `only for the juice` },
  38. - ]
  39.  
  40. li.container__item
  41. h2 a bigger example
  42. .stepper
  43. - name = `stepper-big`
  44. each val, index in steps
  45. - const id = `${name}-${index}`
  46. - const isFirst = index === 0
  47. input.stepper__input(id=id name=name type="radio" checked=isFirst)
  48. .stepper__step
  49. label.stepper__button(for=id)= val.label
  50. p.stepper__content(for=id)= val.content
  51.  
  52. li.container__item
  53. h2 with flexbox
  54. .stepper.stepper--flexbox
  55. - name = `stepper-flex`
  56. each val, index in steps
  57. - const id = `${name}-${index}`
  58. - const isFirst = index === 0
  59. input.stepper__input(id=id name=name type="radio" checked=isFirst)
  60. .stepper__step
  61. label.stepper__button(for=id)= val.label
  62. p.stepper__content(for=id)= val.content
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement