Skip to content

Commit

Permalink
feat: refactor topbar
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jan 23, 2024
1 parent fdfa07f commit 79a688f
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RockFrontend.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,15 +390,15 @@ public function addTopBar(&$html)
if ($this->wire->config->hideTopBar) return;

/** @var RockMigrations $rm */
$less = __DIR__ . "/bar/bar.less";
$less = __DIR__ . "/topbar/topbar.less";
/** @var RockMigrations $rm */
$rm = $this->wire->modules->get('RockMigrations');
if ($rm) $rm->saveCSS($less, minify: true);
$css = $this->toUrl(__DIR__ . "/bar/bar.min.css", true);
$css = $this->toUrl(__DIR__ . "/topbar/topbar.min.css", true);
$style = "<link rel='stylesheet' href='$css'>";
$html = str_replace("</head", "$style</head", $html);

$topbar = $this->wire->files->render(__DIR__ . "/bar/topbar.php", [
$topbar = $this->wire->files->render(__DIR__ . "/topbar/topbar.php", [
'rf' => $this,
'logourl' => $this->toUrl(__DIR__ . "/RockFrontend.svg", true),
'z' => is_int($this->topbarz) ? $this->topbarz : 999,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 79a688f

Please sign in to comment.