Add styles

This commit is contained in:
Dennis Eichhorn 2017-06-24 10:51:49 +02:00
parent fe1922ac1a
commit 8940a9e5a1
5 changed files with 77 additions and 0 deletions

View File

@ -13,6 +13,36 @@
"permission": null,
"parent": 1003301001,
"children": [
{
"id": 1006002001,
"pid": "c3ebc146eec492fbcf5ed5d9d43ca6d0cc253583",
"type": 3,
"subtype": 1,
"name": "QA",
"uri": "{/base}/{/lang}/backend/qa/dashboard?{?}",
"target": "self",
"icon": null,
"order": 1,
"from": "QA",
"permission": null,
"parent": 1006001001,
"children": []
},
{
"id": 1006003001,
"pid": "c3ebc146eec492fbcf5ed5d9d43ca6d0cc253583",
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/base}/{/lang}/backend/qa/create?{?}",
"target": "self",
"icon": null,
"order": 5,
"from": "QA",
"permission": null,
"parent": 1006001001,
"children": []
}
]
}
]

View File

@ -3,6 +3,12 @@
use phpOMS\Router\RouteVerb;
return [
'^.*/backend/qa.*$' => [
[
'dest' => '\Modules\QA\Controller:setUpBackend',
'verb' => RouteVerb::GET,
],
],
'^.*/backend/qa/dashboard.*$' => [
[
'dest' => '\Modules\QA\Controller:viewQADashboard',

View File

@ -79,6 +79,12 @@ class Controller extends ModuleAbstract implements WebInterface
protected static $dependencies = [
];
public function setUpBackend()
{
$head = $response->get('Content')->getData('head');
$head->addAsset(AssetType::CSS, $request->getUri()->getBase() . 'Modules/QA/Theme/Backend/styles.css');
}
/**
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response

8
Theme/Backend/styles.css Normal file
View File

@ -0,0 +1,8 @@
.qa-list .score.closed {
background: #f00; }
.qa-list .score.open {
background: #ff0; }
.qa-list .score.done {
background: #0f0; }
.qa-list h1 {
font-size: 2rem; }

27
Theme/Backend/styles.scss Normal file
View File

@ -0,0 +1,27 @@
.qa-list {
.score {
&.closed {
background: #f00;
}
&.open {
background: #ff0;
}
&.done {
background: #0f0;
}
}
h1 {
font-size: 2rem;
}
.date {
}
.user {
}
}