1<?php 2 3use Fisharebest\Webtrees\DebugBar; 4use Fisharebest\Webtrees\FlashMessages; 5use Fisharebest\Webtrees\Http\RequestHandlers\Logout; 6use Fisharebest\Webtrees\I18N; 7use Fisharebest\Webtrees\Module\CustomCssJsModule; 8use Fisharebest\Webtrees\Module\ModuleCustomInterface; 9use Fisharebest\Webtrees\Module\ModuleGlobalInterface; 10use Fisharebest\Webtrees\Services\ModuleService; 11use Fisharebest\Webtrees\View; 12use Psr\Http\Message\ServerRequestInterface; 13 14/** @var string $title */ 15/** @var string $content */ 16 17?> 18 19<!DOCTYPE html> 20<html dir="<?= I18N::direction() ?>" lang="<?= WT_LOCALE ?>"> 21 <head> 22 <meta charset="UTF-8"> 23 <meta name="viewport" content="width=device-width, initial-scale=1"> 24 <meta name="csrf" content="<?= e(csrf_token()) ?>"> 25 26 <title><?= $title ?></title> 27 28 <link rel="icon" href="<?= e(asset('favicon.ico')) ?>" type="image/x-icon"> 29 30 <link rel="stylesheet" href="<?= e(asset('css/vendor.min.css')) ?>"> 31 <link rel="stylesheet" href="<?= e(asset('css/administration.min.css')) ?>"> 32 33 <?= View::stack('styles') ?> 34 35 <?= app(ModuleService::class)->findByInterface(ModuleGlobalInterface::class)->map(static function (ModuleGlobalInterface $module): string { return $module instanceof ModuleCustomInterface || $module instanceof CustomCssJsModule ? '' : $module->headContent(); })->implode('') ?> 36 37 <?= DebugBar::renderHead() ?> 38 </head> 39 <body class="container wt-global wt-route-<?= e(app(ServerRequestInterface::class)->getAttribute('route')) ?>"> 40 <header> 41 <div class="wt-accessibility-links position-fixed"> 42 <a class="sr-only sr-only-focusable btn btn-info btn-sm" href="#content"> 43 <?= /* I18N: Skip over the headers and menus, to the main content of the page */ 44 I18N::translate('Skip to content') ?> 45 </a> 46 </div> 47 48 <ul class="nav small d-flex justify-content-end"> 49 <li class="nav-item menu-mypage"> 50 <a class="nav-link active" href="<?= e(route('user-page')) ?>"><?= I18N::translate('My page') ?></a> 51 </li> 52 <li class="nav-item dropdown menu-language"> 53 <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"> 54 <?= I18N::translate('Language') ?> 55 </a> 56 <div class="dropdown-menu"> 57 <?php foreach (I18N::activeLocales() as $locale) : ?> 58 <a class="dropdown-item menu-language-<?= $locale->languageTag() ?> <?= WT_LOCALE === $locale->languageTag() ? ' active' : '' ?>" data-language="<?= $locale->languageTag() ?>" href="#"><?= $locale->endonym() ?></a> 59 <?php endforeach ?> 60 </div> 61 </li> 62 <li class="nav-item menu-logout"> 63 <a class="nav-link" href="<?= e(route(Logout::class)) ?>"><?= I18N::translate('Sign out') ?></a> 64 </li> 65 </ul> 66 </header> 67 68 <div id="content"></div> 69 70 <?php foreach (FlashMessages::getMessages() as $message) : ?> 71 <div class="alert alert-<?= $message->status ?> alert-dismissible" role="alert"> 72 <button type="button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> 73 <span aria-hidden="true">×</span> 74 </button> 75 <?= $message->text ?> 76 </div> 77 <?php endforeach ?> 78 79 <?= $content ?> 80 81 <script src="<?= e(asset('js/vendor.min.js')) ?>"></script> 82 <script src="<?= e(asset('js/webtrees.min.js')) ?>"></script> 83 84 <?= View::stack('javascript') ?> 85 86 <?= app(ModuleService::class)->findByInterface(ModuleGlobalInterface::class)->map(static function (ModuleGlobalInterface $module): string { return $module instanceof ModuleCustomInterface || $module instanceof CustomCssJsModule ? '' : $module->bodyContent(); })->implode('') ?> 87 88 <?= DebugBar::render() ?> 89 </body> 90</html> 91