You are here

function live_css_admin in Live CSS 6.2

Same name and namespace in other branches
  1. 7.2 live_css.module \live_css_admin()
  2. 7 live_css.module \live_css_admin()

Implements hook_settings()

1 string reference to 'live_css_admin'
live_css_menu in ./live_css.module
Implements hook_menu().

File

./live_css.module, line 35

Code

function live_css_admin() {
  $form = array();
  $form['live_css_less'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable LESS Support'),
    '#default_value' => variable_get('live_css_less', 1),
    '#description' => t('Allows the live editing and display of LESS files on the site, by simply embedding stylesheets with a "less" extension instead of "css". The Less is parsed on each page load, even for anonymous users. In production you may wish to disable this feature and use the LESS module instead.'),
  );
  $form['live_css_hideadmin'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide Admin Menu'),
    '#default_value' => variable_get('live_css_hideadmin', 1),
    '#description' => t('Automatically hides the administration menu when editing CSS.'),
  );
  $form['live_css_hidemodules'] = array(
    '#type' => 'checkbox',
    '#title' => t('Only show theme CSS'),
    '#default_value' => variable_get('live_css_hidemodules', 0),
    '#description' => t('Removes module and other styles from the CSS list.'),
  );
  $form['live_css_theme'] = array(
    '#type' => 'select',
    '#title' => t('Editor Theme'),
    '#default_value' => variable_get('live_css_theme', 'twilight'),
    '#options' => live_css_list_themes(),
  );
  $form['live_css_fontsize'] = array(
    '#type' => 'select',
    '#title' => t('Font Size'),
    '#default_value' => variable_get('live_css_fontsize', '12px'),
    '#options' => array(
      '8px' => '8px',
      '10px' => '10px',
      '11px' => '11px',
      '12px' => '12px',
      '14px' => '14px',
      '16px' => '16px',
      '18px' => '18px',
    ),
  );
  $form['live_css_tabsize'] = array(
    '#type' => 'select',
    '#title' => t('Tab Size'),
    '#default_value' => variable_get('live_css_tabsize', 2),
    '#options' => array(
      1 => '1',
      2 => '2',
      3 => '3',
      4 => '4',
    ),
  );
  $form['live_css_softtabs'] = array(
    '#type' => 'checkbox',
    '#title' => t('Soft Tabs'),
    '#default_value' => variable_get('live_css_softtabs', 1),
  );
  return system_settings_form($form);
}