Skip to content

Commit 85145e5

Browse files
authored
Merge pull request #57 from eurofurence/hotfix/migration_theme_script
2 parents 8a8fe45 + ba48b4a commit 85145e5

File tree

6 files changed

+57
-6
lines changed

6 files changed

+57
-6
lines changed

config/config.default.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
],
151151

152152
// Default theme, 1 = theme1.scss etc.
153-
'theme' => env('THEME', 1),
153+
'theme' => env('THEME', 20),
154154

155155
// Supported themes
156156
// To disable a theme in config.php, you can set its value to null
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Engelsystem\Migrations;
6+
7+
use Engelsystem\Database\Migration\Migration;
8+
use Illuminate\Database\Connection;
9+
use Illuminate\Database\Schema\Builder as SchemaBuilder;
10+
11+
class UpdateGlobalTheme extends Migration
12+
{
13+
// ------------------------------------------------------------
14+
// Groups
15+
// ------------------------------------------------------------
16+
protected int $NewThemeID = 20;
17+
protected int $DefaultThemeID = 1;
18+
19+
protected Connection $db;
20+
21+
public function __construct(SchemaBuilder $schema)
22+
{
23+
parent::__construct($schema);
24+
$this->db = $this->schema->getConnection();
25+
}
26+
27+
/**
28+
* Run the migration
29+
*/
30+
public function up(): void
31+
{
32+
$this->db->table('users_settings')
33+
->where(column: 'theme', operator: '!=', value: $this->NewThemeID)
34+
->update([
35+
'theme' => $this->NewThemeID,
36+
]);
37+
}
38+
39+
/**
40+
* Reverse the migration
41+
*/
42+
public function down(): void
43+
{
44+
$this->db->table('users_settings')
45+
->where(column: 'theme', operator: '!=', value: $this->DefaultThemeID)
46+
->update([
47+
'theme' => $this->DefaultThemeID,
48+
]);
49+
50+
}
51+
}

resources/assets/themes/theme18.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ body {
155155
}
156156
}
157157

158-
.navbar.navbar-default {
159-
background: rgba(0, 0, 0, 0.8);
160-
backdrop-filter: blur(6px);
158+
.bg-black {
159+
background-color: rgba(0, 0, 0, 0.7) !important;
160+
backdrop-filter: blur(3px);
161161
}
162162

163163
.navbar-brand {
0 Bytes
Loading

resources/assets/themes/theme19.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ h6,
4949
}
5050

5151
.bg-light {
52-
background-color: rgba(190, 255, 190, 0.7) !important;
53-
backdrop-filter: blur(2px);
52+
background-color: rgba(224, 255, 226, 0.7) !important;
53+
backdrop-filter: blur(3px);
5454
}
5555

5656
.border-bottom {
3 KB
Loading

0 commit comments

Comments
 (0)