Fixed rhpz.org
This commit is contained in:
@@ -19,10 +19,14 @@ class ShortLinkController extends Controller
|
|||||||
'l' => 'lua-scripts',
|
'l' => 'lua-scripts',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function index(){
|
||||||
|
return response()->redirectToRoute('home');
|
||||||
|
}
|
||||||
|
|
||||||
public function legacy( int $wpId )
|
public function legacy( int $wpId )
|
||||||
{
|
{
|
||||||
$log = DB::table('migrations_logs')
|
$log = DB::table('migrations_logs')
|
||||||
->where('source_system')
|
->where('source_system', 'wp')
|
||||||
->whereIn('source_table', ['wp_posts', 'wp_posts__news'] )
|
->whereIn('source_table', ['wp_posts', 'wp_posts__news'] )
|
||||||
->where('source_id', $wpId)
|
->where('source_id', $wpId)
|
||||||
->first(['target_table', 'target_id']);
|
->first(['target_table', 'target_id']);
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ use Spatie\Activitylog\Support\LogOptions;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Author whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Author whereUpdatedAt($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Author whereUserId($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Author whereUserId($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Author whereWebsite($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Author whereWebsite($value)
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Spatie\Activitylog\Models\Activity> $activitiesAsSubject
|
||||||
|
* @property-read int|null $activities_as_subject_count
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Author extends Model
|
class Author extends Model
|
||||||
|
|||||||
@@ -105,6 +105,11 @@ use Spatie\Activitylog\Support\LogOptions;
|
|||||||
* @property-read float $average_rating
|
* @property-read float $average_rating
|
||||||
* @property-read int $reviews_count_cached
|
* @property-read int $reviews_count_cached
|
||||||
* @property-read string $description_html
|
* @property-read string $description_html
|
||||||
|
* @property int $nsfw
|
||||||
|
* @property int $old_download_count
|
||||||
|
* @property-read int $total_downloads
|
||||||
|
* @method static Builder<static>|Entry whereNsfw($value)
|
||||||
|
* @method static Builder<static>|Entry whereOldDownloadCount($value)
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Entry extends Model
|
class Entry extends Model
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ use Spatie\Activitylog\Support\LogOptions;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|EntryReview withTrashed(bool $withTrashed = true)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|EntryReview withTrashed(bool $withTrashed = true)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|EntryReview withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|EntryReview withoutTrashed()
|
||||||
* @property-read string $description_html
|
* @property-read string $description_html
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Spatie\Activitylog\Models\Activity> $activitiesAsSubject
|
||||||
|
* @property-read int|null $activities_as_subject_count
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class EntryReview extends Model
|
class EntryReview extends Model
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ use Spatie\Activitylog\Support\LogOptions;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Game wherePlatformId($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Game wherePlatformId($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Game whereSlug($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Game whereSlug($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Game whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Game whereUpdatedAt($value)
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Spatie\Activitylog\Models\Activity> $activitiesAsSubject
|
||||||
|
* @property-read int|null $activities_as_subject_count
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Game extends Model
|
class Game extends Model
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Level whereName($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Level whereName($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Level whereSlug($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Level whereSlug($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Level whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Level whereUpdatedAt($value)
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Entry> $entries
|
||||||
|
* @property-read int|null $entries_count
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Level extends Model
|
class Level extends Model
|
||||||
|
|||||||
@@ -100,6 +100,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|LogXfUser whereVisible($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|LogXfUser whereVisible($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|LogXfUser whereVoteScore($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|LogXfUser whereVoteScore($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|LogXfUser whereWarningPoints($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|LogXfUser whereWarningPoints($value)
|
||||||
|
* @property int $nsfw_content
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|LogXfUser whereNsfwContent($value)
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class LogXfUser extends Model
|
class LogXfUser extends Model
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Modification whereName($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Modification whereName($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Modification whereSlug($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Modification whereSlug($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Modification whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Modification whereUpdatedAt($value)
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Entry> $entries
|
||||||
|
* @property-read int|null $entries_count
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Modification extends Model
|
class Modification extends Model
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ use Spatie\Activitylog\Support\LogOptions;
|
|||||||
* @method static Builder<static>|News whereYoutubeLink($value)
|
* @method static Builder<static>|News whereYoutubeLink($value)
|
||||||
* @method static Builder<static>|News withTrashed(bool $withTrashed = true)
|
* @method static Builder<static>|News withTrashed(bool $withTrashed = true)
|
||||||
* @method static Builder<static>|News withoutTrashed()
|
* @method static Builder<static>|News withoutTrashed()
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Spatie\Activitylog\Models\Activity> $activitiesAsSubject
|
||||||
|
* @property-read int|null $activities_as_subject_count
|
||||||
|
* @property-read string $description_html
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class News extends Model
|
class News extends Model
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
@import './base/variables.css';
|
@import './base/variables.css';
|
||||||
@import './base/reset.css';
|
@import './base/reset.css';
|
||||||
|
@import 'theme-overrides.css';
|
||||||
|
|
||||||
@import './layout/menu.css';
|
@import './layout/menu.css';
|
||||||
@import './layout/content.css';
|
@import './layout/content.css';
|
||||||
|
|||||||
12
resources/css/theme-overrides.css
Normal file
12
resources/css/theme-overrides.css
Normal file
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
<div class="entry-card">
|
<div class="entry-card">
|
||||||
<div class="entry-cover-wrapper">
|
<div class="entry-cover-wrapper">
|
||||||
<span class="entry-badge">{{ $entry->getRealPlatform()?->name ?? 'Unknown' }}</span>
|
<a href="{{ route('entries.show', [ 'section' => $entry->type, 'entry' => $entry ] ) }}">
|
||||||
@if( $entry->main_image )
|
<span class="entry-badge">{{ $entry->getRealPlatform()?->name ?? 'Unknown' }}</span>
|
||||||
<img src="{{ Storage::url($entry->main_image) }}">
|
@if( $entry->main_image )
|
||||||
@else
|
<img src="{{ Storage::url($entry->main_image) }}">
|
||||||
<i data-lucide="image" size="40" color="var(--border)"></i>
|
@else
|
||||||
@endif
|
<i data-lucide="image" size="40" color="var(--border)"></i>
|
||||||
|
@endif
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="entry-card-info">
|
<div class="entry-card-info">
|
||||||
<a href="{{ route('entries.show', [ 'section' => $entry->type, 'entry' => $entry ] ) }}" class="entry-card-title">{{ $entry->title ?? $entry->complete_title }}</a>
|
<a href="{{ route('entries.show', [ 'section' => $entry->type, 'entry' => $entry ] ) }}" class="entry-card-title">{{ $entry->title ?? $entry->complete_title }}</a>
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ Route::name('redirect.')->controller(\App\Http\Controllers\RedirectController::c
|
|||||||
|
|
||||||
// ShortLinkController
|
// ShortLinkController
|
||||||
Route::domain('rhpz.org')->name('shorturl.')->controller(\App\Http\Controllers\ShortLinkController::class)->group(function () {
|
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('/{id}', 'legacy' )->where('id', '[0-9]+')->name('legacy');
|
||||||
Route::get('/{letter}/{id}', 'redirect' )->where(['letter' => '[a-z]', 'id' => '[0-9]+'])->name('redirect');
|
Route::get('/{letter}/{id}', 'redirect' )->where(['letter' => '[a-z]', 'id' => '[0-9]+'])->name('redirect');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user