Skip to content

Commit

Permalink
GH-64: Fix missing style information if used in blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
magicsunday committed Nov 29, 2023
1 parent 2681acb commit 9d25f12
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion resources/views/layouts/ajax.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@ declare(strict_types=1);
use Fisharebest\Webtrees\View;

/**
* @var string $content The content to output
* @var string $content The content to output
* @var string[] $stylesheets The list of stylesheets
*/
?>

<?= $content ?>

<?php View::push('styles') ?>
<?php foreach ($stylesheets as $stylesheet) : ?>
<link rel="stylesheet" href="<?= e($stylesheet) ?>">
<?php endforeach ?>
<?php View::endpush(); ?>

<?= View::stack('styles') ?>
<?= View::stack('javascript') ?>
1 change: 1 addition & 0 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public function handle(ServerRequestInterface $request): ResponseInterface
'configuration' => $this->configuration,
'chartParams' => $this->getChartParameters(),
'exportStylesheets' => $this->getExportStylesheets(),
'stylesheets' => $this->getStylesheets(),
'javascript' => $this->assetUrl('js/pedigree-chart.min.js'),
]
);
Expand Down

0 comments on commit 9d25f12

Please sign in to comment.