the browser-facing portion of osu!
0
fork

Configure Feed

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

Wiki?

nanaya 45a89b0d a21208fe

+1272 -6
+2
.env.example
··· 77 77 PUSHER_SECRET= 78 78 79 79 #PASSPORT_KEY_PATH=/secure/osu.ppy.sh/oauth 80 + 81 + # GITHUB_TOKEN=
+10
app/Exceptions/GitHubNotFoundException.php
··· 1 + <?php 2 + 3 + namespace App\Exceptions; 4 + 5 + use Exception; 6 + 7 + class GitHubNotFoundException extends Exception 8 + { 9 + // whee 10 + }
+65
app/Http/Controllers/WikiController.php
··· 1 + <?php 2 + 3 + /** 4 + * Copyright 2015 ppy Pty. Ltd. 5 + * 6 + * This file is part of osu!web. osu!web is distributed with the hope of 7 + * attracting more community contributions to the core ecosystem of osu!. 8 + * 9 + * osu!web is free software: you can redistribute it and/or modify 10 + * it under the terms of the Affero GNU General Public License version 3 11 + * as published by the Free Software Foundation. 12 + * 13 + * osu!web is distributed WITHOUT ANY WARRANTY; without even the implied 14 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 + * See the GNU Affero General Public License for more details. 16 + * 17 + * You should have received a copy of the GNU Affero General Public License 18 + * along with osu!web. If not, see <http://www.gnu.org/licenses/>. 19 + */ 20 + 21 + namespace App\Http\Controllers; 22 + 23 + use App; 24 + use App\Exceptions\GitHubNotFoundException; 25 + use App\Models\WikiPage; 26 + use Request; 27 + use View; 28 + 29 + class WikiController extends Controller 30 + { 31 + protected $section = 'help'; 32 + protected $actionPrefix = 'wiki-'; 33 + 34 + public function show($path) 35 + { 36 + if (in_array(pathinfo($path, PATHINFO_EXTENSION), ['jpg', 'jpeg', 'png'], true)) { 37 + try { 38 + return response(WikiPage::fetchContent($path), 200)->header('Content-Type', 'image'); 39 + } catch (GitHubNotFoundException $e) { 40 + abort(404); 41 + } 42 + } 43 + 44 + $locale = Request::input('locale', App::getLocale()); 45 + $pageLocales = WikiPage::pageLocales($path); 46 + $titles = explode('/', str_replace('-', ' ', trim($path, '/')), 2); 47 + $title = array_pop($titles); 48 + $subtitle = array_pop($titles); 49 + 50 + try { 51 + $page = WikiPage::page($path, $locale); 52 + } catch (GitHubNotFoundException $e) { 53 + $page = null; 54 + } 55 + 56 + return view('wiki.show', compact( 57 + 'locale', 58 + 'page', 59 + 'pageLocales', 60 + 'path', 61 + 'subtitle', 62 + 'title' 63 + )); 64 + } 65 + }
+41
app/Libraries/LocaleMeta.php
··· 23 23 class LocaleMeta 24 24 { 25 25 const MAPPINGS = [ 26 + 'de' => [ 27 + 'name' => 'Deutsch', 28 + 'flag' => 'DE', 29 + ], 26 30 'en' => [ 27 31 'name' => 'English', 28 32 'flag' => 'GB', ··· 35 39 'name' => 'Français', 36 40 'flag' => 'FR', 37 41 ], 42 + 'hu' => [ 43 + 'name' => 'Magyar', 44 + 'flag' => 'HU', 45 + ], 46 + 'id' => [ 47 + 'name' => 'Bahasa Indonesia', 48 + 'flag' => 'ID', 49 + ], 38 50 'it' => [ 39 51 'name' => 'Italiano', 40 52 'flag' => 'IT', 41 53 ], 54 + 'ja' => [ 55 + 'name' => '日本語', 56 + 'flag' => 'JP', 57 + ], 58 + // FIXME: not a valid language code 59 + 'jp' => [ 60 + 'name' => '日本語', 61 + 'flag' => 'JP', 62 + ], 63 + 'ko' => [ 64 + 'name' => '한국어', 65 + 'flag' => 'KO', 66 + ], 42 67 'nl' => [ 43 68 'name' => 'Nederlands', 44 69 'flag' => 'NL', ··· 47 72 'name' => 'Polski', 48 73 'flag' => 'PL', 49 74 ], 75 + 'pt' => [ 76 + 'name' => 'Português', 77 + 'flag' => 'PT', 78 + ], 50 79 'pt-br' => [ 51 80 'name' => 'Português (Brasil)', 52 81 'flag' => 'BR', 82 + ], 83 + 'ru' => [ 84 + 'name' => 'Русский', 85 + 'flag' => 'RU', 86 + ], 87 + 'th' => [ 88 + 'name' => 'ไทย', 89 + 'flag' => 'TH', 90 + ], 91 + 'zh' => [ 92 + 'name' => '中文', 93 + 'flag' => 'CN', 53 94 ], 54 95 ]; 55 96
+73
app/Models/WikiPage.php
··· 1 + <?php 2 + 3 + /** 4 + * Copyright 2015 ppy Pty. Ltd. 5 + * 6 + * This file is part of osu!web. osu!web is distributed with the hope of 7 + * attracting more community contributions to the core ecosystem of osu!. 8 + * 9 + * osu!web is free software: you can redistribute it and/or modify 10 + * it under the terms of the Affero GNU General Public License version 3 11 + * as published by the Free Software Foundation. 12 + * 13 + * osu!web is distributed WITHOUT ANY WARRANTY; without even the implied 14 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 + * See the GNU Affero General Public License for more details. 16 + * 17 + * You should have received a copy of the GNU Affero General Public License 18 + * along with osu!web. If not, see <http://www.gnu.org/licenses/>. 19 + */ 20 + 21 + namespace App\Models; 22 + 23 + use App\Exceptions\GitHubNotFoundException; 24 + use Cache; 25 + use GitHub; 26 + use Github\Exception\RuntimeException as GithubException; 27 + 28 + class WikiPage 29 + { 30 + public static function fetch($path) 31 + { 32 + return Cache::remember("wiki:{$path}", 60, function () use ($path) { 33 + try { 34 + return GitHub::repo() 35 + ->contents() 36 + ->show('ppy', 'osu-wiki', 'wiki/'.$path); 37 + } catch (GithubException $e) { 38 + if ($e->getMessage() === 'Not Found') { 39 + throw new GitHubNotFoundException(); 40 + } 41 + 42 + throw $e; 43 + } 44 + }); 45 + } 46 + 47 + public static function fetchContent($path) 48 + { 49 + return base64_decode(static::fetch($path)['content'], true); 50 + } 51 + 52 + public static function page($page, $locale) 53 + { 54 + return static::fetchContent($page.'/'.$locale.'.md'); 55 + } 56 + 57 + public static function pageLocales($page) 58 + { 59 + $locales = []; 60 + 61 + try { 62 + $contents = static::fetch($page); 63 + } catch (GitHubNotFoundException $e) { 64 + return $locales; 65 + } 66 + 67 + foreach ($contents as $content) { 68 + $locales[] = str_replace('.md', '', $content['name']); 69 + } 70 + 71 + return $locales; 72 + } 73 + }
+1 -1
app/helpers.php
··· 284 284 'getDownload' => osu_url('home.download'), 285 285 ]; 286 286 $links['help'] = [ 287 - 'getWiki' => osu_url('help.wiki'), 287 + 'getWiki' => route('wiki.show', ['page' => 'Welcome']), 288 288 'getFaq' => osu_url('help.faq'), 289 289 'getSupport' => osu_url('help.support'), 290 290 ];
+3 -1
composer.json
··· 24 24 "league/flysystem-aws-s3-v3": "^1.0", 25 25 "lord/laroute": "~2.0", 26 26 "sentry/sentry-laravel": "^0.4.1", 27 - "laravel/passport": "^1.0" 27 + "laravel/passport": "^1.0", 28 + "php-http/guzzle6-adapter": "^1.1", 29 + "graham-campbell/github": "^5.0" 28 30 }, 29 31 "require-dev": { 30 32 "fzaninotto/faker": "~1.5",
+808 -2
composer.lock
··· 4 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 5 "This file is @generated automatically" 6 6 ], 7 - "hash": "83b9ab6cce3b87fc98d7b5d9588372ea", 8 - "content-hash": "303e5f6bae9e1ffab3be1da835a490e7", 7 + "hash": "644d548174c8cb9889ecedad04c89e72", 8 + "content-hash": "361ea65e6f73da79f88785890723498e", 9 9 "packages": [ 10 10 { 11 11 "name": "aws/aws-sdk-php", ··· 140 140 "preload" 141 141 ], 142 142 "time": "2015-11-09 22:51:51" 143 + }, 144 + { 145 + "name": "clue/stream-filter", 146 + "version": "v1.3.0", 147 + "source": { 148 + "type": "git", 149 + "url": "https://github.com/clue/php-stream-filter.git", 150 + "reference": "e3bf9415da163d9ad6701dccb407ed501ae69785" 151 + }, 152 + "dist": { 153 + "type": "zip", 154 + "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/e3bf9415da163d9ad6701dccb407ed501ae69785", 155 + "reference": "e3bf9415da163d9ad6701dccb407ed501ae69785", 156 + "shasum": "" 157 + }, 158 + "require": { 159 + "php": ">=5.3" 160 + }, 161 + "type": "library", 162 + "autoload": { 163 + "psr-4": { 164 + "Clue\\StreamFilter\\": "src/" 165 + }, 166 + "files": [ 167 + "src/functions.php" 168 + ] 169 + }, 170 + "notification-url": "https://packagist.org/downloads/", 171 + "license": [ 172 + "MIT" 173 + ], 174 + "authors": [ 175 + { 176 + "name": "Christian Lück", 177 + "email": "christian@lueck.tv" 178 + } 179 + ], 180 + "description": "A simple and modern approach to stream filtering in PHP", 181 + "homepage": "https://github.com/clue/php-stream-filter", 182 + "keywords": [ 183 + "bucket brigade", 184 + "callback", 185 + "filter", 186 + "php_user_filter", 187 + "stream", 188 + "stream_filter_append", 189 + "stream_filter_register" 190 + ], 191 + "time": "2015-11-08 23:41:30" 143 192 }, 144 193 { 145 194 "name": "dnoegel/php-xdg-base-dir", ··· 786 835 "time": "2016-07-18 04:51:16" 787 836 }, 788 837 { 838 + "name": "graham-campbell/github", 839 + "version": "v5.0.0", 840 + "source": { 841 + "type": "git", 842 + "url": "https://github.com/GrahamCampbell/Laravel-GitHub.git", 843 + "reference": "5b09b85cfcc166222e5d3200ac9bea8ee0f82d51" 844 + }, 845 + "dist": { 846 + "type": "zip", 847 + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-GitHub/zipball/5b09b85cfcc166222e5d3200ac9bea8ee0f82d51", 848 + "reference": "5b09b85cfcc166222e5d3200ac9bea8ee0f82d51", 849 + "shasum": "" 850 + }, 851 + "require": { 852 + "graham-campbell/manager": "^2.3", 853 + "illuminate/contracts": "5.1.*|5.2.*|5.3.*", 854 + "illuminate/support": "5.1.*|5.2.*|5.3.*", 855 + "knplabs/github-api": "^2.0", 856 + "php": ">=5.5.9" 857 + }, 858 + "require-dev": { 859 + "graham-campbell/testbench": "^3.1", 860 + "madewithlove/illuminate-psr-cache-bridge": "^1.0", 861 + "mockery/mockery": "^0.9.4", 862 + "php-http/guzzle6-adapter": "^1.0", 863 + "phpunit/phpunit": "^4.8|^5.0" 864 + }, 865 + "suggest": { 866 + "madewithlove/illuminate-psr-cache-bridge": "Allows caching GitHub HTTP requests" 867 + }, 868 + "type": "library", 869 + "extra": { 870 + "branch-alias": { 871 + "dev-master": "5.0-dev" 872 + } 873 + }, 874 + "autoload": { 875 + "psr-4": { 876 + "GrahamCampbell\\GitHub\\": "src/" 877 + } 878 + }, 879 + "notification-url": "https://packagist.org/downloads/", 880 + "license": [ 881 + "MIT" 882 + ], 883 + "authors": [ 884 + { 885 + "name": "Graham Campbell", 886 + "email": "graham@alt-three.com" 887 + } 888 + ], 889 + "description": "GitHub Is A GitHub Bridge For Laravel 5", 890 + "keywords": [ 891 + "Bridge", 892 + "Graham Campbell", 893 + "GrahamCampbell", 894 + "Laravel GitHub", 895 + "Laravel-GitHub", 896 + "PHP GitHub API", 897 + "framework", 898 + "github", 899 + "github bridge", 900 + "laravel", 901 + "php-github-api" 902 + ], 903 + "time": "2016-12-11 20:30:06" 904 + }, 905 + { 906 + "name": "graham-campbell/manager", 907 + "version": "v2.4.0", 908 + "source": { 909 + "type": "git", 910 + "url": "https://github.com/GrahamCampbell/Laravel-Manager.git", 911 + "reference": "fd9052082e2c69c9a67d3e8d7dfa94cb33f8ab0b" 912 + }, 913 + "dist": { 914 + "type": "zip", 915 + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Manager/zipball/fd9052082e2c69c9a67d3e8d7dfa94cb33f8ab0b", 916 + "reference": "fd9052082e2c69c9a67d3e8d7dfa94cb33f8ab0b", 917 + "shasum": "" 918 + }, 919 + "require": { 920 + "illuminate/contracts": "5.1.*|5.2.*|5.3.*", 921 + "illuminate/support": "5.1.*|5.2.*|5.3.*", 922 + "php": ">=5.5.9" 923 + }, 924 + "require-dev": { 925 + "graham-campbell/testbench-core": "^1.1", 926 + "mockery/mockery": "^0.9.4", 927 + "phpunit/phpunit": "^4.8|^5.0" 928 + }, 929 + "type": "library", 930 + "extra": { 931 + "branch-alias": { 932 + "dev-master": "2.4-dev" 933 + } 934 + }, 935 + "autoload": { 936 + "psr-4": { 937 + "GrahamCampbell\\Manager\\": "src/" 938 + } 939 + }, 940 + "notification-url": "https://packagist.org/downloads/", 941 + "license": [ 942 + "MIT" 943 + ], 944 + "authors": [ 945 + { 946 + "name": "Graham Campbell", 947 + "email": "graham@alt-three.com" 948 + } 949 + ], 950 + "description": "Manager Provides Some Manager Functionality For Laravel 5", 951 + "keywords": [ 952 + "Graham Campbell", 953 + "GrahamCampbell", 954 + "Laravel Manager", 955 + "Laravel-Manager", 956 + "connector", 957 + "framework", 958 + "interface", 959 + "laravel", 960 + "manager" 961 + ], 962 + "time": "2016-04-26 14:27:59" 963 + }, 964 + { 789 965 "name": "graham-campbell/markdown", 790 966 "version": "v7.0.0", 791 967 "source": { ··· 1302 1478 "time": "2015-12-05 17:17:57" 1303 1479 }, 1304 1480 { 1481 + "name": "knplabs/github-api", 1482 + "version": "2.0.1", 1483 + "source": { 1484 + "type": "git", 1485 + "url": "https://github.com/KnpLabs/php-github-api.git", 1486 + "reference": "a86aa7afb3bcb06703ecf9e917df61ad341cd991" 1487 + }, 1488 + "dist": { 1489 + "type": "zip", 1490 + "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/a86aa7afb3bcb06703ecf9e917df61ad341cd991", 1491 + "reference": "a86aa7afb3bcb06703ecf9e917df61ad341cd991", 1492 + "shasum": "" 1493 + }, 1494 + "require": { 1495 + "php": "^5.5 || ^7.0", 1496 + "php-http/cache-plugin": "^1.2", 1497 + "php-http/client-common": "^1.3", 1498 + "php-http/client-implementation": "^1.0", 1499 + "php-http/discovery": "^1.0", 1500 + "php-http/httplug": "^1.1", 1501 + "psr/cache": "^1.0", 1502 + "psr/http-message": "^1.0" 1503 + }, 1504 + "require-dev": { 1505 + "guzzlehttp/psr7": "^1.2", 1506 + "php-http/guzzle6-adapter": "^1.0", 1507 + "phpunit/phpunit": "^4.0 || ^5.5", 1508 + "sllh/php-cs-fixer-styleci-bridge": "^1.3" 1509 + }, 1510 + "type": "library", 1511 + "extra": { 1512 + "branch-alias": { 1513 + "dev-master": "2.0.x-dev" 1514 + } 1515 + }, 1516 + "autoload": { 1517 + "psr-4": { 1518 + "Github\\": "lib/Github/" 1519 + } 1520 + }, 1521 + "notification-url": "https://packagist.org/downloads/", 1522 + "license": [ 1523 + "MIT" 1524 + ], 1525 + "authors": [ 1526 + { 1527 + "name": "Thibault Duplessis", 1528 + "email": "thibault.duplessis@gmail.com", 1529 + "homepage": "http://ornicar.github.com" 1530 + }, 1531 + { 1532 + "name": "KnpLabs Team", 1533 + "homepage": "http://knplabs.com" 1534 + } 1535 + ], 1536 + "description": "GitHub API v3 client", 1537 + "homepage": "https://github.com/KnpLabs/php-github-api", 1538 + "keywords": [ 1539 + "api", 1540 + "gh", 1541 + "gist", 1542 + "github" 1543 + ], 1544 + "time": "2016-12-13 13:09:53" 1545 + }, 1546 + { 1305 1547 "name": "laravel/framework", 1306 1548 "version": "v5.3.24", 1307 1549 "source": { ··· 2539 2781 "time": "2016-11-07 23:38:38" 2540 2782 }, 2541 2783 { 2784 + "name": "php-http/cache-plugin", 2785 + "version": "v1.2.0", 2786 + "source": { 2787 + "type": "git", 2788 + "url": "https://github.com/php-http/cache-plugin.git", 2789 + "reference": "b4e421cb5214ad9ef8b25bb32214ed4b71a8b356" 2790 + }, 2791 + "dist": { 2792 + "type": "zip", 2793 + "url": "https://api.github.com/repos/php-http/cache-plugin/zipball/b4e421cb5214ad9ef8b25bb32214ed4b71a8b356", 2794 + "reference": "b4e421cb5214ad9ef8b25bb32214ed4b71a8b356", 2795 + "shasum": "" 2796 + }, 2797 + "require": { 2798 + "php": "^5.4 || ^7.0", 2799 + "php-http/client-common": "^1.1", 2800 + "php-http/message-factory": "^1.0", 2801 + "psr/cache": "^1.0", 2802 + "symfony/options-resolver": "^2.6 || ^3.0" 2803 + }, 2804 + "require-dev": { 2805 + "henrikbjorn/phpspec-code-coverage": "^1.0", 2806 + "phpspec/phpspec": "^2.5" 2807 + }, 2808 + "type": "library", 2809 + "extra": { 2810 + "branch-alias": { 2811 + "dev-master": "1.2-dev" 2812 + } 2813 + }, 2814 + "autoload": { 2815 + "psr-4": { 2816 + "Http\\Client\\Common\\Plugin\\": "src/" 2817 + } 2818 + }, 2819 + "notification-url": "https://packagist.org/downloads/", 2820 + "license": [ 2821 + "MIT" 2822 + ], 2823 + "authors": [ 2824 + { 2825 + "name": "Márk Sági-Kazár", 2826 + "email": "mark.sagikazar@gmail.com" 2827 + } 2828 + ], 2829 + "description": "PSR-6 Cache plugin for HTTPlug", 2830 + "homepage": "http://httplug.io", 2831 + "keywords": [ 2832 + "cache", 2833 + "http", 2834 + "httplug", 2835 + "plugin" 2836 + ], 2837 + "time": "2016-08-16 12:12:50" 2838 + }, 2839 + { 2840 + "name": "php-http/client-common", 2841 + "version": "v1.4.0", 2842 + "source": { 2843 + "type": "git", 2844 + "url": "https://github.com/php-http/client-common.git", 2845 + "reference": "3cf7eb93a2e19bded055efff1a267a1fa6d46074" 2846 + }, 2847 + "dist": { 2848 + "type": "zip", 2849 + "url": "https://api.github.com/repos/php-http/client-common/zipball/3cf7eb93a2e19bded055efff1a267a1fa6d46074", 2850 + "reference": "3cf7eb93a2e19bded055efff1a267a1fa6d46074", 2851 + "shasum": "" 2852 + }, 2853 + "require": { 2854 + "php": ">=5.4", 2855 + "php-http/httplug": "^1.1", 2856 + "php-http/message": "^1.2", 2857 + "php-http/message-factory": "^1.0", 2858 + "symfony/options-resolver": "^2.6 || ^3.0" 2859 + }, 2860 + "require-dev": { 2861 + "henrikbjorn/phpspec-code-coverage": "^1.0", 2862 + "phpspec/phpspec": "^2.4" 2863 + }, 2864 + "suggest": { 2865 + "php-http/cache-plugin": "PSR-6 Cache plugin", 2866 + "php-http/logger-plugin": "PSR-3 Logger plugin", 2867 + "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" 2868 + }, 2869 + "type": "library", 2870 + "extra": { 2871 + "branch-alias": { 2872 + "dev-master": "1.5-dev" 2873 + } 2874 + }, 2875 + "autoload": { 2876 + "psr-4": { 2877 + "Http\\Client\\Common\\": "src/" 2878 + } 2879 + }, 2880 + "notification-url": "https://packagist.org/downloads/", 2881 + "license": [ 2882 + "MIT" 2883 + ], 2884 + "authors": [ 2885 + { 2886 + "name": "Márk Sági-Kazár", 2887 + "email": "mark.sagikazar@gmail.com" 2888 + } 2889 + ], 2890 + "description": "Common HTTP Client implementations and tools for HTTPlug", 2891 + "homepage": "http://httplug.io", 2892 + "keywords": [ 2893 + "client", 2894 + "common", 2895 + "http", 2896 + "httplug" 2897 + ], 2898 + "time": "2016-11-04 09:19:15" 2899 + }, 2900 + { 2901 + "name": "php-http/discovery", 2902 + "version": "v1.1.1", 2903 + "source": { 2904 + "type": "git", 2905 + "url": "https://github.com/php-http/discovery.git", 2906 + "reference": "47fc36bd73ab615b55c31f4134e6bae70f1c04c1" 2907 + }, 2908 + "dist": { 2909 + "type": "zip", 2910 + "url": "https://api.github.com/repos/php-http/discovery/zipball/47fc36bd73ab615b55c31f4134e6bae70f1c04c1", 2911 + "reference": "47fc36bd73ab615b55c31f4134e6bae70f1c04c1", 2912 + "shasum": "" 2913 + }, 2914 + "require": { 2915 + "php": "^5.5 || ^7.0" 2916 + }, 2917 + "require-dev": { 2918 + "henrikbjorn/phpspec-code-coverage": "^2.0.2", 2919 + "php-http/httplug": "^1.0", 2920 + "php-http/message-factory": "^1.0", 2921 + "phpspec/phpspec": "^2.4", 2922 + "puli/composer-plugin": "1.0.0-beta10" 2923 + }, 2924 + "suggest": { 2925 + "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories", 2926 + "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." 2927 + }, 2928 + "type": "library", 2929 + "extra": { 2930 + "branch-alias": { 2931 + "dev-master": "1.2-dev" 2932 + } 2933 + }, 2934 + "autoload": { 2935 + "psr-4": { 2936 + "Http\\Discovery\\": "src/" 2937 + } 2938 + }, 2939 + "notification-url": "https://packagist.org/downloads/", 2940 + "license": [ 2941 + "MIT" 2942 + ], 2943 + "authors": [ 2944 + { 2945 + "name": "Márk Sági-Kazár", 2946 + "email": "mark.sagikazar@gmail.com" 2947 + } 2948 + ], 2949 + "description": "Finds installed HTTPlug implementations and PSR-7 message factories", 2950 + "homepage": "http://php-http.org", 2951 + "keywords": [ 2952 + "adapter", 2953 + "client", 2954 + "discovery", 2955 + "factory", 2956 + "http", 2957 + "message", 2958 + "psr7" 2959 + ], 2960 + "time": "2016-11-27 12:21:25" 2961 + }, 2962 + { 2963 + "name": "php-http/guzzle6-adapter", 2964 + "version": "v1.1.1", 2965 + "source": { 2966 + "type": "git", 2967 + "url": "https://github.com/php-http/guzzle6-adapter.git", 2968 + "reference": "a56941f9dc6110409cfcddc91546ee97039277ab" 2969 + }, 2970 + "dist": { 2971 + "type": "zip", 2972 + "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/a56941f9dc6110409cfcddc91546ee97039277ab", 2973 + "reference": "a56941f9dc6110409cfcddc91546ee97039277ab", 2974 + "shasum": "" 2975 + }, 2976 + "require": { 2977 + "guzzlehttp/guzzle": "^6.0", 2978 + "php": ">=5.5.0", 2979 + "php-http/httplug": "^1.0" 2980 + }, 2981 + "provide": { 2982 + "php-http/async-client-implementation": "1.0", 2983 + "php-http/client-implementation": "1.0" 2984 + }, 2985 + "require-dev": { 2986 + "ext-curl": "*", 2987 + "php-http/adapter-integration-tests": "^0.4" 2988 + }, 2989 + "type": "library", 2990 + "extra": { 2991 + "branch-alias": { 2992 + "dev-master": "1.2-dev" 2993 + } 2994 + }, 2995 + "autoload": { 2996 + "psr-4": { 2997 + "Http\\Adapter\\Guzzle6\\": "src/" 2998 + } 2999 + }, 3000 + "notification-url": "https://packagist.org/downloads/", 3001 + "license": [ 3002 + "MIT" 3003 + ], 3004 + "authors": [ 3005 + { 3006 + "name": "Márk Sági-Kazár", 3007 + "email": "mark.sagikazar@gmail.com" 3008 + }, 3009 + { 3010 + "name": "David de Boer", 3011 + "email": "david@ddeboer.nl" 3012 + } 3013 + ], 3014 + "description": "Guzzle 6 HTTP Adapter", 3015 + "homepage": "http://httplug.io", 3016 + "keywords": [ 3017 + "Guzzle", 3018 + "http" 3019 + ], 3020 + "time": "2016-05-10 06:13:32" 3021 + }, 3022 + { 3023 + "name": "php-http/httplug", 3024 + "version": "v1.1.0", 3025 + "source": { 3026 + "type": "git", 3027 + "url": "https://github.com/php-http/httplug.git", 3028 + "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018" 3029 + }, 3030 + "dist": { 3031 + "type": "zip", 3032 + "url": "https://api.github.com/repos/php-http/httplug/zipball/1c6381726c18579c4ca2ef1ec1498fdae8bdf018", 3033 + "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018", 3034 + "shasum": "" 3035 + }, 3036 + "require": { 3037 + "php": ">=5.4", 3038 + "php-http/promise": "^1.0", 3039 + "psr/http-message": "^1.0" 3040 + }, 3041 + "require-dev": { 3042 + "henrikbjorn/phpspec-code-coverage": "^1.0", 3043 + "phpspec/phpspec": "^2.4" 3044 + }, 3045 + "type": "library", 3046 + "extra": { 3047 + "branch-alias": { 3048 + "dev-master": "1.1-dev" 3049 + } 3050 + }, 3051 + "autoload": { 3052 + "psr-4": { 3053 + "Http\\Client\\": "src/" 3054 + } 3055 + }, 3056 + "notification-url": "https://packagist.org/downloads/", 3057 + "license": [ 3058 + "MIT" 3059 + ], 3060 + "authors": [ 3061 + { 3062 + "name": "Eric GELOEN", 3063 + "email": "geloen.eric@gmail.com" 3064 + }, 3065 + { 3066 + "name": "Márk Sági-Kazár", 3067 + "email": "mark.sagikazar@gmail.com" 3068 + } 3069 + ], 3070 + "description": "HTTPlug, the HTTP client abstraction for PHP", 3071 + "homepage": "http://httplug.io", 3072 + "keywords": [ 3073 + "client", 3074 + "http" 3075 + ], 3076 + "time": "2016-08-31 08:30:17" 3077 + }, 3078 + { 3079 + "name": "php-http/message", 3080 + "version": "v1.4.1", 3081 + "source": { 3082 + "type": "git", 3083 + "url": "https://github.com/php-http/message.git", 3084 + "reference": "bfd895a4e753bdde99bed64d75b999e0c9fa6147" 3085 + }, 3086 + "dist": { 3087 + "type": "zip", 3088 + "url": "https://api.github.com/repos/php-http/message/zipball/bfd895a4e753bdde99bed64d75b999e0c9fa6147", 3089 + "reference": "bfd895a4e753bdde99bed64d75b999e0c9fa6147", 3090 + "shasum": "" 3091 + }, 3092 + "require": { 3093 + "clue/stream-filter": "^1.3", 3094 + "php": ">=5.4", 3095 + "php-http/message-factory": "^1.0.2", 3096 + "psr/http-message": "^1.0" 3097 + }, 3098 + "require-dev": { 3099 + "akeneo/phpspec-skip-example-extension": "^1.0", 3100 + "coduo/phpspec-data-provider-extension": "^1.0", 3101 + "ext-zlib": "*", 3102 + "guzzlehttp/psr7": "^1.0", 3103 + "henrikbjorn/phpspec-code-coverage": "^1.0", 3104 + "phpspec/phpspec": "^2.4", 3105 + "slim/slim": "^3.0", 3106 + "zendframework/zend-diactoros": "^1.0" 3107 + }, 3108 + "suggest": { 3109 + "ext-zlib": "Used with compressor/decompressor streams", 3110 + "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", 3111 + "slim/slim": "Used with Slim Framework PSR-7 implementation", 3112 + "zendframework/zend-diactoros": "Used with Diactoros Factories" 3113 + }, 3114 + "type": "library", 3115 + "extra": { 3116 + "branch-alias": { 3117 + "dev-master": "1.5-dev" 3118 + } 3119 + }, 3120 + "autoload": { 3121 + "psr-4": { 3122 + "Http\\Message\\": "src/" 3123 + }, 3124 + "files": [ 3125 + "src/filters.php" 3126 + ] 3127 + }, 3128 + "notification-url": "https://packagist.org/downloads/", 3129 + "license": [ 3130 + "MIT" 3131 + ], 3132 + "authors": [ 3133 + { 3134 + "name": "Márk Sági-Kazár", 3135 + "email": "mark.sagikazar@gmail.com" 3136 + } 3137 + ], 3138 + "description": "HTTP Message related tools", 3139 + "homepage": "http://php-http.org", 3140 + "keywords": [ 3141 + "http", 3142 + "message", 3143 + "psr-7" 3144 + ], 3145 + "time": "2016-12-16 21:09:21" 3146 + }, 3147 + { 3148 + "name": "php-http/message-factory", 3149 + "version": "v1.0.2", 3150 + "source": { 3151 + "type": "git", 3152 + "url": "https://github.com/php-http/message-factory.git", 3153 + "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" 3154 + }, 3155 + "dist": { 3156 + "type": "zip", 3157 + "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", 3158 + "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", 3159 + "shasum": "" 3160 + }, 3161 + "require": { 3162 + "php": ">=5.4", 3163 + "psr/http-message": "^1.0" 3164 + }, 3165 + "type": "library", 3166 + "extra": { 3167 + "branch-alias": { 3168 + "dev-master": "1.0-dev" 3169 + } 3170 + }, 3171 + "autoload": { 3172 + "psr-4": { 3173 + "Http\\Message\\": "src/" 3174 + } 3175 + }, 3176 + "notification-url": "https://packagist.org/downloads/", 3177 + "license": [ 3178 + "MIT" 3179 + ], 3180 + "authors": [ 3181 + { 3182 + "name": "Márk Sági-Kazár", 3183 + "email": "mark.sagikazar@gmail.com" 3184 + } 3185 + ], 3186 + "description": "Factory interfaces for PSR-7 HTTP Message", 3187 + "homepage": "http://php-http.org", 3188 + "keywords": [ 3189 + "factory", 3190 + "http", 3191 + "message", 3192 + "stream", 3193 + "uri" 3194 + ], 3195 + "time": "2015-12-19 14:08:53" 3196 + }, 3197 + { 3198 + "name": "php-http/promise", 3199 + "version": "v1.0.0", 3200 + "source": { 3201 + "type": "git", 3202 + "url": "https://github.com/php-http/promise.git", 3203 + "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980" 3204 + }, 3205 + "dist": { 3206 + "type": "zip", 3207 + "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980", 3208 + "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980", 3209 + "shasum": "" 3210 + }, 3211 + "require-dev": { 3212 + "henrikbjorn/phpspec-code-coverage": "^1.0", 3213 + "phpspec/phpspec": "^2.4" 3214 + }, 3215 + "type": "library", 3216 + "extra": { 3217 + "branch-alias": { 3218 + "dev-master": "1.1-dev" 3219 + } 3220 + }, 3221 + "autoload": { 3222 + "psr-4": { 3223 + "Http\\Promise\\": "src/" 3224 + } 3225 + }, 3226 + "notification-url": "https://packagist.org/downloads/", 3227 + "license": [ 3228 + "MIT" 3229 + ], 3230 + "authors": [ 3231 + { 3232 + "name": "Márk Sági-Kazár", 3233 + "email": "mark.sagikazar@gmail.com" 3234 + }, 3235 + { 3236 + "name": "Joel Wurtz", 3237 + "email": "joel.wurtz@gmail.com" 3238 + } 3239 + ], 3240 + "description": "Promise used for asynchronous HTTP requests", 3241 + "homepage": "http://httplug.io", 3242 + "keywords": [ 3243 + "promise" 3244 + ], 3245 + "time": "2016-01-26 13:27:02" 3246 + }, 3247 + { 2542 3248 "name": "phpseclib/phpseclib", 2543 3249 "version": "2.0.4", 2544 3250 "source": { ··· 2725 3431 "redis" 2726 3432 ], 2727 3433 "time": "2016-06-16 16:22:20" 3434 + }, 3435 + { 3436 + "name": "psr/cache", 3437 + "version": "1.0.1", 3438 + "source": { 3439 + "type": "git", 3440 + "url": "https://github.com/php-fig/cache.git", 3441 + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" 3442 + }, 3443 + "dist": { 3444 + "type": "zip", 3445 + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", 3446 + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", 3447 + "shasum": "" 3448 + }, 3449 + "require": { 3450 + "php": ">=5.3.0" 3451 + }, 3452 + "type": "library", 3453 + "extra": { 3454 + "branch-alias": { 3455 + "dev-master": "1.0.x-dev" 3456 + } 3457 + }, 3458 + "autoload": { 3459 + "psr-4": { 3460 + "Psr\\Cache\\": "src/" 3461 + } 3462 + }, 3463 + "notification-url": "https://packagist.org/downloads/", 3464 + "license": [ 3465 + "MIT" 3466 + ], 3467 + "authors": [ 3468 + { 3469 + "name": "PHP-FIG", 3470 + "homepage": "http://www.php-fig.org/" 3471 + } 3472 + ], 3473 + "description": "Common interface for caching libraries", 3474 + "keywords": [ 3475 + "cache", 3476 + "psr", 3477 + "psr-6" 3478 + ], 3479 + "time": "2016-08-06 20:24:11" 2728 3480 }, 2729 3481 { 2730 3482 "name": "psr/http-message", ··· 3539 4291 "description": "Symfony HttpKernel Component", 3540 4292 "homepage": "https://symfony.com", 3541 4293 "time": "2016-11-21 02:44:20" 4294 + }, 4295 + { 4296 + "name": "symfony/options-resolver", 4297 + "version": "v3.2.1", 4298 + "source": { 4299 + "type": "git", 4300 + "url": "https://github.com/symfony/options-resolver.git", 4301 + "reference": "45940bcad6388b3b6058107eca67ced738d205bb" 4302 + }, 4303 + "dist": { 4304 + "type": "zip", 4305 + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/45940bcad6388b3b6058107eca67ced738d205bb", 4306 + "reference": "45940bcad6388b3b6058107eca67ced738d205bb", 4307 + "shasum": "" 4308 + }, 4309 + "require": { 4310 + "php": ">=5.5.9" 4311 + }, 4312 + "type": "library", 4313 + "extra": { 4314 + "branch-alias": { 4315 + "dev-master": "3.2-dev" 4316 + } 4317 + }, 4318 + "autoload": { 4319 + "psr-4": { 4320 + "Symfony\\Component\\OptionsResolver\\": "" 4321 + }, 4322 + "exclude-from-classmap": [ 4323 + "/Tests/" 4324 + ] 4325 + }, 4326 + "notification-url": "https://packagist.org/downloads/", 4327 + "license": [ 4328 + "MIT" 4329 + ], 4330 + "authors": [ 4331 + { 4332 + "name": "Fabien Potencier", 4333 + "email": "fabien@symfony.com" 4334 + }, 4335 + { 4336 + "name": "Symfony Community", 4337 + "homepage": "https://symfony.com/contributors" 4338 + } 4339 + ], 4340 + "description": "Symfony OptionsResolver Component", 4341 + "homepage": "https://symfony.com", 4342 + "keywords": [ 4343 + "config", 4344 + "configuration", 4345 + "options" 4346 + ], 4347 + "time": "2016-05-13 18:13:23" 3542 4348 }, 3543 4349 { 3544 4350 "name": "symfony/polyfill-mbstring",
+2
config/app.php
··· 180 180 */ 181 181 Clockwork\Support\Laravel\ClockworkServiceProvider::class, 182 182 GrahamCampbell\Markdown\MarkdownServiceProvider::class, 183 + GrahamCampbell\GitHub\GitHubServiceProvider::class, 183 184 Maknz\Slack\SlackServiceProvider::class, 184 185 Mariuzzo\LaravelJsLocalization\LaravelJsLocalizationServiceProvider::class, 185 186 Shift31\LaravelElasticsearch\ElasticsearchServiceProvider::class, ··· 253 254 'Html' => 'Collective\Html\HtmlFacade', 254 255 255 256 'Markdown' => 'GrahamCampbell\Markdown\Facades\Markdown', 257 + 'GitHub' => 'GrahamCampbell\GitHub\Facades\GitHub', 256 258 257 259 'Slack' => 'Maknz\Slack\Facades\Slack', 258 260 'Statsd' => 'League\StatsD\Laravel5\Facade\StatsdFacade',
+72
config/github.php
··· 1 + <?php 2 + 3 + /* 4 + * This file is part of Laravel GitHub. 5 + * 6 + * (c) Graham Campbell <graham@alt-three.com> 7 + * 8 + * For the full copyright and license information, please view the LICENSE 9 + * file that was distributed with this source code. 10 + */ 11 + 12 + return [ 13 + 14 + /* 15 + |-------------------------------------------------------------------------- 16 + | Default Connection Name 17 + |-------------------------------------------------------------------------- 18 + | 19 + | Here you may specify which of the connections below you wish to use as 20 + | your default connection for all work. Of course, you may use many 21 + | connections at once using the manager class. 22 + | 23 + */ 24 + 25 + 'default' => 'main', 26 + 27 + /* 28 + |-------------------------------------------------------------------------- 29 + | GitHub Connections 30 + |-------------------------------------------------------------------------- 31 + | 32 + | Here are each of the connections setup for your application. Example 33 + | configuration has been included, but you may add as many connections as 34 + | you would like. Note that the 3 supported authentication methods are: 35 + | "application", "password", and "token". 36 + | 37 + */ 38 + 39 + 'connections' => [ 40 + 41 + 'main' => [ 42 + 'token' => env('GITHUB_TOKEN'), 43 + 'method' => 'token', 44 + // 'backoff' => false, 45 + // 'cache' => false, 46 + // 'version' => 'v3', 47 + // 'enterprise' => false, 48 + ], 49 + 50 + 'alternative' => [ 51 + 'clientId' => 'your-client-id', 52 + 'clientSecret' => 'your-client-secret', 53 + 'method' => 'application', 54 + // 'backoff' => false, 55 + // 'cache' => false, 56 + // 'version' => 'v3', 57 + // 'enterprise' => false, 58 + ], 59 + 60 + 'other' => [ 61 + 'username' => 'your-username', 62 + 'password' => 'your-password', 63 + 'method' => 'password', 64 + // 'backoff' => false, 65 + // 'cache' => false, 66 + // 'version' => 'v3', 67 + // 'enterprise' => false, 68 + ], 69 + 70 + ], 71 + 72 + ];
public/images/headers/wiki.jpg

This is a binary file and will not be displayed.

public/images/headers/wiki@2x.jpg

This is a binary file and will not be displayed.

+2
resources/assets/less/bem-index.less
··· 186 186 @import "bem/user-verification-popup"; 187 187 @import "bem/userinfo-small"; 188 188 @import "bem/warning-box"; 189 + @import "bem/wiki-content"; 190 + @import "bem/wiki-language-list"; 189 191 190 192 /** 191 193 * Below are custom Block-Element-Modifier LESS-includes
+6
resources/assets/less/bem/osu-page-header.less
··· 104 104 height: 165px; 105 105 } 106 106 107 + &--wiki { 108 + .at2x-simple("/images/headers/wiki.jpg"); 109 + height: 125px; 110 + margin-bottom: @spacing; 111 + } 112 + 107 113 &__box { 108 114 margin: 0 @spacing; 109 115 flex: 1 0 auto;
+50
resources/assets/less/bem/wiki-content.less
··· 1 + /** 2 + * Copyright 2015-2016 ppy Pty. Ltd. 3 + * 4 + * This file is part of osu!web. osu!web is distributed with the hope of 5 + * attracting more community contributions to the core ecosystem of osu!. 6 + * 7 + * osu!web is free software: you can redistribute it and/or modify 8 + * it under the terms of the Affero GNU General Public License version 3 9 + * as published by the Free Software Foundation. 10 + * 11 + * osu!web is distributed WITHOUT ANY WARRANTY; without even the implied 12 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 + * See the GNU Affero General Public License for more details. 14 + * 15 + * You should have received a copy of the GNU Affero General Public License 16 + * along with osu!web. If not, see <http://www.gnu.org/licenses/>. 17 + * 18 + */ 19 + 20 + // this isn't actually bem =D 21 + // don't put anything else inside 22 + .wiki-content { 23 + .content-font(); 24 + padding: (@spacing * 4) (@spacing * 2); 25 + 26 + @media @desktop { 27 + padding-left: @padding-big; 28 + padding-right: @padding-big; 29 + } 30 + 31 + h1 { 32 + font-family: @font-family-sans-serif; 33 + font-size: @font-size--header-wiki-1; 34 + font-weight: bold; 35 + margin: (@spacing * 4) 0 (@spacing * 2); 36 + } 37 + 38 + h2 { 39 + font-family: @font-family-sans-serif; 40 + font-size: @font-size--header-wiki-2; 41 + font-weight: bold; 42 + margin: (@spacing * 2) 0 @spacing; 43 + } 44 + 45 + h3 { 46 + font-family: @font-family-sans-serif; 47 + font-size: @font-size--header-wiki-3; 48 + font-weight: bold; 49 + } 50 + }
+38
resources/assets/less/bem/wiki-language-list.less
··· 1 + /** 2 + * Copyright 2015-2016 ppy Pty. Ltd. 3 + * 4 + * This file is part of osu!web. osu!web is distributed with the hope of 5 + * attracting more community contributions to the core ecosystem of osu!. 6 + * 7 + * osu!web is free software: you can redistribute it and/or modify 8 + * it under the terms of the Affero GNU General Public License version 3 9 + * as published by the Free Software Foundation. 10 + * 11 + * osu!web is distributed WITHOUT ANY WARRANTY; without even the implied 12 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 + * See the GNU Affero General Public License for more details. 14 + * 15 + * You should have received a copy of the GNU Affero General Public License 16 + * along with osu!web. If not, see <http://www.gnu.org/licenses/>. 17 + * 18 + */ 19 + 20 + .wiki-language-list { 21 + background-color: @gray-e; 22 + display: flex; 23 + flex-wrap: wrap; 24 + 25 + font-style: italic; 26 + font-size: @font-size--title-small; 27 + 28 + padding: (@spacing * 2); 29 + 30 + @media @desktop { 31 + padding-left: @padding-big; 32 + padding-right: @padding-big; 33 + } 34 + 35 + &__item { 36 + padding-left: (@spacing * 2); 37 + } 38 + }
+4
resources/assets/less/variables.less
··· 79 79 @font-size--header-subtitle: 16px; 80 80 @font-size--header-description: 12px; 81 81 82 + @font-size--header-wiki-1: 26px; 83 + @font-size--header-wiki-2: 18px; 84 + @font-size--header-wiki-3: 16px; 85 + 82 86 @font-size--new-header-title: 30px; 83 87 @font-size--new-header-subtitle: 14px; 84 88
+2 -1
resources/lang/en/layout.php
··· 36 36 ], 37 37 'help' => [ 38 38 '_' => 'help', 39 - 'getWiki' => 'wiki', 40 39 'getFaq' => 'faq', 41 40 'getSupport' => 'support', 41 + 'getWiki' => 'wiki', 42 + 'wiki-show' => 'wiki', 42 43 ], 43 44 'beatmaps' => [ 44 45 '_' => 'beatmaps',
+27
resources/lang/en/wiki.php
··· 1 + <?php 2 + 3 + /** 4 + * Copyright 2015 ppy Pty. Ltd. 5 + * 6 + * This file is part of osu!web. osu!web is distributed in the hopes of 7 + * attracting more community contributions to the core ecosystem of osu! 8 + * 9 + * osu!web is free software: you can redistribute it and/or modify 10 + * it under the terms of the Affero GNU General Public License version 3 11 + * as published by the Free Software Foundation. 12 + * 13 + * osu!web is distributed WITHOUT ANY WARRANTY; without even the implied 14 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 + * See the GNU Affero General Public License for more details. 16 + * 17 + * You should have received a copy of the GNU Affero General Public License 18 + * along with osu!web. If not, see <http://www.gnu.org/licenses/>. 19 + */ 20 + 21 + return [ 22 + 'show' => [ 23 + 'missing' => 'Requested page not found.', 24 + 'missing_translation' => 'Requested page not found for currently selected language.', 25 + 'other_languages' => 'Other languages', 26 + ], 27 + ];
+64
resources/views/wiki/show.blade.php
··· 1 + {{-- 2 + Copyright 2016 ppy Pty. Ltd. 3 + 4 + This file is part of osu!web. osu!web is distributed with the hope of 5 + attracting more community contributions to the core ecosystem of osu!. 6 + 7 + osu!web is free software: you can redistribute it and/or modify 8 + it under the terms of the Affero GNU General Public License version 3 9 + as published by the Free Software Foundation. 10 + 11 + osu!web is distributed WITHOUT ANY WARRANTY; without even the implied 12 + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 + See the GNU Affero General Public License for more details. 14 + 15 + You should have received a copy of the GNU Affero General Public License 16 + along with osu!web. If not, see <http://www.gnu.org/licenses/>. 17 + --}} 18 + 19 + @extends('master', [ 20 + 'titleAppend' => $path, 21 + 'title' => null, 22 + ]) 23 + 24 + @section('content') 25 + <div class="osu-layout__row"> 26 + <div class="osu-page-header osu-page-header--wiki"> 27 + <div class="osu-page-header__title-box"> 28 + @if (present($subtitle)) 29 + <h2 class="osu-page-header__title osu-page-header__title--small">{{ $subtitle }}</h2> 30 + @endif 31 + 32 + <h1 class="osu-page-header__title">{{ $title }}</h1> 33 + </div> 34 + </div> 35 + </div> 36 + 37 + <div class="osu-layout__row osu-layout__row--page-compact"> 38 + @if (!empty($pageLocales)) 39 + <div class="wiki-language-list"> 40 + <div class="wiki-language-list__header"> 41 + {{ trans('wiki.show.other_languages') }}: 42 + </div> 43 + 44 + @foreach ($pageLocales as $locale) 45 + <a class="wiki-language-list__item" href="?locale={{ $locale }}"> 46 + {{ App\Libraries\LocaleMeta::nameFor($locale) }} 47 + </a> 48 + @endforeach 49 + </div> 50 + @endif 51 + 52 + <div class="wiki-content"> 53 + @if (present($page)) 54 + {!! Markdown::convertToHtml($page) !!} 55 + @else 56 + @if (empty($pageLocales)) 57 + {{ trans('wiki.show.missing') }} 58 + @else 59 + {{ trans('wiki.show.missing_translation') }} 60 + @endif 61 + @endif 62 + </div> 63 + </div> 64 + @endsection
+2 -1
routes/web.php
··· 133 133 134 134 // help section 135 135 Route::get('/wiki', ['as' => 'wiki', function () { 136 - return Redirect::to('https://osu.ppy.sh/wiki'); 136 + return ujs_redirect(route('wiki.show', ['page' => 'Welcome'])); 137 137 }]); 138 + Route::get('wiki/{page?}', ['as' => 'wiki.show', 'uses' => 'WikiController@show'])->where('page', '.+'); 138 139 139 140 Route::get('/help/support', ['as' => 'support', 'uses' => 'HelpController@getSupport']); 140 141 Route::get('/help/faq', ['as' => 'faq', 'uses' => 'HelpController@getFaq']);