Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sielay/everzetjadebundle
HAML-like templates for Symfony2
https://github.com/sielay/everzetjadebundle
Last synced: about 1 month ago
JSON representation
HAML-like templates for Symfony2
- Host: GitHub
- URL: https://github.com/sielay/everzetjadebundle
- Owner: sielay
- License: mit
- Fork: true (relo-san/EverzetJadeBundle)
- Created: 2014-07-24T13:31:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-27T16:54:49.000Z (over 10 years ago)
- Last Synced: 2024-09-29T07:40:11.775Z (about 1 month ago)
- Language: PHP
- Homepage: http://everzet.com/jade.php
- Size: 193 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Provides Jade.php templates support for your Symfony2 project.
See [Jade.php site](http://everzet.com/jade.php) & [repository](http://github.com/everzet/jade.php) for more info.## Features
- high performance parser
- great readability
- contextual error reporting at compile & run time
- combine dynamic and static tag classes
- no tag prefix
- clear & beautiful HTML output
- filters
- :php
- :cdata
- :css
- :javascript
- [TextMate Bundle](http://github.com/miksago/jade-tmbundle)
- [VIM Plugin](http://github.com/vim-scripts/jade.vim.git)## Installation
## Add bundle to your composer
// composer.json
{
...
"sielay/jadebundle" : "dev-master"
}
### Update your composer//
composer update### Add EverzetJadeBundle to your application kernel
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new Bundle\Everzet\JadeBundle\EverzetJadeBundle(),
// ...
);
}### Turn on jade bundle in application config
# app/config/config.yml
jade.config: ~## Write templates
Write jade templates as you do with php, but suffix them with `.jade` extension:
# Application/HelloBundle/Resources/views/Hello/index.jade
- $view->extend('HelloBundle::layout.jade')h2
| Hello {{ $name }}!!!# Application/HelloBundle/Resources/views/layout.jade
!!! strict
html
head
meta( http-equiv:"Content-Type", content="text/html; charset=utf-8" )
title
- $view['slots']->output('title', 'Hello Application')
body
h1 Hello Application- $view['slots']->output('_content')
Then you could render them like this:
return $this->render('HelloBundle:Hello:index.jade', array('name' => $name));
## CREDITS
List of developers who contributed:
- Konstantin Kudryashov ([email protected])
- Lukasz Marek Sielski ([email protected])