1
0

buttons.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup UnaCoreSamples Samples
  7. * @{
  8. */
  9. /**
  10. * @page samples
  11. * @section button Buttons
  12. */
  13. /**
  14. * There are default css classes for buttons.
  15. *
  16. * .bx-btn - standard button
  17. * .bx-btn .bx-btn-small - small buttom
  18. *
  19. * To make button with font icon, add icon before text and wrap text in 'u' tag:
  20. * @code
  21. * <i class="sys-icon fire-extinguisher"></i><u>Button text</u>
  22. * @endcode
  23. *
  24. * To make button with image, add 'img' tag before text and wrap text in 'u' tag:
  25. * @code
  26. * <img src="clock.png" /><u>Button text</u>
  27. * @endcode
  28. */
  29. $aPathInfo = pathinfo(__FILE__);
  30. require_once ($aPathInfo['dirname'] . '/../inc/header.inc.php');
  31. require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
  32. $oTemplate = BxDolTemplate::getInstance();
  33. $oTemplate->setPageNameIndex (BX_PAGE_DEFAULT);
  34. $oTemplate->setPageHeader ("Buttons");
  35. $oTemplate->setPageContent ('page_main_code', PageCompMainCode());
  36. $oTemplate->getPageCode();
  37. /**
  38. * page code function
  39. */
  40. function PageCompMainCode()
  41. {
  42. ob_start();
  43. ?>
  44. <button class="bx-btn bx-def-margin-right">Button text</button>
  45. <button class="bx-btn bx-btn-img bx-def-margin-right"><img src="template/images/icons/clock.png" /></button>
  46. <button class="bx-btn bx-btn-img bx-def-margin-right"><img src="template/images/icons/clock.png"><u>Button text</u></button>
  47. <div class="bx-clear"></div><hr class="bx-def-hr bx-def-margin-topbottom" />
  48. <button class="bx-btn bx-btn-small bx-def-margin-right">Button text</button>
  49. <button class="bx-btn bx-btn-small bx-btn-img bx-def-margin-right"><img src="template/images/icons/clock.png" /></button>
  50. <button class="bx-btn bx-btn-small bx-btn-img bx-def-margin-right"><img src="template/images/icons/clock.png" /><u>Button text</u></button>
  51. <div class="bx-clear"></div><hr class="bx-def-hr bx-def-margin-topbottom" />
  52. <button class="bx-btn bx-def-margin-right"><i class="sys-icon fire-extinguisher"></i></button>
  53. <button class="bx-btn bx-def-margin-right"><i class="sys-icon fire-extinguisher sys-icon-bigger"></i></button>
  54. <button class="bx-btn bx-def-margin-right"><i class="sys-icon fire-extinguisher sys-icon-bigger col-red1"></i></button>
  55. <button class="bx-btn bx-def-margin-right"><i class="sys-icon fire-extinguisher"></i><u>Button text</u></button>
  56. <div class="bx-clear"></div><hr class="bx-def-hr bx-def-margin-topbottom" />
  57. <button class="bx-btn bx-btn-small bx-def-margin-right"><i class="sys-icon fire-extinguisher"></i></button>
  58. <button class="bx-btn bx-btn-small bx-def-margin-right"><i class="sys-icon fire-extinguisher"></i><u>Button text</u></button>
  59. <?php
  60. return DesignBoxContent("Buttons", ob_get_clean(), BX_DB_PADDING_DEF);
  61. }
  62. /** @} */