undercloud / picojade
Simple Jade parser
dev-master
2016-04-10 20:29 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-12-28 07:54:29 UTC
README
Basic Jade Parser
##install
composer require undercloud/picojade
##usage
require 'vendor/autoload.php'; $jade = new Undercloud\PicoJade; $template = file_get_contents(__DIR__ . '/index.jade'); echo $jade->compile($template);
##doctype
!!! 5
Avail values
- 5
- xml
- default
- transitional
- strict
- frameset
- 1.1
- basic
- mobile
##comment
<!-- html comment -->
//single comment
// multi line comment
##tag
h1 Header
#block
.classname
div#block.classname.another
##single
input(type="checkbox" value="self closing" checked)
foo(data-src="force closing")/
a(href="http://link.to"): img(src="/path/to") Link with image and text
##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" ?>