mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Convert resource loading code into a method of Template class
This commit is contained in:
parent
55cafc5c33
commit
012dbb9ab7
6 changed files with 227 additions and 225 deletions
5
tests/_data/template/css/style.scss
Normal file
5
tests/_data/template/css/style.scss
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.foo {
|
||||
.bar {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
|
||||
<div><?php (function($__dir, $__path, $__vars = null) { $__tpl = new \Rhymix\Framework\Template($__dir, $__path, "html"); if ($__vars) $__tpl->setVars($__vars); echo $__tpl->compile(); })("common/tpl", 'refresh.html'); ?></div>
|
||||
<div><?php \Context::loadJavascriptPlugin('ckeditor'); ?></div>
|
||||
<?php \Context::loadFile(['./tests/_data/template/css/style.css', 'print', '', '', []]); ?>
|
||||
<div><?php $this->_v2_loadResource('^/common/js/plugins/ckeditor/'); ?></div>
|
||||
<?php $this->_v2_loadResource('css/style.scss', 'print', '', []); ?>
|
||||
|
||||
<?php
|
||||
$__Context->foo = 'FOOFOOFOO';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
@use('Rhymix\Framework\Push', 'Push')
|
||||
<div>@include('^/common/tpl/refresh.html')</div>
|
||||
<div>@load('^/common/js/plugins/ckeditor/')</div>
|
||||
<load src="css/style.css" media="print" />
|
||||
<load src="css/style.scss" media="print" />
|
||||
|
||||
<?php
|
||||
$foo = 'FOOFOOFOO';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue