Add table-based legacy design
This commit is contained in:
parent
429314efba
commit
57bb0e03a3
35 changed files with 886 additions and 526 deletions
15
app/Helpers/LegacyHelper.php
Normal file
15
app/Helpers/LegacyHelper.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
if (!function_exists('isLegacy')) {
|
||||
/**
|
||||
* Checks if the current hostname should return the legacy site
|
||||
* @return bool
|
||||
*/
|
||||
function isLegacy(): bool {
|
||||
return (
|
||||
request()->getHost() === "legacy.wah.moe" || // Accessed via legacy.wah.moe domain
|
||||
str_starts_with(request()->getHost(), "192.168") || // Accessed via local IP address
|
||||
!request()->hasHeader("Host") // Browser does not send Host header (e.g. NCSA MOSAIC)
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue