diff --git a/app/Http/Controllers/ShortLinkController.php b/app/Http/Controllers/ShortLinkController.php index 62ab9cf..89f217e 100644 --- a/app/Http/Controllers/ShortLinkController.php +++ b/app/Http/Controllers/ShortLinkController.php @@ -19,10 +19,14 @@ class ShortLinkController extends Controller 'l' => 'lua-scripts', ]; + public function index(){ + return response()->redirectToRoute('home'); + } + public function legacy( int $wpId ) { $log = DB::table('migrations_logs') - ->where('source_system') + ->where('source_system', 'wp') ->whereIn('source_table', ['wp_posts', 'wp_posts__news'] ) ->where('source_id', $wpId) ->first(['target_table', 'target_id']); diff --git a/app/Models/Author.php b/app/Models/Author.php index 4cc17fc..9a41ca1 100644 --- a/app/Models/Author.php +++ b/app/Models/Author.php @@ -30,6 +30,8 @@ use Spatie\Activitylog\Support\LogOptions; * @method static \Illuminate\Database\Eloquent\Builder|Author whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Author whereUserId($value) * @method static \Illuminate\Database\Eloquent\Builder|Author whereWebsite($value) + * @property-read \Illuminate\Database\Eloquent\Collection $activitiesAsSubject + * @property-read int|null $activities_as_subject_count * @mixin \Eloquent */ class Author extends Model diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 4ee1732..aa30a62 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -105,6 +105,11 @@ use Spatie\Activitylog\Support\LogOptions; * @property-read float $average_rating * @property-read int $reviews_count_cached * @property-read string $description_html + * @property int $nsfw + * @property int $old_download_count + * @property-read int $total_downloads + * @method static Builder|Entry whereNsfw($value) + * @method static Builder|Entry whereOldDownloadCount($value) * @mixin \Eloquent */ class Entry extends Model diff --git a/app/Models/EntryReview.php b/app/Models/EntryReview.php index 2b327f5..bb906ce 100644 --- a/app/Models/EntryReview.php +++ b/app/Models/EntryReview.php @@ -38,6 +38,8 @@ use Spatie\Activitylog\Support\LogOptions; * @method static \Illuminate\Database\Eloquent\Builder|EntryReview withTrashed(bool $withTrashed = true) * @method static \Illuminate\Database\Eloquent\Builder|EntryReview withoutTrashed() * @property-read string $description_html + * @property-read \Illuminate\Database\Eloquent\Collection $activitiesAsSubject + * @property-read int|null $activities_as_subject_count * @mixin \Eloquent */ class EntryReview extends Model diff --git a/app/Models/Game.php b/app/Models/Game.php index b7a501f..b6b706e 100644 --- a/app/Models/Game.php +++ b/app/Models/Game.php @@ -29,6 +29,8 @@ use Spatie\Activitylog\Support\LogOptions; * @method static \Illuminate\Database\Eloquent\Builder|Game wherePlatformId($value) * @method static \Illuminate\Database\Eloquent\Builder|Game whereSlug($value) * @method static \Illuminate\Database\Eloquent\Builder|Game whereUpdatedAt($value) + * @property-read \Illuminate\Database\Eloquent\Collection $activitiesAsSubject + * @property-read int|null $activities_as_subject_count * @mixin \Eloquent */ class Game extends Model diff --git a/app/Models/Level.php b/app/Models/Level.php index 4c111e5..ef16f5d 100644 --- a/app/Models/Level.php +++ b/app/Models/Level.php @@ -19,6 +19,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany; * @method static \Illuminate\Database\Eloquent\Builder|Level whereName($value) * @method static \Illuminate\Database\Eloquent\Builder|Level whereSlug($value) * @method static \Illuminate\Database\Eloquent\Builder|Level whereUpdatedAt($value) + * @property-read \Illuminate\Database\Eloquent\Collection $entries + * @property-read int|null $entries_count * @mixin \Eloquent */ class Level extends Model diff --git a/app/Models/LogXfUser.php b/app/Models/LogXfUser.php index def689a..618d428 100644 --- a/app/Models/LogXfUser.php +++ b/app/Models/LogXfUser.php @@ -100,6 +100,8 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|LogXfUser whereVisible($value) * @method static \Illuminate\Database\Eloquent\Builder|LogXfUser whereVoteScore($value) * @method static \Illuminate\Database\Eloquent\Builder|LogXfUser whereWarningPoints($value) + * @property int $nsfw_content + * @method static \Illuminate\Database\Eloquent\Builder|LogXfUser whereNsfwContent($value) * @mixin \Eloquent */ class LogXfUser extends Model diff --git a/app/Models/Modification.php b/app/Models/Modification.php index 37a43c9..dc3af65 100644 --- a/app/Models/Modification.php +++ b/app/Models/Modification.php @@ -20,6 +20,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany; * @method static \Illuminate\Database\Eloquent\Builder|Modification whereName($value) * @method static \Illuminate\Database\Eloquent\Builder|Modification whereSlug($value) * @method static \Illuminate\Database\Eloquent\Builder|Modification whereUpdatedAt($value) + * @property-read \Illuminate\Database\Eloquent\Collection $entries + * @property-read int|null $entries_count * @mixin \Eloquent */ class Modification extends Model diff --git a/app/Models/News.php b/app/Models/News.php index b820561..1bf6aed 100644 --- a/app/Models/News.php +++ b/app/Models/News.php @@ -58,6 +58,9 @@ use Spatie\Activitylog\Support\LogOptions; * @method static Builder|News whereYoutubeLink($value) * @method static Builder|News withTrashed(bool $withTrashed = true) * @method static Builder|News withoutTrashed() + * @property-read \Illuminate\Database\Eloquent\Collection $activitiesAsSubject + * @property-read int|null $activities_as_subject_count + * @property-read string $description_html * @mixin \Eloquent */ class News extends Model diff --git a/resources/css/app.css b/resources/css/app.css index fa6b501..9320ebb 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1,5 +1,6 @@ @import './base/variables.css'; @import './base/reset.css'; +@import 'theme-overrides.css'; @import './layout/menu.css'; @import './layout/content.css'; diff --git a/resources/css/theme-overrides.css b/resources/css/theme-overrides.css new file mode 100644 index 0000000..251bc93 --- /dev/null +++ b/resources/css/theme-overrides.css @@ -0,0 +1,12 @@ +.light-mode { + --fix-white: #fff; + .news-meta { + color: var(--fix-white) !important; + } + .news-header .news-actions .btn { + color: var(--fix-white) !important; + } + .entry-badge { + color: var(--fix-white) !important; + } +} diff --git a/resources/views/components/entry-card.blade.php b/resources/views/components/entry-card.blade.php index 392e383..1df652d 100644 --- a/resources/views/components/entry-card.blade.php +++ b/resources/views/components/entry-card.blade.php @@ -1,11 +1,13 @@
- {{ $entry->getRealPlatform()?->name ?? 'Unknown' }} - @if( $entry->main_image ) - - @else - - @endif + + {{ $entry->getRealPlatform()?->name ?? 'Unknown' }} + @if( $entry->main_image ) + + @else + + @endif +
{{ $entry->title ?? $entry->complete_title }} diff --git a/routes/web.php b/routes/web.php index dc1f315..bda14a0 100644 --- a/routes/web.php +++ b/routes/web.php @@ -137,6 +137,7 @@ Route::name('redirect.')->controller(\App\Http\Controllers\RedirectController::c // ShortLinkController Route::domain('rhpz.org')->name('shorturl.')->controller(\App\Http\Controllers\ShortLinkController::class)->group(function () { + Route::get('/', 'index' )->name('index'); Route::get('/{id}', 'legacy' )->where('id', '[0-9]+')->name('legacy'); Route::get('/{letter}/{id}', 'redirect' )->where(['letter' => '[a-z]', 'id' => '[0-9]+'])->name('redirect'); });