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