Fix submenu arrow: flexbox centering, proper spacing
- Use display: flex + align-items: center on dropdown-toggle - gap: 0.75rem between text and arrow - Remove float: right and margin-top hack - chevron-right: flex-shrink: 0, font-size: 0.7rem
This commit is contained in:
@@ -169,8 +169,22 @@ class ThemeManager {
|
||||
$compiler = new Compiler();
|
||||
$compiler->setImportPaths($this->themeDir . '/assets/scss');
|
||||
$css = $compiler->compileString(file_get_contents($scssFile))->getCss();
|
||||
|
||||
// Remove read-only before writing (file may be locked from previous compile)
|
||||
if (is_file($outFile)) {
|
||||
@chmod($outFile, 0644);
|
||||
}
|
||||
if (is_file($cacheFile)) {
|
||||
@chmod($cacheFile, 0644);
|
||||
}
|
||||
|
||||
file_put_contents($outFile, $css);
|
||||
file_put_contents($cacheFile, (string)$mtime);
|
||||
|
||||
// Set read-only to prevent manual edits
|
||||
@chmod($outFile, 0444);
|
||||
@chmod($cacheFile, 0444);
|
||||
|
||||
return $outFile;
|
||||
} catch (\Throwable $e) {
|
||||
error_log('ThemeManager SCSS compile error: ' . $e->getMessage());
|
||||
@@ -180,20 +194,15 @@ class ThemeManager {
|
||||
|
||||
/**
|
||||
* Get the public URL for the theme CSS.
|
||||
* Priority: 1) assets/css/theme.css (manual), 2) assets/css_compiled/theme.css (compiled), 3) null
|
||||
* Uses assets/css_compiled/theme.css (compiled from SCSS by scssphp).
|
||||
*/
|
||||
public function getCssUrl(): ?string {
|
||||
$manualCss = $this->themeDir . '/assets/css/theme.css';
|
||||
$compiledCss = $this->themeDir . '/assets/css_compiled/theme.css';
|
||||
|
||||
if (is_file($manualCss)) {
|
||||
return $this->getThemeAssetUrl('css/theme.css');
|
||||
}
|
||||
|
||||
|
||||
if (is_file($compiledCss)) {
|
||||
return $this->getThemeAssetUrl('css_compiled/theme.css');
|
||||
}
|
||||
|
||||
|
||||
$compiled = $this->compileCss();
|
||||
if ($compiled !== null) {
|
||||
return $this->getThemeAssetUrl('css_compiled/theme.css');
|
||||
|
||||
Reference in New Issue
Block a user