1<?php 2/** 3 * webtrees: online genealogy 4 * Copyright (C) 2019 webtrees development team 5 * This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */ 16declare(strict_types=1); 17 18namespace Fisharebest\Webtrees\Module; 19 20use Fisharebest\Webtrees\I18N; 21 22/** 23 * The Minimal theme. 24 */ 25class MinimalTheme extends AbstractModule implements ModuleThemeInterface 26{ 27 use ModuleThemeTrait; 28 29 /** 30 * Where are our CSS, JS and other assets? 31 */ 32 public const ASSET_DIR = 'themes/minimal/css-2.0.0/'; 33 34 protected const PERSON_BOX_CLASSES = [ 35 'M' => 'person_box', 36 'F' => 'person_boxF', 37 'U' => 'person_boxNN', 38 ]; 39 40 /** 41 * How should this module be labelled on tabs, menus, etc.? 42 * 43 * @return string 44 */ 45 public function title(): string 46 { 47 /* I18N: Name of a theme. */ 48 return I18N::translate('minimal'); 49 } 50 51 /** 52 * Misecellaneous dimensions, fonts, styles, etc. 53 * 54 * @param string $parameter_name 55 * 56 * @return string|int|float 57 */ 58 public function parameter($parameter_name) 59 { 60 $parameters = [ 61 'chart-background-f' => 'dddddd', 62 'chart-background-m' => 'cccccc', 63 'chart-background-u' => 'eeeeee', 64 'chart-box-x' => 260, 65 'chart-box-y' => 85, 66 'chart-font-color' => '000000', 67 'chart-spacing-x' => 5, 68 'chart-spacing-y' => 10, 69 'compact-chart-box-x' => 240, 70 'compact-chart-box-y' => 50, 71 'distribution-chart-x' => 440, 72 'distribution-chart-y' => 220, 73 'line-width' => 1.5, 74 'shadow-blur' => 0, 75 'shadow-color' => '', 76 'shadow-offset-x' => 0, 77 'shadow-offset-y' => 0, 78 'stats-small-chart-x' => 440, 79 'stats-small-chart-y' => 125, 80 'stats-large-chart-x' => 900, 81 'image-dline' => static::ASSET_DIR . 'images/dline.png', 82 'image-dline2' => static::ASSET_DIR . 'images/dline2.png', 83 'image-hline' => static::ASSET_DIR . 'images/hline.png', 84 'image-spacer' => static::ASSET_DIR . 'images/spacer.png', 85 'image-vline' => static::ASSET_DIR . 'images/vline.png', 86 'image-minus' => static::ASSET_DIR . 'images/minus.png', 87 'image-plus' => static::ASSET_DIR . 'images/plus.png', 88 ]; 89 90 return $parameters[$parameter_name]; 91 } 92 93 /** 94 * A list of CSS files to include for this page. 95 * 96 * @return string[] 97 */ 98 public function stylesheets(): array 99 { 100 return [ 101 'themes/_common/css-2.0.0/style.css', 102 'themes/minimal/css-2.0.0/style.css', 103 ]; 104 } 105} 106