diff options
Diffstat (limited to 'resources/views/layouts/default.php')
| -rw-r--r-- | resources/views/layouts/default.php | 224 |
1 files changed, 114 insertions, 110 deletions
diff --git a/resources/views/layouts/default.php b/resources/views/layouts/default.php index 2a21c5f816..ce125d36e9 100644 --- a/resources/views/layouts/default.php +++ b/resources/views/layouts/default.php @@ -7,133 +7,137 @@ <!DOCTYPE html> <html <?= I18N::htmlAttributes() ?>> - <head> - <meta charset="UTF-8"> - <meta name="csrf" content="<?= e(csrf_token()) ?>"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="robots" content="<?= e($meta_robots ?? 'noindex,nofollow') ?>"> - <meta name="generator" content="<?= e(WT_WEBTREES) ?>"> - <?php if ($tree !== null): ?> - <meta name="description" content="<?= e($tree->getPreference('META_DESCRIPTION')) ?>"> - <?php endif ?> + <head> + <meta charset="UTF-8"> + <meta name="csrf" content="<?= e(csrf_token()) ?>"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="robots" content="<?= e($meta_robots ?? 'noindex,nofollow') ?>"> + <meta name="generator" content="<?= e(WT_WEBTREES) ?>"> + <?php if ($tree !== null) : ?> + <meta name="description" content="<?= e($tree->getPreference('META_DESCRIPTION')) ?>"> + <?php endif ?> - <title> - <?= strip_tags($title) ?> - <?php if ($tree !== null && $tree->getPreference('META_TITLE') !== ''): ?> - – <?= e($tree->getPreference('META_TITLE')) ?> - <?php endif ?> - </title> + <title> + <?= strip_tags($title) ?> + <?php if ($tree !== null && $tree->getPreference('META_TITLE') !== '') : ?> + – <?= e($tree->getPreference('META_TITLE')) ?> + <?php endif ?> + </title> - <link rel="icon" href="<?= Theme::theme()::ASSET_DIR ?>favicon.png" type="image/png"> - <link rel="icon" type="image/png" href="<?= Theme::theme()::ASSET_DIR ?>favicon192.png" sizes="192x192"> - <link rel="apple-touch-icon" sizes="180x180" href="<?= Theme::theme()::ASSET_DIR ?>favicon180.png"> + <link rel="icon" href="<?= Theme::theme()::ASSET_DIR ?>favicon.png" type="image/png"> + <link rel="icon" type="image/png" href="<?= Theme::theme()::ASSET_DIR ?>favicon192.png" sizes="192x192"> + <link rel="apple-touch-icon" sizes="180x180" href="<?= Theme::theme()::ASSET_DIR ?>favicon180.png"> - <?php if (I18N::direction() === 'rtl'): ?> - <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor-rtl.css') ?>"> - <?php else: ?> - <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor.css') ?>"> - <?php endif ?> + <?php if (I18N::direction() === 'rtl') : ?> + <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor-rtl.css') ?>"> + <?php else : ?> + <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor.css') ?>"> + <?php endif ?> - <?php foreach (Theme::theme()->stylesheets() as $stylesheet): ?> - <link rel="stylesheet" type="text/css" href="<?= $stylesheet ?>"> - <?php endforeach ?> + <?php foreach (Theme::theme()->stylesheets() as $stylesheet) : ?> + <link rel="stylesheet" type="text/css" href="<?= $stylesheet ?>"> + <?php endforeach ?> - <?= View::stack('styles') ?> + <?= View::stack('styles') ?> - <?= Theme::theme()->analytics() ?> + <?= Theme::theme()->analytics() ?> - <?= DebugBar::renderHead() ?> - </head> + <?= DebugBar::renderHead() ?> + </head> - <body class="wt-global"> - <header class="wt-header-wrapper d-print-none"> - <div class="container wt-header-container"> - <div class="row wt-header-content"> - <div class="wt-accessibility-links"> - <a class="sr-only sr-only-focusable btn btn-info btn-sm" href="#content"> - <?= /* I18N: Skip over the headers and menus, to the main content of the page */ I18N::translate('Skip to content') ?> - </a> - </div> - <div class="col wt-site-logo"></div> + <body class="wt-global"> + <header class="wt-header-wrapper d-print-none"> + <div class="container wt-header-container"> + <div class="row wt-header-content"> + <div class="wt-accessibility-links"> + <a class="sr-only sr-only-focusable btn btn-info btn-sm" href="#content"> + <?= /* I18N: Skip over the headers and menus, to the main content of the page */ I18N::translate('Skip to content') ?> + </a> + </div> + <div class="col wt-site-logo"></div> - <?php if ($tree !== null): ?> - <h1 class="col wt-site-title"><?= e($tree->getTitle()) ?></h1> + <?php if ($tree !== null) : ?> + <h1 class="col wt-site-title"><?= e($tree->getTitle()) ?></h1> - <div class="col wt-header-search"> - <form class="wt-header-search-form" role="search"> - <input type="hidden" name="route" value="search-quick"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="input-group"> - <label class="sr-only" for="quick-search"><?= I18N::translate('Search') ?></label> - <input type="search" class="form-control wt-header-search-field" id="quick-search" name="query" size="15" placeholder="<?= I18N::translate('Search') ?>"> - <span class="input-group-btn"> - <button type="submit" class="btn btn-primary wt-header-search-button"> + <div class="col wt-header-search"> + <form class="wt-header-search-form" role="search"> + <input type="hidden" name="route" value="search-quick"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <div class="input-group"> + <label class="sr-only" for="quick-search"><?= I18N::translate('Search') ?></label> + <input type="search" class="form-control wt-header-search-field" id="quick-search" name="query" size="15" placeholder="<?= I18N::translate('Search') ?>"> + <span class="input-group-btn"> + <button type="submit" class="btn btn-primary wt-header-search-button"> <?= view('icons/search') ?> - </button> - </span> - </div> - </form> - </div> - <?php endif ?> + </button> + </span> + </div> + </form> + </div> + <?php endif ?> - <div class="col wt-secondary-navigation"> - <ul class="nav wt-secondary-menu"> - <?php foreach (Theme::theme()->secondaryMenu() as $menu): ?> - <?= $menu->bootstrap4() ?> - <?php endforeach ?> - </ul> - </div> + <div class="col wt-secondary-navigation"> + <ul class="nav wt-secondary-menu"> + <?php foreach (Theme::theme()->secondaryMenu() as $menu) : ?> + <?= $menu->bootstrap4() ?> + <?php endforeach ?> + </ul> + </div> - <?php if ($tree !== null): ?> - <nav class="col wt-primary-navigation"> - <ul class="nav wt-primary-menu"> - <?php foreach (Theme::theme()->primaryMenu($individual ?? $tree->significantIndividual(Auth::user())) as $menu): ?> - <?= $menu->bootstrap4() ?> - <?php endforeach ?> - </ul> - </nav> - <?php endif ?> - </div> - </div> - </header> + <?php if ($tree !== null) : ?> + <nav class="col wt-primary-navigation"> + <ul class="nav wt-primary-menu"> + <?php foreach (Theme::theme()->primaryMenu($individual ?? $tree->significantIndividual(Auth::user())) as $menu) : ?> + <?= $menu->bootstrap4() ?> + <?php endforeach ?> + </ul> + </nav> + <?php endif ?> + </div> + </div> + </header> - <main id="content" class="wt-main-wrapper"> - <div class="container wt-main-container"> - <div class="flash-messages"> - <?php foreach (FlashMessages::getMessages() as $message): ?> - <div class="alert alert-<?= e($message->status) ?> alert-dismissible" role="alert"> - <button type="button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> - <span aria-hidden="true">×</span> - </button> - <?= $message->text ?> - </div> - <?php endforeach ?> - </div> + <main id="content" class="wt-main-wrapper"> + <div class="container wt-main-container"> + <div class="flash-messages"> + <?php foreach (FlashMessages::getMessages() as $message) : ?> + <div class="alert alert-<?= e($message->status) ?> alert-dismissible" role="alert"> + <button type="button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> + <span aria-hidden="true">×</span> + </button> + <?= $message->text ?> + </div> + <?php endforeach ?> + </div> - <?= $content ?> - </div> - </main> + <?= $content ?> + </div> + </main> - <footer class="wt-footer-container"> - <div class="wt-footer-content container d-print-none"> - <?= Theme::theme()->formatContactLinks() ?> - <?= Theme::theme()->logoPoweredBy() ?> + <footer class="wt-footer-container"> + <div class="wt-footer-content container d-print-none"> + <?= Theme::theme()->formatContactLinks() ?> + <?= Theme::theme()->logoPoweredBy() ?> - <?php if ($page_hits ?? 0 > 0): ?> - <div class="wt-page-views"> - <?= I18N::plural('This page has been viewed %s time.', 'This page has been viewed %s times.', $page_hits, - '<span class="odometer">' . I18N::digits($page_hits) . '</span>') ?> - </div> - <?php endif ?> + <?php if ($page_hits ?? 0 > 0) : ?> + <div class="wt-page-views"> + <?= I18N::plural( + 'This page has been viewed %s time.', + 'This page has been viewed %s times.', + $page_hits, + '<span class="odometer">' . I18N::digits($page_hits) . '</span>' + ) ?> + </div> + <?php endif ?> - <?= Theme::theme()->cookieWarning()?> - </div> - </footer> + <?= Theme::theme()->cookieWarning()?> + </div> + </footer> - <script src="<?= e(WT_ASSETS_URL . 'js/vendor.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/vendor.js') ?>"></script> - <script src="<?= e(WT_ASSETS_URL . 'js/webtrees.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/webtrees.js') ?>"></script> + <script src="<?= e(WT_ASSETS_URL . 'js/vendor.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/vendor.js') ?>"></script> + <script src="<?= e(WT_ASSETS_URL . 'js/webtrees.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/webtrees.js') ?>"></script> - <script> + <script> activate_colorbox(); jQuery.extend(jQuery.colorbox.settings, { width: "85%", @@ -145,8 +149,8 @@ }); </script> - <?= View::stack('javascript') ?> + <?= View::stack('javascript') ?> - <?= DebugBar::render() ?> - </body> + <?= DebugBar::render() ?> + </body> </html> |
