the browser-facing portion of osu!
at master 141 lines 5.0 kB view raw
1{{-- 2 Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 3 See the LICENCE file in the repository root for full licence text. 4--}} 5@php 6 $currentRoute = app('route-section')->getCurrent(); 7 8 $currentSection = $currentRoute['section']; 9 $currentAction = $currentRoute['action']; 10 11 $currentUser = Auth::user(); 12 13 $legacyScoreMode = App\Libraries\Search\ScoreSearchParams::showLegacyForUser($currentUser) === true; 14 15 $titleTree = []; 16 17 if (isset($titleOverride)) { 18 $titleTree[] = $titleOverride; 19 } else { 20 if (isset($titlePrepend)) { 21 $titleTree[] = $titlePrepend; 22 } 23 24 $titleTree[] = page_title(); 25 } 26 27 $title = ''; 28 foreach ($titleTree as $i => $titlePart) { 29 $title .= e($titlePart); 30 31 if ($i + 1 === count($titleTree)) { 32 // Titles ending with phrase containing "osu!" like "osu!store" don't need the suffix. 33 if (strpos($titlePart, 'osu!') === false) { 34 $title .= ' | osu!'; 35 } 36 } else { 37 $title .= ' · '; 38 } 39 } 40 41 $defaultHue = section_to_hue_map($currentSection); 42 $currentHue ??= $defaultHue; 43 44 $navLinks ??= nav_links(); 45 $currentLocaleMeta ??= current_locale_meta(); 46@endphp 47<!DOCTYPE html> 48<html prefix="og: http://ogp.me/ns#" lang="{{ $contentLocale ?? $currentLocaleMeta->html() }}"> 49 <head> 50 @include("layout.metadata") 51 <title>{!! $title !!}</title> 52 <base href="{{ Request::getSchemeAndHttpHost().Request::getRequestUri() }}" /> 53 </head> 54 55 <body 56 class=" 57 t-section 58 {{ class_with_modifiers('osu-layout', 'body', ['body-lazer' => !$legacyScoreMode]) }} 59 {{ $bodyAdditionalClasses ?? '' }} 60 " 61 style="--base-hue-default: {{ $defaultHue }}; --base-hue-override: {{ $currentHue }}" 62 > 63 <div id="overlay" class="blackout blackout--overlay" style="display: none;"></div> 64 <div class="blackout js-blackout" data-visibility="hidden"></div> 65 66 @if ($currentUser !== null && $currentUser->isRestricted()) 67 @include('objects._notification_banner', [ 68 'type' => 'alert', 69 'title' => osu_trans('users.restricted_banner.title'), 70 'message' => osu_trans('users.restricted_banner.message', [ 71 'link' => link_to( 72 osu_url('user.restriction'), 73 osu_trans('users.restricted_banner.message_link') 74 ), 75 ]), 76 ]) 77 @endif 78 79 @if (!isset($blank)) 80 @include("layout.header") 81 82 <div 83 class="osu-page osu-page--notification-banners js-notification-banners js-sync-height--reference" 84 data-sync-height-target="notification-banners" 85 > 86 @stack('notification_banners') 87 </div> 88 @endif 89 <div class="osu-layout__section osu-layout__section--full"> 90 @yield('content') 91 </div> 92 @if (!isset($blank)) 93 @include("layout.gallery_window") 94 @include("layout.footer") 95 @endif 96 97 <div 98 class="fixed-bar 99 js-fixed-element 100 js-fixed-bottom-bar 101 js-sticky-footer--fixed-bar" 102 > 103 <div 104 class="js-permanent-fixed-footer 105 js-sync-height--reference" 106 data-sync-height-target="permanent-fixed-footer" 107 > 108 @yield('permanent-fixed-footer') 109 110 @if ($GLOBALS['cfg']['osu']['is_development_deploy']) 111 <div class="development-deploy-footer"> 112 This is a development instance of the <a href="https://osu.ppy.sh" class="development-deploy-footer__link">osu! website</a>. Please do not login with your osu! credentials. 113 </div> 114 @endif 115 </div> 116 </div> 117 118 <div id="main-player" class="audio-player-floating" data-turbo-permanent> 119 <div class="js-audio--main"></div> 120 <div class="js-sync-height--target" data-sync-height-id="permanent-fixed-footer"></div> 121 </div> 122 {{-- 123 Components: 124 - lib/utils/estimate-min-lines.ts (main) 125 - less/bem/estimate-min-lines.less (styling) 126 - views/master.blade.php (placeholder) 127 --}} 128 <div id="estimate-min-lines" class="estimate-min-lines" data-turbo-permanent> 129 <div class="estimate-min-lines__content js-estimate-min-lines"></div> 130 </div> 131 @include("layout._global_variables") 132 @include('layout._loading_overlay') 133 @include('layout.popup-container') 134 135 <script id="json-route-section" type="application/json"> 136 {!! json_encode($currentRoute) !!} 137 </script> 138 139 @yield("script") 140 </body> 141</html>