Skip to content

Commit

Permalink
chore: admin css
Browse files Browse the repository at this point in the history
  • Loading branch information
apple-x-co committed Jul 24, 2024
1 parent 483b113 commit 208bd79
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions source/app/env.dist.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "./env.schema.json",
"BASE_URL": "http://localhost",
"CLOUDFLARE_TURNSTILE_SECRET_KEY": "",
"CLOUDFLARE_TURNSTILE_SITE_KEY": "",
"DB_DSN": "mysql:host=aura-mysql:3306;dbname=aura_db",
Expand Down
4 changes: 4 additions & 0 deletions source/app/env.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"BASE_URL": {
"type": "string"
},
"CLOUDFLARE_TURNSTILE_SECRET_KEY": {
"type": "string",
"description": "Cloudflare Turnstile secret key"
Expand Down Expand Up @@ -34,6 +37,7 @@
}
},
"required": [
"BASE_URL",
"CLOUDFLARE_TURNSTILE_SECRET_KEY",
"CLOUDFLARE_TURNSTILE_SITE_KEY",
"DB_DSN",
Expand Down
4 changes: 2 additions & 2 deletions source/app/public/admin-src/scss/main.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[data-xxx="1"] {
color: lightgray;
body {
font-family: 'Roboto', 'Noto Sans JP', sans-serif;
}
2 changes: 1 addition & 1 deletion source/app/public/admin/css/bundle.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[data-xxx="1"]{color:#d3d3d3}
body{font-family:"Roboto","Noto Sans JP",sans-serif}
2 changes: 2 additions & 0 deletions source/app/src/DiBinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function __invoke(string $appDir, string $tmpDir): Container
$di = $builder->newInstance(true); // NOTE: "$di->types['xxx']" を使うために有効化

$di->values['timestamp'] = time();
$di->values['baseUrl'] = getenv('BASE_URL');
$di->values['pdoDsn'] = getenv('DB_DSN');
$di->values['pdoUsername'] = getenv('DB_USER');
$di->values['pdoPassword'] = getenv('DB_PASS');
Expand Down Expand Up @@ -129,6 +130,7 @@ private function renderer(Container $di, string $appDir): void
);
});
$di->params[QiqRenderer::class]['data'] = $di->lazyArray([
'baseUrl' => $di->lazyValue('baseUrl'),
'timestamp' => $di->lazyValue('timestamp'),
]);
$di->set(QiqRenderer::class, $di->lazyNew(QiqRenderer::class));
Expand Down
3 changes: 2 additions & 1 deletion source/app/var/qiq/template/layout/Admin/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex">
<meta name="theme-color" content="#ffffff">
<link rel="icon" href="/admin/images/favicon.svg" type="image/svg+xml">
<link rel="icon" href="{{= $baseUrl }}/admin/images/favicon.svg" type="image/svg+xml">
{{ setBlock ('head_meta') }}{{= getBlock () ~}}
{{ setBlock ('head_styles') }}
<link href="{{= $baseUrl }}/admin/css/bundle.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+JP:100|Noto+Sans+JP:400|Noto+Sans+JP:700|Noto+Sans+JP:900|Roboto:100|Roboto:400|Roboto:700|Roboto:900&display=swap&subset=japanese" rel="stylesheet">
{{= getBlock () ~}}
{{ setBlock ('head_scripts') }}
Expand Down

0 comments on commit 208bd79

Please sign in to comment.