Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/scss/_login.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@use 'variables' as *;

.bg-primary-variant {
background-color: $tertiary;
color: $tertiary-text;
background-color: var(--loginPageBackground, #{$tertiary});
color: var(--loginPageTextColor, #{$tertiary-text});

&::before {
content: '';
Expand Down Expand Up @@ -137,7 +137,7 @@
}

.linkInForm {
color: $tertiary-text;
color: var(--loginPageTextColor, #{$tertiary-text});
}


Expand Down
4 changes: 2 additions & 2 deletions assets/scss/_sidepanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
flex-direction: column;
align-items: center;
justify-content: center;
color: $black;
color: var(--sidePanelItemColor, #{$black});
transition: width .5s ease;
text-decoration: none;

Expand Down Expand Up @@ -124,7 +124,7 @@
justify-content: flex-start;
flex-direction: row;
text-decoration: none;
color: $black;
color: var(--sidePanelItemColor, #{$black});
align-items: center;
text-align: left;
gap: 10px;
Expand Down
6 changes: 6 additions & 0 deletions src/DI/FancyAdminExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ public function getConfigSchema(): Schema
'inputBorder' => Expect::string()->required(),
'inputFocusBorder' => Expect::string()->required(),
'inputFocusBackground' => Expect::string()->required(),
// Nepovinne barvy. Pri null si _sidepanel.scss / _login.scss / layout
// drzi puvodni hodnoty, takze existujici projekty se nemeni.
'sidePanelItemColor' => Expect::string()->nullable()->default(null),
'textColor' => Expect::string()->nullable()->default(null),
'loginPageBackground' => Expect::string()->nullable()->default(null),
'loginPageTextColor' => Expect::string()->nullable()->default(null),
]),
]);
}
Expand Down
14 changes: 14 additions & 0 deletions src/UI/Presenters/@layout.latte
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@
--inputBorder: {$colors['inputBorder']|noescape};
--inputFocusBorder: {$colors['inputFocusBorder']|noescape};
--inputFocusBackground: {$colors['inputFocusBackground']|noescape};
{if !empty($colors['sidePanelItemColor'])}
--sidePanelItemColor: {$colors['sidePanelItemColor']|noescape};
{/if}
{if !empty($colors['textColor'])}
--bs-body-color: {$colors['textColor']|noescape};
--bs-heading-color: {$colors['textColor']|noescape};
{/if}
{if !empty($colors['loginPageBackground'])}
--loginPageBackground: {$colors['loginPageBackground']|noescape};
{/if}
{if !empty($colors['loginPageTextColor'])}
--loginPageTextColor: {$colors['loginPageTextColor']|noescape};
{/if}
}
</style>
{/if}
Expand All @@ -52,6 +65,7 @@

<body
data-app-body
data-project="{$project}"
data-adt-js-components="{$jsComponentsConfig}"
data-adt-messaging
data-adt-translate
Expand Down
1 change: 1 addition & 0 deletions src/UI/Presenters/BasePresenterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ protected function beforeRender(): void
$this->getTemplate()->loginPageLogoPath = $this->_fancyAdmin->getLoginPageLogoPath();
$this->getTemplate()->hmr = $this->_fancyAdmin->getHmr();
$this->getTemplate()->projectName = $this->_fancyAdmin->getProjectName();
$this->getTemplate()->project = $this->_fancyAdmin->getProject();
$this->getTemplate()->colors = $this->_fancyAdmin->getColors();
$this->_jsComponents->setComponents($this->_fancyAdmin->getJsComponentsConfig());
$this->_jsComponents->setFirebaseLink('setFirebaseTokenLink', $this->getPresenter()->link('setFirebaseToken!', ['firebaseToken' => '__firebaseToken__']));
Expand Down