48 lines
1.1 KiB
PHP
48 lines
1.1 KiB
PHP
<?php
|
|
|
|
class defaultTheme extends Plugin
|
|
{
|
|
|
|
public function init()
|
|
{
|
|
$this->dbFields = array(
|
|
'showPostInformation' => false,
|
|
'dateFormat' => 'relative',
|
|
'accentColor' => 'default'
|
|
);
|
|
}
|
|
|
|
public function form()
|
|
{
|
|
$html = '';
|
|
|
|
$html .= PluginSettings::bool($this, 'showPostInformation', 'Show Post Information');
|
|
$html .= PluginSettings::values($this,'dateFormat', 'Date format', ['noshow'=>'No show', 'relative'=>'Relative', 'absolute'=>'Absolute'], 'Change the date format for the main page.');
|
|
$html .= PluginSettings::values($this,'accentColor', 'Accent Color', [
|
|
'default'=>'Blue',
|
|
'red'=>'Red',
|
|
'pink'=>'Pink',
|
|
'grape'=>'Grape',
|
|
'violet'=>'Violet',
|
|
'indigo'=>'Indigo',
|
|
'cyan'=>'Cyan',
|
|
'teal'=>'Teal',
|
|
'green'=>'Green',
|
|
'lime'=>'Lime',
|
|
'yellow'=>'Yellow',
|
|
'orange'=>'Orange'
|
|
], 'Change the accent color on the whole theme.');
|
|
|
|
return $html;
|
|
}
|
|
|
|
public function showPostInformation()
|
|
{
|
|
return $this->getValue('showPostInformation');
|
|
}
|
|
|
|
public function dateFormat()
|
|
{
|
|
return $this->getValue('dateFormat');
|
|
}
|
|
}
|