https://github.com/undercloud/picojade
PHP Jade parser
https://github.com/undercloud/picojade
Last synced: 11 months ago
JSON representation
PHP Jade parser
- Host: GitHub
- URL: https://github.com/undercloud/picojade
- Owner: undercloud
- Created: 2015-03-30T13:46:54.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-04-10T20:29:53.000Z (almost 10 years ago)
- Last Synced: 2025-01-31T00:18:05.019Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# picojade
Basic Jade Parser
##install
```composer require undercloud/picojade```
##usage
```PHP
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
``````
```//single comment```
```Jade
// 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```
```Jade
script.
if(true)
console.log("It's true")
```
##attr
```span(id="someid" class="classname" data-src="true")```
##php
```PHP
```