16ccdf4f0SGreg Roach<?php 26ccdf4f0SGreg Roach 36ccdf4f0SGreg Roachuse Fisharebest\Webtrees\DebugBar; 46ccdf4f0SGreg Roachuse Fisharebest\Webtrees\FlashMessages; 5f5402f3dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SearchQuickAction; 66ccdf4f0SGreg Roachuse Fisharebest\Webtrees\I18N; 76ccdf4f0SGreg Roachuse Fisharebest\Webtrees\Module\ModuleFooterInterface; 86ccdf4f0SGreg Roachuse Fisharebest\Webtrees\Module\ModuleGlobalInterface; 96ccdf4f0SGreg Roachuse Fisharebest\Webtrees\Module\ModuleThemeInterface; 106ccdf4f0SGreg Roachuse Fisharebest\Webtrees\Services\ModuleService; 116ccdf4f0SGreg Roachuse Fisharebest\Webtrees\View; 126ccdf4f0SGreg Roachuse Fisharebest\Webtrees\Webtrees; 136ccdf4f0SGreg Roachuse Psr\Http\Message\ServerRequestInterface; 146ccdf4f0SGreg Roach 156ccdf4f0SGreg Roach/** 166ccdf4f0SGreg Roach * @var string $title 176ccdf4f0SGreg Roach * @var string $content 186ccdf4f0SGreg Roach */ 196ccdf4f0SGreg Roach 206ccdf4f0SGreg Roach?> 21dd6b2bfcSGreg Roach 22dd6b2bfcSGreg Roach<!DOCTYPE html> 2365cf5706SGreg Roach<html dir="<?= I18N::locale()->direction() ?>" lang="<?= I18N::locale()->languageTag() ?>"> 24dd6b2bfcSGreg Roach <head> 25dd6b2bfcSGreg Roach <meta charset="UTF-8"> 26dd6b2bfcSGreg Roach <meta name="csrf" content="<?= e(csrf_token()) ?>"> 27dd6b2bfcSGreg Roach <meta name="viewport" content="width=device-width, initial-scale=1"> 28377a2979SGreg Roach <meta name="robots" content="<?= e($meta_robots ?? 'noindex') ?>"> 298d0ebef0SGreg Roach <meta name="generator" content="<?= e(Webtrees::NAME) ?> <?= e(Webtrees::VERSION) ?>"> 302406e0e0SGreg Roach <meta name="description" content="<?= $meta_description ?? '' ?>"> 31dd6b2bfcSGreg Roach 32dd6b2bfcSGreg Roach <title> 33dd6b2bfcSGreg Roach <?= strip_tags($title) ?> 34dd6b2bfcSGreg Roach <?php if ($tree !== null && $tree->getPreference('META_TITLE') !== '') : ?> 35dd6b2bfcSGreg Roach – <?= e($tree->getPreference('META_TITLE')) ?> 36dd6b2bfcSGreg Roach <?php endif ?> 37dd6b2bfcSGreg Roach </title> 38dd6b2bfcSGreg Roach 3952bcc402SGreg Roach <!--Generic favicons--> 4052bcc402SGreg Roach <link rel="icon" sizes="32x32" href="<?= e(asset('favicon-32.png')) ?>"> 4152bcc402SGreg Roach <link rel="icon" sizes="128x128" href="<?= e(asset('favicon-128.png')) ?>"> 4252bcc402SGreg Roach <link rel="icon" sizes="192x192" href="<?= e(asset('favicon-192.png')) ?>"> 4352bcc402SGreg Roach <!--Android--> 4490b733bfSGreg Roach <link rel="shortcut icon" sizes="196x196" href="<?= e(asset('favicon-196.png')) ?>"> 45*0601cabdSGreg Roach <!--iPad--> 4652bcc402SGreg Roach <link rel="apple-touch-icon" sizes="152x152" href="<?= e(asset('favicon-152.png')) ?>"> 47*0601cabdSGreg Roach <!--iPhone--> 4852bcc402SGreg Roach <link rel="apple-touch-icon" sizes="180x180" href="<?= e(asset('favicon-180.png')) ?>"> 49*0601cabdSGreg Roach <!--IE11/Edge--> 5052bcc402SGreg Roach <meta name="msapplication-config" content="<?= e(asset('browserconfig.xml')) ?>"> 51dd6b2bfcSGreg Roach 52c4d12d2bSGreg Roach <link rel="manifest" href="<?= e(asset('site.webmanifest')) ?>"> 53c4d12d2bSGreg Roach 54e837ff07SGreg Roach <link rel="stylesheet" href="<?= e(asset('css/vendor.min.css')) ?>"> 55cab242e7SGreg Roach <?php foreach (app(ModuleThemeInterface::class)->stylesheets() as $stylesheet) : ?> 56e837ff07SGreg Roach <link rel="stylesheet" href="<?= e($stylesheet) ?>"> 57dd6b2bfcSGreg Roach <?php endforeach ?> 58dd6b2bfcSGreg Roach 59dd6b2bfcSGreg Roach <?= View::stack('styles') ?> 60dd6b2bfcSGreg Roach 61d70512abSGreg Roach <?= app(ModuleService::class)->findByInterface(ModuleGlobalInterface::class)->map(static function (ModuleGlobalInterface $module): string { 62d70512abSGreg Roach return $module->headContent(); 63d70512abSGreg Roach })->implode('') ?> 64dd6b2bfcSGreg Roach 65dd6b2bfcSGreg Roach <?= DebugBar::renderHead() ?> 66dd6b2bfcSGreg Roach </head> 67dd6b2bfcSGreg Roach 68de2aa325SGreg Roach <body class="wt-global wt-theme-<?= e(app(ModuleThemeInterface::class)->name()) ?> wt-route-<?= e(app(ServerRequestInterface::class)->getAttribute('route')->name) ?>"> 69dd6b2bfcSGreg Roach <header class="wt-header-wrapper d-print-none"> 70dd6b2bfcSGreg Roach <div class="container wt-header-container"> 71dd6b2bfcSGreg Roach <div class="row wt-header-content"> 7297c22350SGreg Roach <div class="wt-accessibility-links position-fixed"> 73dd6b2bfcSGreg Roach <a class="sr-only sr-only-focusable btn btn-info btn-sm" href="#content"> 746ccdf4f0SGreg Roach <?= /* I18N: Skip over the headers and menus, to the main content of the page */ 756ccdf4f0SGreg Roach I18N::translate('Skip to content') ?> 76dd6b2bfcSGreg Roach </a> 77dd6b2bfcSGreg Roach </div> 78dd6b2bfcSGreg Roach <div class="col wt-site-logo"></div> 79dd6b2bfcSGreg Roach 80dd6b2bfcSGreg Roach <?php if ($tree !== null) : ?> 81cc13d6d8SGreg Roach <h1 class="col wt-site-title"><?= e($tree->title()) ?></h1> 82dd6b2bfcSGreg Roach 83dd6b2bfcSGreg Roach <div class="col wt-header-search"> 84f5402f3dSGreg Roach <form method="post" action="<?= e(route(SearchQuickAction::class, ['tree' => $tree->name()])) ?>" class="wt-header-search-form" role="search"> 85d1fc782cSGreg Roach <?= csrf_field() ?> 86dd6b2bfcSGreg Roach <div class="input-group"> 87dd6b2bfcSGreg Roach <label class="sr-only" for="quick-search"><?= I18N::translate('Search') ?></label> 88dd6b2bfcSGreg Roach <input type="search" class="form-control wt-header-search-field" id="quick-search" name="query" size="15" placeholder="<?= I18N::translate('Search') ?>"> 89b6c326d8SGreg Roach <div class="input-group-append"> 90dd6b2bfcSGreg Roach <button type="submit" class="btn btn-primary wt-header-search-button"> 91dd6b2bfcSGreg Roach <?= view('icons/search') ?> 92dd6b2bfcSGreg Roach </button> 93b6c326d8SGreg Roach </div> 94dd6b2bfcSGreg Roach </div> 95dd6b2bfcSGreg Roach </form> 96dd6b2bfcSGreg Roach </div> 97dd6b2bfcSGreg Roach <?php endif ?> 98dd6b2bfcSGreg Roach 99dd6b2bfcSGreg Roach <div class="col wt-secondary-navigation"> 1000c8c69d4SGreg Roach <ul class="nav wt-user-menu"> 101cab242e7SGreg Roach <?php foreach (app(ModuleThemeInterface::class)->userMenu($tree) as $menu) : ?> 102f78837dcSGreg Roach <?= view('components/menu-item', ['menu' => $menu]) ?> 103dd6b2bfcSGreg Roach <?php endforeach ?> 104dd6b2bfcSGreg Roach </ul> 105dd6b2bfcSGreg Roach </div> 106dd6b2bfcSGreg Roach 107dd6b2bfcSGreg Roach <?php if ($tree !== null) : ?> 108dd6b2bfcSGreg Roach <nav class="col wt-primary-navigation"> 1090c8c69d4SGreg Roach <ul class="nav wt-genealogy-menu"> 110cab242e7SGreg Roach <?php foreach (app(ModuleThemeInterface::class)->genealogyMenu($tree) as $menu) : ?> 111f78837dcSGreg Roach <?= view('components/menu-item', ['menu' => $menu]) ?> 112dd6b2bfcSGreg Roach <?php endforeach ?> 113dd6b2bfcSGreg Roach </ul> 114dd6b2bfcSGreg Roach </nav> 115dd6b2bfcSGreg Roach <?php endif ?> 116dd6b2bfcSGreg Roach </div> 117dd6b2bfcSGreg Roach </div> 118dd6b2bfcSGreg Roach </header> 119dd6b2bfcSGreg Roach 120dd6b2bfcSGreg Roach <main id="content" class="wt-main-wrapper"> 121dd6b2bfcSGreg Roach <div class="container wt-main-container"> 122dd6b2bfcSGreg Roach <div class="flash-messages"> 123dd6b2bfcSGreg Roach <?php foreach (FlashMessages::getMessages() as $message) : ?> 124dd6b2bfcSGreg Roach <div class="alert alert-<?= e($message->status) ?> alert-dismissible" role="alert"> 125dd6b2bfcSGreg Roach <button type="button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> 126dd6b2bfcSGreg Roach <span aria-hidden="true">×</span> 127dd6b2bfcSGreg Roach </button> 128dd6b2bfcSGreg Roach <?= $message->text ?> 129dd6b2bfcSGreg Roach </div> 130dd6b2bfcSGreg Roach <?php endforeach ?> 131dd6b2bfcSGreg Roach </div> 132dd6b2bfcSGreg Roach 133dd6b2bfcSGreg Roach <?= $content ?> 134dd6b2bfcSGreg Roach </div> 135dd6b2bfcSGreg Roach </main> 136dd6b2bfcSGreg Roach 13797c22350SGreg Roach <footer class="wt-footers container d-print-none"> 138d70512abSGreg Roach <?= app(ModuleService::class)->findByInterface(ModuleFooterInterface::class)->map(static function (ModuleFooterInterface $module) use ($request): string { 139d70512abSGreg Roach return $module->getFooter($request); 140d70512abSGreg Roach })->implode('') ?> 141dd6b2bfcSGreg Roach </footer> 142dd6b2bfcSGreg Roach 143ad727080SGreg Roach <script src="<?= e(asset('js/vendor.min.js')) ?>"></script> 144ad727080SGreg Roach <script src="<?= e(asset('js/webtrees.min.js')) ?>"></script> 145dd6b2bfcSGreg Roach 146dd6b2bfcSGreg Roach <script> 147cee51dfdSGreg Roach // Trigger an event when we click on an (any) image 148cee51dfdSGreg Roach $('body').on('click', 'a.gallery', function () { 149cee51dfdSGreg Roach // Enable colorbox for images 150cee51dfdSGreg Roach $("a[type^=image].gallery").colorbox({ 151cee51dfdSGreg Roach // Don't scroll window with document 152cee51dfdSGreg Roach fixed: true, 153dd6b2bfcSGreg Roach width: "85%", 154dd6b2bfcSGreg Roach height: "85%", 155cee51dfdSGreg Roach current: "", 156cee51dfdSGreg Roach previous: '<i class="fas fa-arrow-left wt-icon-flip-rtl" title="<?= I18N::translate('previous') ?>"></i>', 157cee51dfdSGreg Roach next: '<i class="fas fa-arrow-right wt-icon-flip-rtl" title="<?= I18N::translate('next') ?>"></i>', 158cee51dfdSGreg Roach slideshowStart: '<i class="fas fa-play" title="<?= I18N::translate('Play') ?>"></i>', 159cee51dfdSGreg Roach slideshowStop: '<i class="fas fa-stop" title="<?= I18N::translate('Stop') ?>"></i>', 160cee51dfdSGreg Roach close: '<i class="fas fa-times" title="<?= I18N::translate('close') ?>"></i>', 1616ccdf4f0SGreg Roach title: function () { 1626ccdf4f0SGreg Roach return this.dataset.title; 1636ccdf4f0SGreg Roach }, 164cee51dfdSGreg Roach photo: true, 165cee51dfdSGreg Roach rel: "gallery", // Turn all images on the page into a slideshow 166cee51dfdSGreg Roach slideshow: true, 167cee51dfdSGreg Roach slideshowAuto: false, 168cee51dfdSGreg Roach // Add wheelzoom to the displayed image 169cee51dfdSGreg Roach onComplete: function () { 170cee51dfdSGreg Roach // Disable click on image triggering next image 171cee51dfdSGreg Roach // https://github.com/jackmoore/colorbox/issues/668 172cee51dfdSGreg Roach $(".cboxPhoto").unbind("click"); 173cee51dfdSGreg Roach 174cee51dfdSGreg Roach wheelzoom(document.querySelectorAll(".cboxPhoto")); 175cee51dfdSGreg Roach } 176cee51dfdSGreg Roach }); 177dd6b2bfcSGreg Roach }); 178dd6b2bfcSGreg Roach </script> 179dd6b2bfcSGreg Roach 180dd6b2bfcSGreg Roach <?= View::stack('javascript') ?> 181dd6b2bfcSGreg Roach 182d70512abSGreg Roach <?= app(ModuleService::class)->findByInterface(ModuleGlobalInterface::class)->map(static function (ModuleGlobalInterface $module): string { 183d70512abSGreg Roach return $module->bodyContent(); 184d70512abSGreg Roach })->implode('') ?> 185abafa13cSGreg Roach 186dd6b2bfcSGreg Roach <?= DebugBar::render() ?> 187dd6b2bfcSGreg Roach </body> 188dd6b2bfcSGreg Roach</html> 189