Skip to content

Commit

Permalink
issue #268: fixed menu font shadow settings
Browse files Browse the repository at this point in the history
  • Loading branch information
YaWK committed Feb 20, 2022
1 parent a1ca71d commit 14e6b18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions system/classes/AdminLTE.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ function drawHtmlBody(){
*/
function drawHtmlLogo($db, $lang)
{ // check, if URL or personal text should be displayed...
if ($this->backendLayout === "layout-top-nav"){
if ($this->backendLayout == "layout-top-nav"){
return null;
}
if (settings::getSetting($db, "backendLogoUrl") === "1")
if (settings::getSetting($db, "backendLogoUrl") == "1")
{ // URL is requested, -> get hostname (project URL)
$host = settings::getSetting($db, "host");
$chars = (strlen($host));
Expand All @@ -286,7 +286,7 @@ function drawHtmlLogo($db, $lang)
}
}
else
{ // personal text requestet, -> get logo text + subtext
{ // personal text requested, -> get logo text + subtext
$logoText = "<b>". settings::getSetting($db, "backendLogoText")."</b>";
$logoText .= settings::getSetting($db, "backendLogoSubText");
}
Expand All @@ -305,7 +305,7 @@ function drawHtmlLogo($db, $lang)
* @return null
*/
function drawHtmlNavbar(){
if ($this->backendLayout === "layout-top-nav"){
if ($this->backendLayout == "layout-top-nav"){
echo "
<nav class=\"navbar navbar-static-top\" role=\"navigation\">
<div class=\"container\">
Expand Down Expand Up @@ -1206,7 +1206,7 @@ function drawHtmlContentBreadcrumbs(){
}

/**
* @brief output the html content - depending wheter its a plugin or a static admin page
* @brief output the html content - depending on whether it's a plugin or a static admin page
* @param object $db Database object
* @param object $lang Language object
* @param object $user User object - not in use atm, check this!
Expand Down
8 changes: 5 additions & 3 deletions system/classes/bootstrap4.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class bootstrap4 extends \YAWK\FRAMEWORK\cssFramework
* @brief Call all the methods to set bootstrap 4 custom css and return it as string.
* @return string|null
*/
public function init()
public function init(): ?string
{
// set css tags for Bootstrap 4
$this->bs4_CardsCss();
Expand Down Expand Up @@ -972,6 +972,7 @@ public function bs4_navbarCss()
border-style: ".$this->tplSettings['navbar-borderstyle'].";
border-width: ".$this->tplSettings['navbar-bordersize'].";
border-color: #".$this->tplSettings['border-menubgcolor'].";
text-shadow: ".$this->tplSettings['globaltext-fontshadowsize']." #".$this->tplSettings['fontshadow-menucolor'].";
}
.navbar-bg-custom {
Expand All @@ -994,6 +995,7 @@ public function bs4_navbarCss()
.navbar-brand {
color: #".$this->tplSettings['brand-menucolor'].";
text-shadow: ".$this->tplSettings['globaltext-fontshadowsize']." #".$this->tplSettings['fontshadow-menucolor'].";
}
.navbar-brand:hover, .navbar-brand:focus {
Expand Down Expand Up @@ -1035,8 +1037,8 @@ public function bs4_navbarCss()
// to avoid encoding errors, the icon bars will be held in this variable:
$svg = "data:image/svg+xml;charset=utf8,%3Csvg%20viewBox='0 0 30 30'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20stroke='%23".$this->tplSettings['iconbar-menubgcolor']."'%20stroke-width='2'%20stroke-linecap='round'%20stroke-miterlimit='10'%20d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E";

// css goes on with custom toggle icon
$this->cssCode .= "
// css goes on with custom toggle icon
$this->cssCode .= "
.navbar-light .custom-toggler .navbar-toggler-icon {
background-image: url(\"".$svg."\");
}";
Expand Down

0 comments on commit 14e6b18

Please sign in to comment.