undercloud / picojade
简单的 Jade 解析器
dev-master
2016-04-10 20:29 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-08-28 07:07:01 UTC
README
基本 Jade 解析器
##安装 composer require undercloud/picojade
##使用
require 'vendor/autoload.php'; $jade = new Undercloud\PicoJade; $template = file_get_contents(__DIR__ . '/index.jade'); echo $jade->compile($template);
##doctype !!! 5
可用值
- 5
- xml
- 默认
- 过渡
- 严格
- 框架集
- 1.1
- 基本
- 移动
##comment <!-- html comment -->
//单行注释
// multi line comment
##tag h1 标题
#块
.类名
div#块.classname.another
##单 input(type="checkbox" value="self closing" checked)
foo(data-src="force closing")/
a(href="http://link.to"): img(src="/path/to") 带有图像和文本的链接
##text p Lorem ipsum
script. if(true) console.log("It's true")
##attr span(id="someid" class="classname" data-src="true")
##php
<?php $s = "Singleline php code" ?>