diff --git a/PicoUICard.php b/PicoUICard.php index d702902..cc77af5 100644 --- a/PicoUICard.php +++ b/PicoUICard.php @@ -146,7 +146,10 @@ final class PicoUICard extends AbstractPicoPlugin public function onPageRendered(&$output) { // regular pages + // add css to end of $output = str_replace('', ($this->buildExtraHeaders() . ''), $output); + // add js to end of + $output = str_replace('', ($this->buildExtraFooters() . ''), $output); } /** @@ -157,7 +160,6 @@ final class PicoUICard extends AbstractPicoPlugin // if set to true, load from bootstrap cdn if ($this->config['loadBootstrap'] === true) { $headers .= PHP_EOL.''; - $headers .= PHP_EOL.''; } // now set up card css classes $headers .= ' @@ -178,4 +180,16 @@ a.pico-ui-card-container_internal { display: block; padding: 10px; } '; return $headers; } + + /** + * Add some extra footer tags we need. + */ + private function buildExtraFooters() { + $footers = ''; + // if set to true, load from bootstrap cdn + if ($this->config['loadBootstrap'] === true) { + $footers .= PHP_EOL.''.PHP_EOL; + } + return $footers; + } }