less_demo.demo_page.inc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Callback that provides styleable content for demonstration purposes.
  4. */
  5. function _less_demo_page() {
  6. global $theme_key;
  7. $file_less_settings = array(
  8. 'variables' => array(
  9. '@gradient_end' => '#bada55',
  10. ),
  11. );
  12. $output = array(
  13. '#attached' => array(
  14. 'css' => array(
  15. drupal_get_path('module', 'less_demo') . '/styles/less_demo.drupal_add_css.css.less' => array(
  16. 'less' => $file_less_settings,
  17. )
  18. ),
  19. ),
  20. );
  21. $output['page'] = array(
  22. '#type' => 'container',
  23. '#attributes' => array(
  24. 'id' => 'less_demo_gradient',
  25. ),
  26. );
  27. $output['page']['less_demo_logo'] = array(
  28. '#type' => 'html_tag',
  29. '#tag' => 'div',
  30. '#attributes' => array(
  31. 'class' => array(
  32. 'less_demo_logo',
  33. ),
  34. ),
  35. '#value' => '', // '#value' is required for closing tag.
  36. );
  37. $output['page']['less_demo_theme_link'] = array(
  38. '#type' => 'html_tag',
  39. '#tag' => 'p',
  40. '#value' => l('Configure current theme', 'admin/appearance/settings/' . $theme_key),
  41. );
  42. return $output;
  43. }