diff --git a/app/Community/AuthServiceProvider.php b/app/Community/AuthServiceProvider.php index 49290f41fd..0345332317 100755 --- a/app/Community/AuthServiceProvider.php +++ b/app/Community/AuthServiceProvider.php @@ -5,6 +5,7 @@ namespace App\Community; use App\Community\Models\AchievementComment; +use App\Community\Models\AchievementSetClaim; use App\Community\Models\Comment; use App\Community\Models\Forum; use App\Community\Models\ForumCategory; @@ -19,6 +20,7 @@ use App\Community\Models\UserActivityLegacy; use App\Community\Models\UserComment; use App\Community\Policies\AchievementCommentPolicy; +use App\Community\Policies\AchievementSetClaimPolicy; use App\Community\Policies\CommentPolicy; use App\Community\Policies\ForumCategoryPolicy; use App\Community\Policies\ForumPolicy; @@ -38,6 +40,7 @@ class AuthServiceProvider extends ServiceProvider { protected $policies = [ AchievementComment::class => AchievementCommentPolicy::class, + AchievementSetClaim::class => AchievementSetClaimPolicy::class, Comment::class => CommentPolicy::class, Forum::class => ForumPolicy::class, ForumCategory::class => ForumCategoryPolicy::class, diff --git a/app/Community/Policies/AchievementSetClaimPolicy.php b/app/Community/Policies/AchievementSetClaimPolicy.php new file mode 100644 index 0000000000..6074f4819b --- /dev/null +++ b/app/Community/Policies/AchievementSetClaimPolicy.php @@ -0,0 +1,50 @@ +getAttribute('Permissions') >= Permissions::JuniorDeveloper; + } + + public function view(User $user, AchievementSetClaim $achievementSetClaim): bool + { + return false; + } + + public function create(User $user): bool + { + return false; + } + + public function update(User $user, AchievementSetClaim $achievementSetClaim): bool + { + return false; + } + + public function delete(User $user, AchievementSetClaim $achievementSetClaim): bool + { + return false; + } + + public function restore(User $user, AchievementSetClaim $achievementSetClaim): bool + { + return false; + } + + public function forceDelete(User $user, AchievementSetClaim $achievementSetClaim): bool + { + return false; + } +} diff --git a/app/Community/Policies/ForumPolicy.php b/app/Community/Policies/ForumPolicy.php index 99c8608394..6e7e4d4f71 100644 --- a/app/Community/Policies/ForumPolicy.php +++ b/app/Community/Policies/ForumPolicy.php @@ -5,6 +5,7 @@ namespace App\Community\Policies; use App\Community\Models\Forum; +use App\Site\Enums\Permissions; use App\Site\Models\Role; use App\Site\Models\User; use Illuminate\Auth\Access\HandlesAuthorization; @@ -15,9 +16,10 @@ class ForumPolicy public function manage(User $user): bool { - return $user->hasAnyRole([ - Role::FORUM_MANAGER, - ]); + return $user->getAttribute('Permissions') >= Permissions::Moderator; + // return $user->hasAnyRole([ + // Role::FORUM_MANAGER, + // ]); } public function viewAny(?User $user): bool diff --git a/app/Community/Policies/NewsPolicy.php b/app/Community/Policies/NewsPolicy.php index f2a7d63e5a..efeec9d403 100644 --- a/app/Community/Policies/NewsPolicy.php +++ b/app/Community/Policies/NewsPolicy.php @@ -5,6 +5,7 @@ namespace App\Community\Policies; use App\Community\Models\News; +use App\Site\Enums\Permissions; use App\Site\Models\Role; use App\Site\Models\User; use Illuminate\Auth\Access\HandlesAuthorization; @@ -15,11 +16,12 @@ class NewsPolicy public function manage(User $user): bool { - return $user->hasAnyRole([ - // Role::ADMINISTRATOR, - Role::MODERATOR, - Role::NEWS_MANAGER, - ]); + return $user->getAttribute('Permissions') >= Permissions::Developer; + // return $user->hasAnyRole([ + // // Role::ADMINISTRATOR, + // Role::MODERATOR, + // Role::NEWS_MANAGER, + // ]); } public function viewAny(?User $user): bool diff --git a/app/Community/Policies/TriggerTicketPolicy.php b/app/Community/Policies/TriggerTicketPolicy.php index 15a55962ce..13af76b01a 100644 --- a/app/Community/Policies/TriggerTicketPolicy.php +++ b/app/Community/Policies/TriggerTicketPolicy.php @@ -5,6 +5,7 @@ namespace App\Community\Policies; use App\Community\Models\TriggerTicket; +use App\Site\Enums\Permissions; use App\Site\Models\User; use Illuminate\Auth\Access\HandlesAuthorization; @@ -12,6 +13,11 @@ class TriggerTicketPolicy { use HandlesAuthorization; + public function manage(User $user): bool + { + return $user->getAttribute('Permissions') >= Permissions::JuniorDeveloper; + } + public function view(User $user, TriggerTicket $achievementTicket): bool { return false; diff --git a/app/Community/RouteServiceProvider.php b/app/Community/RouteServiceProvider.php index 75f92b4fb6..5d03aa21ee 100755 --- a/app/Community/RouteServiceProvider.php +++ b/app/Community/RouteServiceProvider.php @@ -128,7 +128,7 @@ protected function mapWebRoutes(): void // Route::resource('forum', ForumController::class)->only('create', 'store', 'edit', 'update'); - // // Route::get('posts/clearing', [ForumCommentController::class, 'clearing'])->name('forum-topic-comments.clearing'); + // // Route::get('posts/verify', [ForumCommentController::class, 'verify'])->name('forum-topic-comments.verify'); // }); /* diff --git a/app/Helpers/render/layout.php b/app/Helpers/render/layout.php index 215bb01ed9..3386182a07 100644 --- a/app/Helpers/render/layout.php +++ b/app/Helpers/render/layout.php @@ -1,8 +1,5 @@ share('pageImage', $imageURL); } -function RenderToolbar(): void -{ - /** @var ?User $user */ - $user = request()->user(); - - $username = $user?->getAttribute('User'); - $permissions = $user?->getAttribute('Permissions') ?? 0; - $contribCount = $user?->getAttribute('ContribCount') ?? 0; - - $menuSystemsList = [ - [ - "Nintendo" => [ - ["systemName" => "Game Boy", "listID" => 4], - ["systemName" => "Game Boy Color", "listID" => 6], - ["systemName" => "Game Boy Advance", "listID" => 5], - ["systemName" => "NES/Famicom", "listID" => 7], - ["systemName" => "SNES/Super Famicom", "listID" => 3], - ["systemName" => "Nintendo 64", "listID" => 2], - ["systemName" => "Nintendo DS", "listID" => 18], - ["systemName" => "Nintendo DSi", "listID" => 78], - ["systemName" => "Pokemon Mini", "listID" => 24], - ["systemName" => "Virtual Boy", "listID" => 28], - ], - "Sony" => [ - ["systemName" => "PlayStation", "listID" => 12], - ["systemName" => "PlayStation 2", "listID" => 21], - ["systemName" => "PlayStation Portable", "listID" => 41], - ], - "Atari" => [ - ["systemName" => "Atari 2600", "listID" => 25], - ["systemName" => "Atari 7800", "listID" => 51], - ["systemName" => "Atari Jaguar", "listID" => 17], - ["systemName" => "Atari Jaguar CD", "listID" => 77], - ["systemName" => "Atari Lynx", "listID" => 13], - ], - "NEC" => [ - ["systemName" => "PC Engine/TurboGrafx-16", "listID" => 8], - ["systemName" => "PC Engine CD/TurboGrafx-CD", "listID" => 76], - ["systemName" => "PC-8000/8800", "listID" => 47], - ["systemName" => "PC-FX", "listID" => 49], - ], - ], - [ - "Sega" => [ - ["systemName" => "SG-1000", "listID" => 33], - ["systemName" => "Master System", "listID" => 11], - ["systemName" => "Game Gear", "listID" => 15], - ["systemName" => "Genesis/Mega Drive", "listID" => 1], - ["systemName" => "Sega CD", "listID" => 9], - ["systemName" => "Sega 32X", "listID" => 10], - ["systemName" => "Sega Saturn", "listID" => 39], - ["systemName" => "Sega Dreamcast", "listID" => 40], - ], - "Other" => [ - ["systemName" => "3DO Interactive Multiplayer", "listID" => 43], - ["systemName" => "Amstrad CPC", "listID" => 37], - ["systemName" => "Apple II", "listID" => 38], - ["systemName" => "Arcade", "listID" => 27], - ["systemName" => "Arcadia 2001", "listID" => 73], - ["systemName" => "Arduboy", "listID" => 71], - ["systemName" => "ColecoVision", "listID" => 44], - ["systemName" => "Elektor TV Games Computer", "listID" => 75], - ["systemName" => "Fairchild Channel F", "listID" => 57], - ["systemName" => "Intellivision", "listID" => 45], - ["systemName" => "Interton VC 4000", "listID" => 74], - ["systemName" => "Magnavox Odyssey 2", "listID" => 23], - ["systemName" => "Mega Duck", "listID" => 69], - ["systemName" => "MSX", "listID" => 29], - ["systemName" => "Neo Geo Pocket", "listID" => 14], - ["systemName" => "Uzebox", "listID" => 80], - ["systemName" => "Vectrex", "listID" => 46], - ["systemName" => "WASM-4", "listID" => 72], - ["systemName" => "Watara Supervision", "listID" => 63], - ["systemName" => "WonderSwan", "listID" => 53], - ], - - ], - ]; - echo ""; - - $searchQuery = null; - if ($_SERVER['SCRIPT_NAME'] === '/searchresults.php') { - $searchQuery = attributeEscape(request()->query('s')); - } - echo "
"; - // echo "Search: "; - echo ""; - echo ""; - echo "
"; -} - function RenderPaginator(int $numItems, int $perPage, int $offset, string $urlPrefix): void { // floor to current page diff --git a/app/Platform/Policies/GameHashPolicy.php b/app/Platform/Policies/GameHashPolicy.php index c756ae89ed..804e219622 100644 --- a/app/Platform/Policies/GameHashPolicy.php +++ b/app/Platform/Policies/GameHashPolicy.php @@ -5,6 +5,7 @@ namespace App\Platform\Policies; use App\Platform\Models\GameHash; +use App\Site\Enums\Permissions; use App\Site\Models\Role; use App\Site\Models\User; use Illuminate\Auth\Access\HandlesAuthorization; @@ -15,9 +16,10 @@ class GameHashPolicy public function manage(User $user): bool { - return $user->hasAnyRole([ - Role::HUB_MANAGER, - ]); + return $user->getAttribute('Permissions') >= Permissions::Developer; + // return $user->hasAnyRole([ + // Role::HUB_MANAGER, + // ]); } public function viewAny(?User $user): bool diff --git a/app/Site/AuthServiceProvider.php b/app/Site/AuthServiceProvider.php index ba4b7e0324..ae5e8ae8c7 100755 --- a/app/Site/AuthServiceProvider.php +++ b/app/Site/AuthServiceProvider.php @@ -45,6 +45,7 @@ function (Authenticatable $user, $ability) { return true; } + // TODO remove as soon as permission matrix is in place if ($user->Permissions >= Permissions::Moderator) { return true; } @@ -64,29 +65,32 @@ function (Authenticatable $user, $ability) { * which actions are allowed specifically has to be defined in the respective policies * Note: this ability should not be called 'manage' or policies might default to true if manage() method does not exist there */ - Gate::define('accessManagementTools', fn (User $user) => $user->hasAnyRole([ - Role::ADMINISTRATOR, - Role::MODERATOR, - // Role::COMMUNITY_MANAGER, // rather a mix of moderator and specialized management role? - Role::EVENT_MANAGER, - Role::FORUM_MANAGER, - Role::HUB_MANAGER, - Role::NEWS_MANAGER, - Role::RELEASE_MANAGER, - Role::TICKET_MANAGER, - Role::DEVELOPER, - Role::ARTIST, - Role::WRITER, - ])); + // Gate::define('accessManagementTools', fn (User $user) => $user->hasAnyRole([ + // Role::ADMINISTRATOR, + // Role::MODERATOR, + // // Role::COMMUNITY_MANAGER, // rather a mix of moderator and specialized management role? + // Role::EVENT_MANAGER, + // Role::FORUM_MANAGER, + // Role::HUB_MANAGER, + // Role::NEWS_MANAGER, + // Role::RELEASE_MANAGER, + // Role::TICKET_MANAGER, + // Role::DEVELOPER, + // Role::ARTIST, + // Role::WRITER, + // ])); + // TODO remove as soon as permission matrix is in place + Gate::define('accessManagementTools', fn (User $user) => $user->getAttribute('Permissions') >= Permissions::JuniorDeveloper); /* * can "create". meant for creator tools opt-in */ - Gate::define('develop', fn (User $user) => $user->hasAnyRole([ - Role::DEVELOPER, - Role::ARTIST, - Role::WRITER, - ])); + // Gate::define('develop', fn (User $user) => $user->hasAnyRole([ + // Role::DEVELOPER, + // Role::ARTIST, + // Role::WRITER, + // ])); + Gate::define('develop', fn (User $user) => $user->getAttribute('Permissions') >= Permissions::JuniorDeveloper); /* * settings diff --git a/app/Site/Enums/Permissions.php b/app/Site/Enums/Permissions.php index 22149cef31..80957a8d5b 100644 --- a/app/Site/Enums/Permissions.php +++ b/app/Site/Enums/Permissions.php @@ -7,18 +7,14 @@ abstract class Permissions { public const Spam = -2; - public const Banned = -1; - public const Unregistered = 0; - public const Registered = 1; - public const JuniorDeveloper = 2; - public const Developer = 3; - public const Moderator = 4; + public const Admin = 5; + public const Root = 6; public static function cases(): array { diff --git a/app/View/Components/Navbar.php b/app/View/Components/Navbar.php index a816e88418..7f5448efd4 100644 --- a/app/View/Components/Navbar.php +++ b/app/View/Components/Navbar.php @@ -18,6 +18,6 @@ public function __construct( public function render(): View { - return view('layouts.components.navbar'); + return view('components.navbar'); } } diff --git a/composer.json b/composer.json index 83e3af2f4a..39aac2b9b6 100644 --- a/composer.json +++ b/composer.json @@ -110,7 +110,6 @@ "laravel": { "dont-discover": [ "beyondcode/laravel-websockets", - "laravel/fortify", "laravel/passport" ] } diff --git a/composer.lock b/composer.lock index 3d6e834a80..6b2bbfe475 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "55de4f1a2a7a9df40d5aff5d31588a1b", + "content-hash": "8b2e83b744434343325560270e48c9a9", "packages": [ { "name": "aws/aws-crt-php", diff --git a/lang/en_US/resource.php b/lang/en_US/resource.php index 1070fe6fb6..24292bacba 100755 --- a/lang/en_US/resource.php +++ b/lang/en_US/resource.php @@ -187,6 +187,9 @@ 'system' => [ 'title' => __('system') . '|' . __('systems'), ], + 'ticket' => [ + 'title' => __('ticket') . '|' . __('tickets'), + ], 'user' => [ 'title' => __('user') . '|' . __('users'), 'avatar' => [ diff --git a/public/userList.php b/public/userList.php index 5f3bb8ab2e..a44ebf7fad 100644 --- a/public/userList.php +++ b/public/userList.php @@ -33,7 +33,7 @@
"; - echo "All Users"; + echo "" . __res('user'); if ($permissionName != null) { echo " » $permissionName"; @@ -45,7 +45,7 @@ echo "
"; echo "
"; - echo "

User List:

"; + echo "

" . __res('user') . "

"; echo "

Filter: "; @@ -94,7 +94,7 @@ } echo "User"; echo "Points"; - echo "Num Achievements Earned"; + echo "Achievements"; echo "Last Login"; echo ""; diff --git a/public/viewforum.php b/public/viewforum.php index 8b59f574dd..a6dc843d03 100644 --- a/public/viewforum.php +++ b/public/viewforum.php @@ -25,14 +25,14 @@ $viewingUnauthorisedForumLinks = true; $thisForumID = 0; - $thisForumTitle = "Unauthorised Links"; - $thisForumDescription = "Unauthorised Links"; + $thisForumTitle = "Forum Verification"; + $thisForumDescription = "Unverified Posts"; $thisCategoryID = 0; - $thisCategoryName = "Unauthorised Links"; + $thisCategoryName = null; $topicList = $unofficialLinks; - $requestedForum = "Unauthorised Links"; + $requestedForum = "Forum Verification"; } else { if (!getForumDetails($requestedForumID, $forumDataOut)) { abort(404); @@ -63,13 +63,15 @@ "; echo "Forum Index"; - echo " » $thisCategoryName"; + if ($thisCategoryName) { + echo " » $thisCategoryName"; + } echo " » $requestedForum"; echo "

"; if ($numUnofficialLinks > 0) { echo "
"; - echo "Administrator Notice: $numUnofficialLinks unofficial posts need authorising: please verify them!"; + echo "Administrator Notice: $numUnofficialLinks unverified posts need authorising: please verify them!"; echo "
"; } diff --git a/resources/css/app.css b/resources/css/app.css index 9ec8e92eba..dac0cb5edb 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -20,6 +20,7 @@ @import "button.css"; @import "carousel.css"; @import "chart.css"; +@import "dropdown.css"; @import "embed.css"; @import "footer.css"; @import "form.css"; diff --git a/resources/css/dropdown.css b/resources/css/dropdown.css new file mode 100644 index 0000000000..67929c15e1 --- /dev/null +++ b/resources/css/dropdown.css @@ -0,0 +1,69 @@ +.dropdown { + position: relative; + z-index: 11; +} + +.dropdown-menu { + display: none; + position: absolute; + left: 0; + margin: 0; + background-color: var(--embed-highlight-color); + box-shadow: var(--box-shadow-color) 0 30px 60px -12px, var(--box-shadow-color) 0px 18px 36px -18px; +} + +.dropdown-menu-right { + left: auto; + right: 0; +} + +.dropdown:hover > .dropdown-menu, +.dropdown:focus-within > .dropdown-menu { + display: block; +} + +.dropdown-column:not(:last-child) { + border-right: 1px solid var(--divider-color); +} + +.dropdown-item { + display: flex; + align-items: center; + @apply gap-x-2; + color: var(--menu-link-color); + line-height: 1.4em; + width: 250px; + text-align: left; + margin: 0; + padding: 4px 12px; + border: none; + border-radius: 0; +} + +.dropdown-item:last-child { + margin-bottom: 4px; +} + +.dropdown-item:hover { + color: var(--link-color); + background: var(--embed-color); +} + +.dropdown-item:hover > ul { + display: block; + position: absolute; + left: 105px; + top: 0; +} + +.dropdown-header { + padding: 0 12px; + margin-top: 8px; + text-align: center; + color: var(--text-color); +} + +.dropdown-divider { + border-bottom: 1px solid var(--divider-color); + margin: 2px 10px; +} diff --git a/resources/css/nav.css b/resources/css/nav.css index 3d83987fb0..1e0d4856ac 100644 --- a/resources/css/nav.css +++ b/resources/css/nav.css @@ -1,149 +1,37 @@ -#innermenu { +nav { + /*padding-left: 1em; + padding-right: 1em;*/ position: relative; - margin: auto; /*overflow:hidden; this breaks the dropdown! :S*/ - border-radius: 4px; + /*border-radius: 4px;*/ + background-color: var(--embed-color); } -#innermenu li.divider { - border-bottom: 1px solid var(--menu-link-color); - margin-left: 10px; - margin-right: 10px; - margin-top: 2px; - margin-bottom: 2px; +.nav-item { + position: relative; + line-height: 20px; + height: 42px; /* Only for main menu elements for mobile to make tap space */ } -#innermenu > ul > li > a { - display: block; +.nav-link { + display: inline-flex; + align-items: center; text-decoration: none; color: var(--menu-link-color); - /*font-size: 1.2em;*/ height: 42px; - line-height: 42px; - text-align: center; border-bottom: 0; overflow: hidden; padding-left: 10px; padding-right: 10px; } -#innermenu > ul { - background-color: var(--embed-color); - padding-left: 1em; - list-style: none; -} - -#innermenu > ul > li { - float: left; - position: relative; - height: 22px; - line-height: 20px; -} - -#innermenu > ul > li { - height: 42px; /* Only for main menu elements for mobile to make tap space */ -} - -#innermenu > ul > li > div { - display: none; - position: absolute; - top: 42px; - left: 0; - margin: 0; - - /* Use Tailwind z-index sane defaults rather than a magic number. */ - @apply z-20; -} - -#innermenu > ul > li > div > ul > li:last-child { - margin-bottom: 4px; -} - -#innermenu > ul > li:hover > a { +.nav-item:hover > .nav-link { color: var(--menu-link-color); background-color: var(--embed-highlight-color); -} - -#innermenu > ul > li:hover > div { - background-color: var(--embed-highlight-color); - box-shadow: var(--box-shadow-color) 0 30px 60px -12px, var(--box-shadow-color) 0px 18px 36px -18px; -} - -@media all and (max-width: 549px) { - #innermenu > ul > li:hover > div { - display: block; - } -} - -@media all and (min-width: 550px) { - #innermenu > ul > li:hover > div { - display: flex; - } -} - -#innermenu > ul > li:hover > div > ul { - margin: 0; - padding: 0; -} - -#innermenu > ul > li:hover > div > ul:not(:last-child) { - border-right: 1px solid var(--embed-color); -} - -#innermenu > ul > li:hover > div > ul > li > ul { - display: none; -} - -#innermenu > ul > li > a > img { - position: relative; - top: 4px; - left: 2px; -} - -#innermenu > ul > li:hover > div > ul > li > a, -#innermenu > ul > li:hover > div > ul > li button { - display: block; - color: var(--menu-link-color); - line-height: 1.4em; - width: 200px; - text-align: left; - margin: 0; - padding: 4px 12px; - border: none; - border-radius: 0; - font-size: 10px; -} - -#innermenu > ul > li:hover > div > ul { - padding: 0; -} - -#innermenu > ul > li:hover > a.nosub { -} - -#innermenu > ul > li:hover > a { position: relative; } -#innermenu > ul > li:hover > div > ul > .selected { - margin-right: 1px; -} - -#innermenu > ul > li:hover > div > ul > li > a:hover, -#innermenu > ul > li:hover > div > ul > li button:hover { - color: var(--link-color); - background: var(--embed-color); -} - -#innermenu > ul > li:hover > div > ul > li:hover > ul { - display: block; - position: absolute; - left: 105px; - top: 0; -} - -.dropdown-header { - padding: 0 12px; - text-align: center; - color: var(--text-color); +/* TODO what is this for? */ +.dropdown-menu > ul { + display: none; } diff --git a/resources/css/search.css b/resources/css/search.css index 366193b77e..4790014d74 100644 --- a/resources/css/search.css +++ b/resources/css/search.css @@ -8,10 +8,6 @@ float: inherit; } -#searchboxinput .longer { - width: 80%; -} - .searchbox-top { background-color: var(--embed-color); border-radius: 4px; @@ -19,25 +15,22 @@ .searchbox-top .searchboxinput { border: none; - padding: 10px 10px 10px 20px; background-color: transparent; vertical-align: top; color: inherit; + width: 60px; + padding-left: 0; + margin-right: 2px; } -.searchbox-top .btn { - border: none; - background-color: transparent; - color: #FFF; - padding: 5px 15px; - height: 42px; - font-size: 16px; +.searchbox-top .searchboxinput:focus { + width: 190px; + padding-left: 10px; } -@media only screen and (max-width: 1023px) { - .searchbox-top { - width: 100%; - display: flex; - justify-content: space-between; +@media only screen and (max-width: 375px) { + .searchbox-top .searchboxinput:focus { + width: 150px; + padding-left: 10px; } } diff --git a/resources/css/theme.css b/resources/css/theme.css index d2fdf19547..f6fc6b081f 100644 --- a/resources/css/theme.css +++ b/resources/css/theme.css @@ -49,6 +49,7 @@ a:hover { --text-color: rgb(200, 200, 200); --text-color-danger: rgb(255, 0, 0); --text-color-muted: rgb(75, 75, 75); + --divider-color: rgb(90, 90, 90); } [data-scheme="black"] { @@ -60,6 +61,7 @@ a:hover { --heading-color: rgb(200, 200, 200); --menu-link-color: rgb(190, 190, 190); --text-color: rgb(190, 190, 190); + --divider-color: rgb(70, 70, 70); } [data-scheme="light"] { @@ -76,6 +78,7 @@ a:hover { --menu-link-hover-color: rgb(0, 0, 0); --text-color: rgb(66, 66, 66); --text-color-muted: rgb(130, 130, 130); + --divider-color: rgb(190, 190, 190); } /* Theme */ diff --git a/resources/css/typography.css b/resources/css/typography.css index d9620e6100..b999ae9740 100644 --- a/resources/css/typography.css +++ b/resources/css/typography.css @@ -39,3 +39,7 @@ abbr { overflow-wrap: anywhere; word-break: normal; } + +.text-color { + color: var(--text-color); +} diff --git a/resources/views/community/components/news/carousel-item.blade.php b/resources/views/community/components/news/carousel-item.blade.php index 7e9583bbef..ec7fd4560f 100644 --- a/resources/views/community/components/news/carousel-item.blade.php +++ b/resources/views/community/components/news/carousel-item.blade.php @@ -5,8 +5,16 @@ class="relative box-content flex w-full flex-none snap-start min-h-[270px]" {{ $index === 0 ? 'id=first-news-item' : '' }} {{ $index === $totalCount - 1 ? 'id=last-news-item' : '' }} > -
+

@@ -22,13 +30,4 @@ class="z-10 py-6 px-8 absolute top-0 left-0 w-full h-full" {{ $news->Timestamp->format('M j, Y') }}

- - {{ $news->Title }} cover image - \ No newline at end of file + diff --git a/resources/views/community/components/news/carousel-scroll-buttons.blade.php b/resources/views/community/components/news/carousel-scroll-buttons.blade.php index 72f53216cf..dfa6fadba3 100644 --- a/resources/views/community/components/news/carousel-scroll-buttons.blade.php +++ b/resources/views/community/components/news/carousel-scroll-buttons.blade.php @@ -2,12 +2,12 @@ $buttonClassNames = << - - \ No newline at end of file + diff --git a/resources/views/components/dropdown-header.blade.php b/resources/views/components/dropdown-header.blade.php index 8f8b4785ba..30f8e2d5ce 100644 --- a/resources/views/components/dropdown-header.blade.php +++ b/resources/views/components/dropdown-header.blade.php @@ -1 +1 @@ - + diff --git a/resources/views/components/dropdown-item.blade.php b/resources/views/components/dropdown-item.blade.php index 4e7a695eaa..4d48622896 100644 --- a/resources/views/components/dropdown-item.blade.php +++ b/resources/views/components/dropdown-item.blade.php @@ -1,12 +1,12 @@ @if($link ?? false) - {{ $slot }} @else - + {{ $slot }} @endif diff --git a/resources/views/components/dropdown.blade.php b/resources/views/components/dropdown.blade.php new file mode 100644 index 0000000000..d0805e49db --- /dev/null +++ b/resources/views/components/dropdown.blade.php @@ -0,0 +1,18 @@ + + diff --git a/resources/views/components/link.blade.php b/resources/views/components/link.blade.php index 6786d33b0e..40a4768ab4 100644 --- a/resources/views/components/link.blade.php +++ b/resources/views/components/link.blade.php @@ -5,7 +5,7 @@ $external ??= !Str::startsWith($link ?? null, config('app.url')); $active ??= Str::startsWith(url()->current(), $link ?? null); ?> - + {{ $slot }} @if($external ?? false) diff --git a/resources/views/components/menu/account.blade.php b/resources/views/components/menu/account.blade.php index 43509f9de7..e20ed56a01 100644 --- a/resources/views/components/menu/account.blade.php +++ b/resources/views/components/menu/account.blade.php @@ -1,49 +1,79 @@ -{{--@guest +user(); +?> +@guest -@endguest--}} +@endguest @auth - - {{----}} + + + + + + {{ $user->username }} + {{ __res('profile', 1) }} + @if($user->ContribCount > 0 || $user->Permissions >= Permissions::JuniorDeveloper) + + @if($user->ContribCount > 0) + Developer Profile + Tickets + Sets + @endif + @if($user->Permissions >= Permissions::JuniorDeveloper) + Claims + @endif + @endif + + Unlocked Achievements + Requested Sets + {{--History--}} + History + {{--{{ __res('follower') }}--}} + Following + {{--{{ __('Inbox') }}--}} + Messages + + Reorder Site Awards + {{--{{ __res('setting') }}--}} + Settings + + {{----}} + + + + @endauth -{{--
  • - Offline -
  • --}} diff --git a/resources/views/components/menu/main.blade.php b/resources/views/components/menu/main.blade.php index af246dde48..278959b00f 100644 --- a/resources/views/components/menu/main.blade.php +++ b/resources/views/components/menu/main.blade.php @@ -3,16 +3,164 @@ * used for mobile presentation where dropdowns won't work in horizontally scrollable navbars */ $mobile ??= false; + +$menuSystemsList = [ + [ + "Nintendo" => [ + ["systemName" => "Game Boy", "listID" => 4], + ["systemName" => "Game Boy Color", "listID" => 6], + ["systemName" => "Game Boy Advance", "listID" => 5], + ["systemName" => "NES/Famicom", "listID" => 7], + ["systemName" => "SNES/Super Famicom", "listID" => 3], + ["systemName" => "Nintendo 64", "listID" => 2], + ["systemName" => "Nintendo DS", "listID" => 18], + ["systemName" => "Nintendo DSi", "listID" => 78], + ["systemName" => "Pokemon Mini", "listID" => 24], + ["systemName" => "Virtual Boy", "listID" => 28], + ], + "Sony" => [ + ["systemName" => "PlayStation", "listID" => 12], + ["systemName" => "PlayStation 2", "listID" => 21], + ["systemName" => "PlayStation Portable", "listID" => 41], + ], + "Atari" => [ + ["systemName" => "Atari 2600", "listID" => 25], + ["systemName" => "Atari 7800", "listID" => 51], + ["systemName" => "Atari Jaguar", "listID" => 17], + ["systemName" => "Atari Jaguar CD", "listID" => 77], + ["systemName" => "Atari Lynx", "listID" => 13], + ], + ], + [ + "Sega" => [ + ["systemName" => "SG-1000", "listID" => 33], + ["systemName" => "Master System", "listID" => 11], + ["systemName" => "Game Gear", "listID" => 15], + ["systemName" => "Genesis/Mega Drive", "listID" => 1], + ["systemName" => "Sega CD", "listID" => 9], + ["systemName" => "Sega 32X", "listID" => 10], + ["systemName" => "Sega Saturn", "listID" => 39], + ["systemName" => "Sega Dreamcast", "listID" => 40], + ], + "NEC" => [ + ["systemName" => "PC Engine/TurboGrafx-16", "listID" => 8], + ["systemName" => "PC Engine CD/TurboGrafx-CD", "listID" => 76], + ["systemName" => "PC-8000/8800", "listID" => 47], + ["systemName" => "PC-FX", "listID" => 49], + ], + ], + [ + "Other" => [ + ["systemName" => "3DO Interactive Multiplayer", "listID" => 43], + ["systemName" => "Amstrad CPC", "listID" => 37], + ["systemName" => "Apple II", "listID" => 38], + ["systemName" => "Arcade", "listID" => 27], + ["systemName" => "Arcadia 2001", "listID" => 73], + ["systemName" => "Arduboy", "listID" => 71], + ["systemName" => "ColecoVision", "listID" => 44], + ["systemName" => "Elektor TV Games Computer", "listID" => 75], + ["systemName" => "Fairchild Channel F", "listID" => 57], + ["systemName" => "Intellivision", "listID" => 45], + ["systemName" => "Interton VC 4000", "listID" => 74], + ["systemName" => "Magnavox Odyssey 2", "listID" => 23], + ["systemName" => "Mega Duck", "listID" => 69], + ["systemName" => "MSX", "listID" => 29], + ["systemName" => "Neo Geo Pocket", "listID" => 14], + ["systemName" => "Uzebox", "listID" => 80], + ["systemName" => "Vectrex", "listID" => 46], + ["systemName" => "WASM-4", "listID" => 72], + ["systemName" => "Watara Supervision", "listID" => 63], + ["systemName" => "WonderSwan", "listID" => 53], + ], + + ], +]; ?> -{{----}} -
    - -
    +{{-- + + + +@if(!$mobile) + {{ __('Downloads') }} + {{ __('Tools') }} +@endif +--}} + + + + + +
    + @foreach ($menuSystemsList as $column) + + @endforeach + +
    +
    + + + + + + All Achievements + + {{--Commonly Won Achievements--}} + Easy Achievements + Hardest Achievements + + + + + + + Forums + Event Forums + Recent Forum Posts + + {{ __res('user') }} + Global Ranking + Recent Masteries + Developer Stats + + RANews + RAGuides Wiki + + User Documentation + Developer Documentation + + + + + diff --git a/resources/views/components/menu/management.blade.php b/resources/views/components/menu/management.blade.php index 9c899e9f6f..e8e22f6cc4 100644 --- a/resources/views/components/menu/management.blade.php +++ b/resources/views/components/menu/management.blade.php @@ -1,83 +1,85 @@ - + {{--@can('viewRouteUsage') + + Route Usage + + + @endcan--}} + {{--@can('viewSyncStatus') + + Sync Status + + @endcan--}} + {{--@can('viewWebSocketsDashboard') + + Web Sockets + + + @endcan--}} + @endcan + diff --git a/resources/views/components/menu/search.blade.php b/resources/views/components/menu/search.blade.php index f72141f391..9bf70f173e 100644 --- a/resources/views/components/menu/search.blade.php +++ b/resources/views/components/menu/search.blade.php @@ -1,9 +1,9 @@ {{--@if(!Route::is('search')) - + @@ -15,6 +15,6 @@ } ?>
    - - + +
    diff --git a/resources/views/components/nav-dropdown.blade.php b/resources/views/components/nav-dropdown.blade.php index 7c9bf1a8aa..2ebb2c8553 100644 --- a/resources/views/components/nav-dropdown.blade.php +++ b/resources/views/components/nav-dropdown.blade.php @@ -1,21 +1,10 @@ - - + + {{ $trigger }} + {{ $slot }} + diff --git a/resources/views/components/nav-item.blade.php b/resources/views/components/nav-item.blade.php index 7f521b288c..4ea35c7171 100644 --- a/resources/views/components/nav-item.blade.php +++ b/resources/views/components/nav-item.blade.php @@ -1,5 +1,5 @@ - + diff --git a/resources/views/layouts/components/navbar.blade.php b/resources/views/components/navbar.blade.php similarity index 56% rename from resources/views/layouts/components/navbar.blade.php rename to resources/views/components/navbar.blade.php index d508f63402..b3b8cb394a 100644 --- a/resources/views/layouts/components/navbar.blade.php +++ b/resources/views/components/navbar.blade.php @@ -1,9 +1,8 @@ {{--