forked from are0h/TheBadSpace
CSS Reshuffle, Added Page Renderer
Reorganized the CSS structure to there is some seperation between front facing style and the backend den. Also add the Render class so auth status is included in every template rendering event so login status and select member data is available if needed. will expand if needed.symfony-version
parent
26f3cbe994
commit
735117fcda
@ -0,0 +1,27 @@
|
||||
section[role="loc-index"] {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
section[role="loc-index"] img {
|
||||
width: 150px;
|
||||
vertical-align: top;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
section[role="loc-index"] label {
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
section[role="loc-index"] input {
|
||||
width: 290px;
|
||||
}
|
||||
|
||||
section[role="loc-index"] textarea {
|
||||
width: 290px;
|
||||
padding: 5px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
section[role="loc-index"] select {
|
||||
width: 150px;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
@import "../global/colors.css";
|
||||
@import "../global/forms.css";
|
||||
@import "../global/typography.css";
|
||||
@import "../global/frame.css";
|
||||
@import "../global/icons.css";
|
||||
@import "locations.css";
|
||||
@import "index.css";
|
@ -1,6 +1,7 @@
|
||||
@import url("colors.css");
|
||||
@import url("forms.css");
|
||||
@import url("typography.css");
|
||||
@import url("frame.css");
|
||||
@import url("index.css");
|
||||
@import url("index-den.css");
|
||||
@import "../global/colors.css";
|
||||
@import "../global/forms.css";
|
||||
@import "../global/typography.css";
|
||||
@import "../global/frame.css";
|
||||
@import "../global/icons.css";
|
||||
|
||||
@import "index.css";
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
|
||||
class Render extends AbstractController
|
||||
{
|
||||
private $auth;
|
||||
|
||||
public function __construct(Auth $auth)
|
||||
{
|
||||
$this->auth = $auth;
|
||||
}
|
||||
|
||||
public function page($options, $title, $template)
|
||||
{
|
||||
$loggedIn = false;
|
||||
$role = 0;
|
||||
$handle = "Random Person";
|
||||
$result = $this->auth->status();
|
||||
if ($result["status"]) {
|
||||
$loggedIn = $result["status"];
|
||||
$handle = $result["handle"];
|
||||
$role = $result["role"];
|
||||
}
|
||||
return $this->render($template, [
|
||||
"title" => $title,
|
||||
"loggedIn" => $loggedIn,
|
||||
"handle" => $handle,
|
||||
"role" => $role,
|
||||
"options" => $options,
|
||||
]);
|
||||
}
|
||||
}
|
@ -1,16 +1,30 @@
|
||||
{% extends "base/frame.twig" %}
|
||||
{% block stylesheets %}
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/front/start.css?=dfadf">
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/back/start.css?=qwert">
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<section role="den-login">
|
||||
<h1>This is the Den</h1><br/>
|
||||
{% if notice is defined %}
|
||||
<div role="system-notice">
|
||||
{{ notice }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ include("forms/login-form.twig") }}
|
||||
</section>
|
||||
{% if loggedIn %}
|
||||
<section role="den-index">
|
||||
<h1>
|
||||
Welcome to the Den,
|
||||
{{ handle }}
|
||||
|
||||
</h1>
|
||||
Remember to pace yourself because you're working with some of the worse places on the web. Drink water, takes lot of breaks and remember you are the reason the interent is becoming safer.
|
||||
</section>
|
||||
|
||||
{% else %}
|
||||
<section role="den-login">
|
||||
<h1>This is the Den</h1><br/>
|
||||
{% if notice is defined %}
|
||||
<div role="system-notice">
|
||||
{{ notice }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ include("forms/login-form.twig") }}
|
||||
</section>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -1,14 +0,0 @@
|
||||
{% extends "base/frame.twig" %}
|
||||
{% block stylesheets %}
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/front/start.css?=dfdferer">
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<section role="den-index">
|
||||
<h1>
|
||||
Welcome to the Den.
|
||||
|
||||
</h1>
|
||||
Remember to pace yourself because you're working with some of the worse places on the web. Drink water, takes lot of breaks and remember you are the reason the interent is becoming safer.
|
||||
</section>
|
||||
{% endblock %}
|
@ -1,10 +0,0 @@
|
||||
{% extends "base/frame.twig" %}
|
||||
{% block stylesheets %}
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/front/start.css?=sdfsdf">
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<section role="intro">
|
||||
This is where you login
|
||||
</section>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue