|
@@ 590-602 (lines=13) @@
|
| 587 |
|
* |
| 588 |
|
* @return void|string |
| 589 |
|
*/ |
| 590 |
|
static public function markup_document_css(array $args, Engine $engine, $template) |
| 591 |
|
{ |
| 592 |
|
$document = \Brickrouge\get_document(); |
| 593 |
|
|
| 594 |
|
if (isset($args['href'])) |
| 595 |
|
{ |
| 596 |
|
$document->css->add($args['href'], $args['weight'], dirname($engine->get_file())); |
| 597 |
|
|
| 598 |
|
return null; |
| 599 |
|
} |
| 600 |
|
|
| 601 |
|
return $template ? $engine($template, $document->css) : (string) $document->css; |
| 602 |
|
} |
| 603 |
|
|
| 604 |
|
/** |
| 605 |
|
* JavaScript assets can be collected and rendered into `SCRIPT` elements with the `p:document:js` |
|
@@ 641-653 (lines=13) @@
|
| 638 |
|
* |
| 639 |
|
* @return void|string |
| 640 |
|
*/ |
| 641 |
|
static public function markup_document_js(array $args, Engine $engine, $template) |
| 642 |
|
{ |
| 643 |
|
$document = \Brickrouge\get_document(); |
| 644 |
|
|
| 645 |
|
if (isset($args['href'])) |
| 646 |
|
{ |
| 647 |
|
$document->js->add($args['href'], $args['weight'], dirname($engine->get_file())); |
| 648 |
|
|
| 649 |
|
return null; |
| 650 |
|
} |
| 651 |
|
|
| 652 |
|
return $template ? $engine($template, $document->js) : (string) $document->js; |
| 653 |
|
} |
| 654 |
|
|
| 655 |
|
/* |
| 656 |
|
* ICanBoogie |