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 webtrees (default) theme. 24 */ 25class WebtreesTheme 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/webtrees/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 return I18N::translate('webtrees'); 48 } 49 50 /** 51 * Misecellaneous dimensions, fonts, styles, etc. 52 * 53 * @param string $parameter_name 54 * 55 * @return string|int|float 56 */ 57 public function parameter($parameter_name) 58 { 59 $parameters = [ 60 'chart-background-f' => 'e9daf1', 61 'chart-background-m' => 'b1cff0', 62 'chart-background-u' => 'eeeeee', 63 'chart-box-x' => 260, 64 'chart-box-y' => 85, 65 'chart-font-color' => '000000', 66 'chart-spacing-x' => 5, 67 'chart-spacing-y' => 10, 68 'compact-chart-box-x' => 240, 69 'compact-chart-box-y' => 50, 70 'distribution-chart-high-values' => '84beff', 71 'distribution-chart-low-values' => 'c3dfff', 72 'distribution-chart-no-values' => 'ffffff', 73 'distribution-chart-x' => 440, 74 'distribution-chart-y' => 220, 75 'line-width' => 1.5, 76 'shadow-blur' => 0, 77 'shadow-color' => '', 78 'shadow-offset-x' => 0, 79 'shadow-offset-y' => 0, 80 'stats-small-chart-x' => 440, 81 'stats-small-chart-y' => 125, 82 'stats-large-chart-x' => 900, 83 'image-dline' => static::ASSET_DIR . 'images/dline.png', 84 'image-dline2' => static::ASSET_DIR . 'images/dline2.png', 85 'image-hline' => static::ASSET_DIR . 'images/hline.png', 86 'image-spacer' => static::ASSET_DIR . 'images/spacer.png', 87 'image-vline' => static::ASSET_DIR . 'images/vline.png', 88 'image-minus' => static::ASSET_DIR . 'images/minus.png', 89 'image-plus' => static::ASSET_DIR . 'images/plus.png', 90 ]; 91 92 return $parameters[$parameter_name]; 93 } 94 95 /** 96 * A list of CSS files to include for this page. 97 * 98 * @return string[] 99 */ 100 public function stylesheets(): array 101 { 102 return [ 103 'themes/_common/css-2.0.0/style.css', 104 'themes/webtrees/css-2.0.0/style.css', 105 ]; 106 } 107} 108