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 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
13 $translatedPages = [];
14 foreach ($availableLocales as $l) {
15 $translatedPages[$l] = $urlFn($l);
16 }
17@endphp
18
19@extends('master', compact('canonicalUrl', 'translatedPages'))