Skip to content

Commit

Permalink
Merge pull request #50 from bembelimen/magic-variable
Browse files Browse the repository at this point in the history
Magic variable
  • Loading branch information
nadjak77 authored Feb 13, 2019
2 parents eed44e3 + 27b77d5 commit 6a21b47
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
15 changes: 10 additions & 5 deletions administrator/templates/atum/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,32 @@

if ($this->params->get('bg-dark'))
{
$root[] = '--bg-dark: ' . $this->params->get('bg-dark') . ';';
$root[] = '--atum-bg-dark: ' . $this->params->get('bg-dark') . ';';
}

if ($this->params->get('bg-light'))
{
$root[] = '--bg-light: ' . $this->params->get('bg-light') . ';';
$root[] = '--atum-bg-light: ' . $this->params->get('bg-light') . ';';
}

if ($this->params->get('text-dark'))
{
$root[] = '--text-dark: ' . $this->params->get('text-dark') . ';';
$root[] = '--atum-text-dark: ' . $this->params->get('text-dark') . ';';
}

if ($this->params->get('text-light'))
{
$root[] = '--text-light: ' . $this->params->get('text-light') . ';';
$root[] = '--atum-text-light: ' . $this->params->get('text-light') . ';';
}

if ($this->params->get('link-color'))
{
$root[] = '--link-color: ' . $this->params->get('link-color') . ';';
$root[] = '--atum-link-color: ' . $this->params->get('link-color') . ';';
}

if ($this->params->get('special-color'))
{
$root[] = '--atum-special-color: ' . $this->params->get('special-color') . ';';
}

if (count($root))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ TPL_ATUM_COLORS_SETTINGS_BG_LIGHT_LABEL="Light Background"
TPL_ATUM_COLORS_SETTINGS_TEXT_DARK_LABEL="Dark Text"
TPL_ATUM_COLORS_SETTINGS_TEXT_LIGHT_LABEL="Light Text"
TPL_ATUM_COLORS_SETTINGS_LINK_COLOR_LABEL="Link Color"
TPL_ATUM_COLORS_SETTINGS_SPECIAL_COLOR_LABEL="Special Color"
TPL_ATUM_LOGIN_SIDEBAR_VIEW_WEBSITE="view website"
TPL_ATUM_LOGIN_SITE_TITLE="%s - Administrator Login"
TPL_ATUM_MENU="MENU"
Expand Down
5 changes: 5 additions & 0 deletions administrator/templates/atum/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@
$root[] = '--atum-link-color: ' . $this->params->get('link-color') . ';';
}

if ($this->params->get('special-color'))
{
$root[] = '--atum-special-color: ' . $this->params->get('special-color') . ';';
}

if (count($root))
{
$css .= ':root {' . implode($root) . '}';
Expand Down
7 changes: 7 additions & 0 deletions administrator/templates/atum/templateDetails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@
default="#6f7780"
filter="color"
/>
<field
name="special-color"
type="color"
label="TPL_ATUM_COLORS_SETTINGS_SPECIAL_COLOR_LABEL"
default="#1a466b"
filter="color"
/>
</fieldset>
<fieldset name="images" label="TPL_ATUM_IMAGES_SETTINGS_LABEL">

Expand Down

0 comments on commit 6a21b47

Please sign in to comment.