Remove template check and force it based on selected web and move templates based on the new names

This commit is contained in:
Repflez 2018-12-01 13:36:44 -07:00
commit 48b2c53175
No known key found for this signature in database
GPG key ID: D6948E99FDBD23BB
68 changed files with 115 additions and 119 deletions

View file

@ -22,12 +22,15 @@ Router::init();
switch ($_SERVER['SERVER_NAME']) {
case config('sites.3ds'):
$template = '3ds';
require_once path('routes/3ds.php');
break;
case config('sites.wiiu'):
$template = 'wiiu';
require_once path('routes/wiiu.php');
break;
case config('sites.web'):
$template = 'web';
require_once path('routes/web.php');
break;
default:

View file

@ -26,14 +26,7 @@ ConsoleAuth::check();
Translation::init();
// Set base variables
$templateBases = [
'ctr',
'portal',
'offdevice',
];
Template::set($templateBases[ConsoleAuth::$paramPack['platform_id']]);
Template::set($template);
Template::vars([
'get' => $_GET,
'user' => CurrentSession::$user,

View file

@ -1,5 +1,5 @@
{% set class = 'community-top platform-' ~ console.id %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
<div class="title-header text-header">

View file

@ -1,5 +1,5 @@
{% set class = 'community-top platform-' ~ console.id %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
<div class="category-header">

View file

@ -1,4 +1,4 @@
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
<div id="header">
@ -16,4 +16,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
<div id="header">
@ -16,4 +16,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
<div id="header">
@ -8,7 +8,7 @@
</h1>
</div>
</div>
<div class="body-content">
<div class="no-content-window">
<div class="window">
@ -17,4 +17,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
<div id="welcome-3ds_start" class="start-page slide-page" data-slide-number="1" style="">
@ -71,4 +71,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
<div id="welcome-start" class="guest-page">
@ -17,4 +17,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,5 +1,5 @@
{% set class = 'activity' %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
<div class="title-header text-header">
@ -30,4 +30,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,5 +1,5 @@
{% set class = 'news-page' %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
<div class="title-header text-header">
@ -63,4 +63,4 @@
{% endif %}
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,5 +1,5 @@
{% set class = 'add-post-page' %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
{% set id,title_id = hashid(community.id), hashid(community.title_id) %}
@ -97,4 +97,4 @@
</form>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,5 +1,5 @@
{% set class = 'post-permalink' %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
{% set id,title_id,post_id = hashid(post.community.id), hashid(post.community.titleID), hashid(post.id) %}

View file

@ -1,5 +1,5 @@
{% set class = 'add-post-page' %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
{% set id,title_id = hashid(meta.id), hashid(meta.title_id) %}
@ -107,4 +107,4 @@
</form>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,5 +1,5 @@
{% set class = 'add-post-page' %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
{% set id,title_id = hashid(meta.id), hashid(meta.title_id) %}
@ -106,4 +106,4 @@
</form>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,5 +1,5 @@
{% set class = 'add-post-page' %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
{% set id,title_id = hashid(meta.id), hashid(meta.title_id) %}
@ -240,4 +240,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,5 +1,5 @@
{% set class = 'add-post-page' %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
{% set id,title_id = hashid(meta.id), hashid(meta.title_id) %}
@ -120,4 +120,4 @@
</form>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,5 +1,5 @@
{% set class = 'community-post-list' %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
{% set id,title_id = hashid(meta.id), hashid(meta.title_id) %}
@ -104,4 +104,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,5 +1,5 @@
{% set class = 'community-post-list' %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
{% set id,title_id = hashid(meta.id), hashid(meta.title_id) %}
@ -173,4 +173,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,5 +1,5 @@
{% set class = 'user-page' %}
{% extends '@ctr/_master.twig' %}
{% extends '@3ds/_master.twig' %}
{% block content %}
<div id="user-content-container">
@ -56,4 +56,4 @@
<p>In progress, stay tuned!</p>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@offdevice/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@offdevice/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@offdevice/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@offdevice/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@offdevice/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@offdevice/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@offdevice/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,6 +0,0 @@
{% set class = 'community-top guest' %}
{% extends '@offdevice/_master.twig' %}
{% block content %}
Redesigned communities are unsupported on offdevice at this time! Sorry.
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@offdevice/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@portal/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@portal/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@portal/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@portal/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@portal/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@portal/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@portal/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@portal/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,4 +0,0 @@
{% extends '@portal/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@web/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@web/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@web/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,5 +1,5 @@
{% set class = 'community-top guest' %}
{% extends '@offdevice/_master.twig' %}
{% extends '@web/_master.twig' %}
{% block content %}
<div class="body-content" id="community-top">
@ -87,4 +87,4 @@
</ul>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@web/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@web/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@web/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@web/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -1,5 +1,5 @@
{% set class = 'community-top guest' %}
{% extends '@offdevice/_master.twig' %}
{% extends '@web/_master.twig' %}
{% block content %}
{% set id,title_id = hashid(meta.id), hashid(meta.title_id) %}

View file

@ -0,0 +1,6 @@
{% set class = 'community-top guest' %}
{% extends '@web/_master.twig' %}
{% block content %}
Redesigned communities are unsupported on web at this time! Sorry.
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@web/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@wiiu/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@wiiu/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@wiiu/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@wiiu/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@wiiu/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@wiiu/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@wiiu/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@wiiu/_master.twig' %}
{% block content %}
{% endblock %}

View file

@ -0,0 +1,4 @@
{% extends '@wiiu/_master.twig' %}
{% block content %}
{% endblock %}