<?php
// ModernBlue Theme For Netjuke
// by Florian Maul <fmaul@users.sourceforge.net>

class SimpleTheme extends Theme {

  var $default_settings = array (

      'background' => array (
              'title'      => 'Background Color',
              'type'      => 'color',
              'default'   => '404040' ),

      'background2' => array (
              'title'      => 'Alternative Background Color',
              'type'      => 'color',
              'default'   => '484848' ),

      'header' => array (
              'title'      => 'Header Background Color',
              'type'      => 'color',
              'default'   => '808080' ),

      'font' => array (
              'title'   => 'Font Face',
              'type'    => 'text',
              'default' => 'Verdana, Geneva, Arial, Helvetica, sans-serif',
              'size'    => 40
               ),

      'fontsize' => array (
              'title'   => 'Font Size',
              'type'    => 'text',
              'default' => '11',
              'size'    => 4 ),

      'font2' => array (
              'title'   => 'Header Font Face',
              'type'    => 'text',
              'default' => 'Arial, Helvetica, sans-serif',
              'size'    => 40
               ),

      'fontsize2' => array (
              'title'   => 'Header Font Size',
              'type'    => 'text',
              'default' => '14',
              'size'    => 4 )

  );

  function SimpleTheme() {
    $this->setMetaData('name',        'Simple Theme');
    $this->setMetaData('author',      'Florian Maul');
    $this->setMetaData('version',     '1.0');
    $this->setMetaData('description', 'Test of the the custom settings');
    $this->setMetaData('icon_set',    'orbit');
    $this->setMetaData('icon_invert', 't');

    parent::Theme();
  }

  #-------------------------------------------------------------
  # getCSS()
  # returns CSS definitions depending on the values of the
  # settings array
  #-------------------------------------------------------------
  function getCSS() {
    ob_start();

  // --- CSS code follows here ------------------------ ?>

    body {
      background:#<?php echo $this->settings['background']?>;
      color:#c0c0c0;
    }

    body,td {
      font-family:<?php echo $this->settings['font']?>;
      font-size:<?php echo $this->settings['fontsize']?>px;
    }

    table.border {
      border:2px black solid;
      padding:2px;
    }

    td.line1 {
      background:#<?php echo $this->settings['background']?>;
    }
    td.line2 {
      background:#<?php echo $this->settings['background2']?>;
    }

    a {
       text-decoration: none;
       color: #f0e080;
    }
    a:hover {
       text-decoration: underline;
    }

    input, select, textarea  {
       font-family: <?php echo $this->settings['font']?>;
       font-size: <?php echo ($this->settings['fontsize'] - 1)?>px;
    }

    td.header {
       background: #<?php echo $this->settings['header']?>;
       color: #C0C0C0;
       font-family: <?php echo $this->settings['font2']?>;
       font-size: <?php echo $this->settings['fontsize2']?>px;
       font-weight: bold;
    }

    td.headeractive {
       background: #<?php echo $this->settings['background']?>;
       font-family: <?php echo $this->settings['font2']?>;
       font-size: <?php echo $this->settings['fontsize2']?>px;
    }

    .content {
       background: #<?php echo $this->settings['background']?>;
       font-family: <?php echo $this->settings['font']?>;
       font-size: <?php echo $this->settings['fontsize']?>px;
    }

    input.nomargin, img.icon {
       margin:0px;
       padding:0px;
    }

    div.subheader {
      background-color: #<?php echo $this->settings['header']?>;
      text-align: center;
      margin: 5px;
      padding: 1px;
    }

  <?php // ------------------------------------------------

    $css = ob_get_contents();
    ob_end_clean();
    return $css;
  }

}

// IMPORTANT!!, the theme that will be used must be 'returned'
return new SimpleTheme;

?>