Hugo Dark Theme Site Generator https://after-dark.habd.as
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hackcss-buttongroup.html 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <!-- {{/*
  2. HTML attributes: "class"
  3. Custom attributes: "formactions"
  4. Outside form with a single button:
  5. {{< hackcss-buttongroup >}}
  6. {{< hackcss-button text="Print" action="javascript:window.print()" />}}
  7. {{< /hackcss-buttongroup >}}
  8. With three buttons, one ghosted and one of type info
  9. {{< hackcss-buttongroup >}}
  10. {{< hackcss-button text="Left" />}}
  11. {{< hackcss-button text="Middle" type="info" />}}
  12. {{< hackcss-button text="Right" isghost="true" />}}
  13. {{< /hackcss-buttongroup >}}
  14. With self-targeted button and custom class names:
  15. {{< hackcss-buttongroup class="targetself" >}}
  16. {{< hackcss-button text="Left" target="_self" />}}
  17. {{< hackcss-button text="Right" isghost="true" />}}
  18. {{< /hackcss-buttongroup >}}
  19. Inside a form with a default action, target and hidden inputs:
  20. {{< hackcss-form action="/do/something" target="_blank" >}}
  21. {{< hackcss-textinput type="hiddden" name="AssociateTag" value="jhabdas-20" >}}
  22. {{< hackcss-textinput type="hidden" name="ASIN.1" value="B0736PV196" >}}
  23. {{< hackcss-textinput type="hidden" name="Quantity.1" value="2" >}}
  24. {{< hackcss-buttongroup formactions="true" >}}
  25. {{< hackcss-button text="Print" action="javascript:window.print()" />}}
  26. {{< hackcss-button text="Purchase" isghost="true" />}}
  27. {{< /hackcss-buttongroup >}}
  28. {{< /hackcss-form >}}
  29. */}} -->
  30. {{ $formactions := .Get "formactions" }}
  31. {{ $class := .Get "class" }}
  32. {{ $body := .Inner }}
  33. {{ partial "components/buttongroup.html" (dict "formactions" $formactions "class" $class "body" $body) }}