the browser-facing portion of osu!
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use wiki.layout for sitemap

nanaya 35a9f972 63108f7d

+18 -9
+10 -6
resources/views/wiki/layout.blade.php
··· 3 3 See the LICENCE file in the repository root for full licence text. 4 4 --}} 5 5 @php 6 + if (isset($page)) { 7 + $availableLocales = $page->availableLocales(); 8 + $canonicalUrl = $page->isVisible() ? wiki_url($page->path, $page->locale) : null; 9 + $path = $page->path; 10 + $urlFn = fn (string $locale): string => wiki_url($path, $locale); 11 + } 12 + 6 13 $translatedPages = []; 7 - foreach ($page->availableLocales() as $l) { 8 - $translatedPages[$l] = wiki_url($page->path, $l); 14 + foreach ($availableLocales as $l) { 15 + $translatedPages[$l] = $urlFn($l); 9 16 } 10 17 @endphp 11 18 12 - @extends('master', [ 13 - 'canonicalUrl' => $page->isVisible() ? wiki_url($page->path, $page->locale) : null, 14 - 'translatedPages' => $translatedPages, 15 - ]) 19 + @extends('master', compact('canonicalUrl', 'translatedPages'))
+8 -3
resources/views/wiki/sitemap.blade.php
··· 3 3 See the LICENCE file in the repository root for full licence text. 4 4 --}} 5 5 @php 6 - $sitemapUrl = route('wiki.sitemap', ['locale' => $locale]); 6 + $urlFn = fn (string $locale): string => route('wiki.sitemap', compact('locale')); 7 + $sitemapUrl = $urlFn($locale); 8 + $availableLocales = new Ds\Set(config('app.available_locales')); 7 9 @endphp 8 10 9 - @extends('master', [ 11 + @extends('wiki.layout', [ 12 + 'availableLocales' => $availableLocales, 13 + 'canonicalUrl' => $sitemapUrl, 10 14 'titlePrepend' => osu_trans('layout.header.help.sitemap'), 15 + 'urlFn' => $urlFn, 11 16 ]) 12 17 13 18 @section('content') ··· 45 50 46 51 <div class="header-buttons__item"> 47 52 @include('wiki._locale_menu', [ 48 - 'availableLocales' => new Ds\Set(config('app.available_locales')), 53 + 'availableLocales' => $availableLocales, 49 54 'contentLocale' => $locale, 50 55 'displayLocale' => $locale, 51 56 'path' => 'Sitemap',