├── source
├── javascripts
│ └── all.js
├── images
│ ├── background.png
│ └── middleman.png
├── home.php
├── test.php
├── layouts
│ └── layout.haml
└── stylesheets
│ ├── all.css
│ └── normalize.css
├── haml
├── home.haml
├── test.haml
└── layouts
│ └── layout.haml
├── smarty
├── test.php
├── includes
│ └── smarty.php
├── templates
│ ├── home.tpl
│ └── test.tpl
└── templates_c
│ ├── d50401fcbf1dbde1382d8d947701533b29ca46ee.file.home.tpl.php
│ └── 19a156ae4171149918b54a25b40e74346cbcfc90.file.debug.tpl.php
├── Gemfile
├── .gitignore
├── package.json
├── config.rb
├── Readme.md
├── Gruntfile.js
└── Gemfile.lock
/source/javascripts/all.js:
--------------------------------------------------------------------------------
1 | //= require_tree .
--------------------------------------------------------------------------------
/haml/home.haml:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout
3 | ---
4 |
5 | Bienvenue
6 |
--------------------------------------------------------------------------------
/source/images/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zog/smartyHaml/master/source/images/background.png
--------------------------------------------------------------------------------
/source/images/middleman.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zog/smartyHaml/master/source/images/middleman.png
--------------------------------------------------------------------------------
/source/home.php:
--------------------------------------------------------------------------------
1 | assign('title', "Test", true);
5 | $smarty->display('home.tpl');
6 | ?>
7 |
--------------------------------------------------------------------------------
/smarty/test.php:
--------------------------------------------------------------------------------
1 | assign('foo', ['Ned', 'Med', 'Sed', 'Red', 'Aed'], true);
5 | $smarty->assign('baz', ['Ned', 'Med', 'Sed', 'Red', 'Aed'], true);
6 | $smarty->display('test.tpl');
7 | ?>
8 |
--------------------------------------------------------------------------------
/source/test.php:
--------------------------------------------------------------------------------
1 | assign('foo', ['Ned', 'Med', 'Sed', 'Red', 'Aed'], true);
5 | $smarty->assign('baz', ['Ned', 'Med', 'Sed', 'Red', 'Aed'], true);
6 | $smarty->display('test.tpl');
7 |
8 | ?>
9 |
--------------------------------------------------------------------------------
/haml/test.haml:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout
3 | ---
4 |
5 | COUCOU
6 |
7 | - %w(foo baz pouet).each do |var|
8 | %h2= var
9 | %ul
10 | %foreach{var => :bar}
11 | %li
12 | = $bar
13 | %foreachelse
14 | = "$#{var} est vide"
15 |
16 | %for{i: [1..20], step: 3}
17 | Number
18 | = $i
19 | %br
20 |
21 | %ul
22 | %for{j: [1..3]}
23 | %li= $foo[$j]|lower|escape:javascript
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | # If you have OpenSSL installed, we recommend updating
2 | # the following line to use "https"
3 | source 'http://rubygems.org'
4 |
5 | gem "middleman", "~>3.1.5"
6 |
7 | # Live-reloading plugin
8 | gem "middleman-livereload", "~> 3.1.0"
9 |
10 | # For faster file watcher updates on Windows:
11 | gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
12 |
13 | # Cross-templating language block fix for Ruby 1.8
14 | platforms :mri_18 do
15 | gem "ruby18_source_location"
16 | end
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 | #
3 | # If you find yourself ignoring temporary files generated by your text editor
4 | # or operating system, you probably want to add a global ignore instead:
5 | # git config --global core.excludesfile ~/.gitignore_global
6 |
7 | # Ignore bundler config
8 | /.bundle
9 |
10 | # Ignore the build directory
11 | /build
12 |
13 | # Ignore Sass' cache
14 | /.sass-cache
15 |
16 | # Ignore .DS_store file
17 | .DS_Store
18 |
--------------------------------------------------------------------------------
/smarty/includes/smarty.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | require('/usr/local/lib/php/Smarty/Smarty.class.php');
4 | $smarty = new Smarty();
5 |
6 | $baseDir = "/Applications/MAMP/htdocs/foo/smarty/";
7 |
8 | $smarty->setTemplateDir($baseDir.'templates');
9 | $smarty->setCompileDir($baseDir.'templates_c');
10 | $smarty->setCacheDir($baseDir.'cache');
11 | $smarty->setConfigDir($baseDir.'configs');
12 |
13 | $smarty->caching = Smarty::CACHING_OFF;
14 | $smarty->force_compile = true;
15 | $smarty->debugging = false;
16 |
17 | ?>
18 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "smartyHaml",
3 | "version": "0.0.0",
4 | "description": "Haml to Smarty",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "grunt": "~0.4.2",
13 | "grunt-contrib-haml": "~0.1.1",
14 | "grunt-contrib-watch": "~0.5.3",
15 | "grunt-haml2smarty": "~0.0.1",
16 | "load-grunt-tasks": "~0.3.0",
17 | "grunt-contrib-clean": "~0.5.0",
18 | "grunt-exec": "~0.4.3"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/haml/layouts/layout.haml:
--------------------------------------------------------------------------------
1 | !!!5
2 | %head
3 | :sass
4 | body
5 | background: rgba(0, 40, 255, 0.2)
6 | color: white
7 | font-family: Helvetica, Arial
8 | margin: auto
9 | width: 500px
10 | border-left: 1px solid rgba(0, 40, 255, 0.4)
11 | border-right: 1px solid rgba(0, 40, 255, 0.4)
12 | padding: 10px 100px
13 | min-height: 100%
14 |
15 | footer
16 | font-size: 0.8em
17 | margin-top: 30px
18 | padding-top: 10px
19 | text-align: right
20 | border-top: 1px solid rgba(0, 40, 255, 0.1)
21 |
22 | html
23 | height: 100%
24 |
25 | %body
26 | %h1= $title
27 | = yield
28 | %footer
29 | brought to you with love by @zog
30 |
--------------------------------------------------------------------------------
/source/layouts/layout.haml:
--------------------------------------------------------------------------------
1 | !!!5
2 | %head
3 | :sass
4 | body
5 | background: rgba(0, 40, 255, 0.2)
6 | color: white
7 | font-family: Helvetica, Arial
8 | margin: auto
9 | width: 500px
10 | border-left: 1px solid rgba(0, 40, 255, 0.4)
11 | border-right: 1px solid rgba(0, 40, 255, 0.4)
12 | padding: 10px 100px
13 | min-height: 100%
14 |
15 | footer
16 | font-size: 0.8em
17 | margin-top: 30px
18 | padding-top: 10px
19 | text-align: right
20 | border-top: 1px solid rgba(0, 40, 255, 0.1)
21 |
22 | html
23 | height: 100%
24 |
25 | %body
26 | %h1= "{$title}"
27 | = yield
28 | %footer
29 | brought to you with love by @zog
--------------------------------------------------------------------------------
/smarty/templates/home.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
28 |
29 |
30 | {$title}
31 | Bienvenue
32 |
35 |
36 |
--------------------------------------------------------------------------------
/source/stylesheets/all.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 |
3 | body {
4 | background: #d4d4d4 url("../images/background.png");
5 | text-align: center;
6 | font-family: sans-serif; }
7 |
8 | h1 {
9 | color: rgba(0, 0, 0, .3);
10 | font-weight: bold;
11 | font-size: 32px;
12 | letter-spacing: -1px;
13 | text-transform: uppercase;
14 | text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
15 | background: url("../images/middleman.png") no-repeat center 100px;
16 | padding: 350px 0 10px;
17 | margin: 0; }
18 |
19 | .doc {
20 | font-size: 14px;
21 | margin: 0; }
22 | .doc:before,
23 | .doc:after {
24 | opacity: .2;
25 | padding: 6px;
26 | font-style: normal;
27 | position: relative;
28 | content: "•"; }
29 | .doc a {
30 | color: rgba(0, 0, 0, 0.3); }
31 | .doc a:hover {
32 | color: #666; }
33 |
34 | .welcome {
35 | -webkit-animation-name: welcome;
36 | -webkit-animation-duration: .9s; }
37 |
38 | @-webkit-keyframes welcome {
39 | from {
40 | -webkit-transform: scale(0);
41 | opacity: 0;
42 | }
43 | 50% {
44 | -webkit-transform: scale(0);
45 | opacity: 0;
46 | }
47 | 82.5% {
48 | -webkit-transform: scale(1.03);
49 | -webkit-animation-timing-function: ease-out;
50 | opacity: 1;
51 | }
52 | to {
53 | -webkit-transform: scale(1);
54 | }
55 | }
--------------------------------------------------------------------------------
/smarty/templates/test.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
28 |
29 |
30 | {$title}
31 | COUCOU
32 | foo
33 |
34 | {foreach $foo as $bar}
35 | -
36 | {$bar}
37 |
38 | {foreachelse}
39 | $foo est vide
40 | {/foreach}
41 |
42 | baz
43 |
44 | {foreach $baz as $bar}
45 | -
46 | {$bar}
47 |
48 | {foreachelse}
49 | $baz est vide
50 | {/foreach}
51 |
52 | pouet
53 |
54 | {foreach $pouet as $bar}
55 | -
56 | {$bar}
57 |
58 | {foreachelse}
59 | $pouet est vide
60 | {/foreach}
61 |
62 | {for $i=1 to 20 step 3}
63 | Number
64 | {$i}
65 |
66 | {/for}
67 |
68 | {for $j=1 to 3}
69 | - {$foo[$j]|lower|escape:javascript}
70 | {/for}
71 |
72 |
75 |
76 |
--------------------------------------------------------------------------------
/config.rb:
--------------------------------------------------------------------------------
1 | ###
2 | # Compass
3 | ###
4 |
5 | # Change Compass configuration
6 | # compass_config do |config|
7 | # config.output_style = :compact
8 | # end
9 |
10 | ###
11 | # Page options, layouts, aliases and proxies
12 | ###
13 |
14 | # Per-page layout changes:
15 | #
16 | # With no layout
17 | # page "/path/to/file.html", :layout => false
18 | #
19 | # With alternative layout
20 | # page "/path/to/file.html", :layout => :otherlayout
21 | #
22 | # A path which all have the same layout
23 | # with_layout :admin do
24 | # page "/admin/*"
25 | # end
26 |
27 | # Proxy pages (http://middlemanapp.com/dynamic-pages/)
28 | # proxy "/this-page-has-no-template.html", "/template-file.html", :locals => {
29 | # :which_fake_page => "Rendering a fake page with a local variable" }
30 |
31 | ###
32 | # Helpers
33 | ###
34 |
35 | # Automatic image dimensions on image_tag helper
36 | # activate :automatic_image_sizes
37 |
38 | # Reload the browser automatically whenever files change
39 | # activate :livereload
40 |
41 | # Methods defined in the helpers block are available in templates
42 | # helpers do
43 | # def some_helper
44 | # "Helping"
45 | # end
46 | # end
47 |
48 | set :css_dir, 'stylesheets'
49 |
50 | set :js_dir, 'javascripts'
51 |
52 | set :images_dir, 'images'
53 |
54 | # Build-specific configuration
55 | configure :build do
56 | # For example, change the Compass output style for deployment
57 | # activate :minify_css
58 |
59 | # Minify Javascript on build
60 | # activate :minify_javascript
61 |
62 | # Enable cache buster
63 | # activate :asset_hash
64 |
65 | # Use relative URLs
66 | # activate :relative_assets
67 |
68 | # set :haml, { :ugly => true, :format => :html5 }
69 |
70 | # Or use a different image path
71 | # set :http_prefix, "/Content/images/"
72 | end
73 |
--------------------------------------------------------------------------------
/Readme.md:
--------------------------------------------------------------------------------
1 | Haml 2 Smarty
2 | ============
3 |
4 | Introduction
5 | ------------
6 |
7 | This project aims at automating the creation of smarty templates using Haml.
8 |
9 | What You'll need
10 | ------------
11 |
12 | You'll need the current tools:
13 |
14 | + grunt
15 | + middleman
16 | + haml
17 |
18 | How it works
19 | -----------
20 |
21 | Haml files are processed through custom script to convert customs syntaxs to haml-friendly ones, then to smarty. Middleman is in charge of compiling the haml, providing all of its helpers.
22 |
23 | For example,
24 | > = $foo
25 |
26 | will be converted into
27 | > = "{$foo}"
28 |
29 | so that it's haml compliant, and will be resolved into
30 | > {$foo}
31 |
32 | which is a smarty instruction
33 |
34 | ### Custom syntaxes
35 | We introduce these new elements into haml syntax:
36 |
37 | #### Foreach
38 | > %foreach{:array => :var}
39 |
40 | > ...
41 |
42 |
43 | this will result in
44 | > {foreach $array as $var}
45 |
46 | > ...
47 |
48 | > {/foreach}
49 |
50 | In the same way, you can also use the
51 | > %foreachelse
52 |
53 | #### For
54 | > %for{i: [1..20], step: 3}
55 |
56 | > ...
57 |
58 | this will result in
59 | > {for $i=1 to 20 step 3}
60 |
61 | > ...
62 |
63 | > {/for}
64 |
65 | Note that the step is optional
66 |
67 | #### Smarty vars
68 | > = $foo
69 |
70 | will compile into
71 | > {$foo}
72 |
73 | ### What files should I edit ?
74 |
75 | The files that you might wanna change are located in the following directories:
76 |
77 | + _haml, haml/layouts_
78 |
79 | Here are the haml files that will be compiled into smarty templates
80 |
81 | + _source_
82 |
83 | In this folder, you'll find all the assets (css, image, js), as well as the php files which are in charge of setting smarty vars, and rendering smarty templates
84 |
85 | + _smarty/includes/smarty.php_
86 |
87 | The smarty config
88 |
89 | ### What files should I *NOT* edit ?
90 |
91 | The files in the _smarty/templates_ folder are compiled from the HAML files. There's no point in editing them.
92 |
93 |
94 |
--------------------------------------------------------------------------------
/smarty/templates_c/d50401fcbf1dbde1382d8d947701533b29ca46ee.file.home.tpl.php:
--------------------------------------------------------------------------------
1 |
3 | decodeProperties(array (
5 | 'file_dependency' =>
6 | array (
7 | 'd50401fcbf1dbde1382d8d947701533b29ca46ee' =>
8 | array (
9 | 0 => '/Applications/MAMP/htdocs/foo/smarty/templates/home.tpl',
10 | 1 => 1391159965,
11 | 2 => 'file',
12 | ),
13 | ),
14 | 'nocache_hash' => '139144700352eb6a9d3c3666-53593026',
15 | 'function' =>
16 | array (
17 | ),
18 | 'variables' =>
19 | array (
20 | 'title' => 1,
21 | ),
22 | 'has_nocache_code' => false,
23 | 'version' => 'Smarty-3.1.16',
24 | 'unifunc' => 'content_52eb6a9d3e0de7_14529652',
25 | ),false); /*/%%SmartyHeaderCode%%*/?>
26 |
27 |
28 |
53 |
54 |
55 | tpl_vars['title']->value;?>
56 |
57 | Bienvenue
58 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function (grunt) {
4 | require('load-grunt-tasks')(grunt);
5 |
6 | grunt.initConfig({
7 | watch: {
8 | haml: {
9 | files: ['./haml/**/*.haml'],
10 | tasks: ['haml2smarty:pre', 'exec:middleman', 'haml2smarty:post','clean:tmp'],
11 | options: {
12 | livereload: true
13 | }
14 | },
15 | smarty: {
16 | files: ['source/**/*.php'],
17 | tasks: ['clean:php', 'exec:middleman'],
18 | options: {
19 | livereload: true
20 | }
21 | }
22 | },
23 |
24 | haml2smarty: {
25 | pre: {
26 | files: [{
27 | expand: true,
28 | cwd: 'haml',
29 | src: '**/*.haml',
30 | dest: 'source',
31 | ext: '.haml'
32 | }],
33 | options: {
34 | scope: "pre"
35 | }
36 | },
37 | post: {
38 | files: [{
39 | expand: true,
40 | cwd: 'build',
41 | src: '{,*/}*.html',
42 | dest: 'smarty/templates',
43 | ext: '.tpl'
44 | }],
45 | options: {
46 | scope: "post"
47 | }
48 | }
49 | },
50 |
51 | exec: {
52 | middleman: {
53 | command: 'middleman build',
54 | args: ['--force']
55 | }
56 | },
57 |
58 | haml: {
59 | dist: {
60 | files: [{
61 | expand: true,
62 | cwd: '.tmp',
63 | src: '{,*/}*.haml',
64 | dest: '.tmp',
65 | ext: '.haml.tmp'
66 | }]
67 | },
68 | },
69 |
70 | clean: {
71 | php: {
72 | files: [{
73 | expand: true,
74 | cwd: 'smarty/templates_c',
75 | src: '{,*/}*'
76 | }],
77 | options: {
78 | force: true
79 | }
80 | },
81 | tmp: {
82 | files: [{
83 | expand: true,
84 | cwd: 'build',
85 | src: '{,*/}*.html'
86 | },
87 | {
88 | expand: true,
89 | cwd: 'source',
90 | src: './*.haml'
91 | },
92 | {
93 | cwd: '.tmp',
94 | src: '{,*/}*'
95 | }]
96 | }
97 | },
98 | });
99 |
100 | grunt.registerTask('default', function (target) {
101 | grunt.task.run([
102 | 'watch'
103 | ]);
104 | });
105 | };
106 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: http://rubygems.org/
3 | specs:
4 | activesupport (3.2.16)
5 | i18n (~> 0.6, >= 0.6.4)
6 | multi_json (~> 1.0)
7 | chunky_png (1.2.9)
8 | coffee-script (2.2.0)
9 | coffee-script-source
10 | execjs
11 | coffee-script-source (1.7.0)
12 | compass (0.12.2)
13 | chunky_png (~> 1.2)
14 | fssm (>= 0.2.7)
15 | sass (~> 3.1)
16 | em-websocket (0.5.0)
17 | eventmachine (>= 0.12.9)
18 | http_parser.rb (~> 0.5.3)
19 | eventmachine (1.0.3)
20 | execjs (1.4.0)
21 | multi_json (~> 1.0)
22 | ffi (1.9.3)
23 | fssm (0.2.10)
24 | haml (4.0.5)
25 | tilt
26 | hike (1.2.3)
27 | http_parser.rb (0.5.3)
28 | i18n (0.6.9)
29 | kramdown (1.3.1)
30 | listen (1.3.1)
31 | rb-fsevent (>= 0.9.3)
32 | rb-inotify (>= 0.9)
33 | rb-kqueue (>= 0.2)
34 | middleman (3.1.6)
35 | coffee-script (~> 2.2.0)
36 | compass (>= 0.12.2)
37 | execjs (~> 1.4.0)
38 | haml (>= 3.1.6)
39 | kramdown (~> 1.2)
40 | middleman-core (= 3.1.6)
41 | middleman-more (= 3.1.6)
42 | middleman-sprockets (>= 3.1.2)
43 | sass (>= 3.1.20)
44 | uglifier (~> 2.1.0)
45 | middleman-core (3.1.6)
46 | activesupport (~> 3.2.6)
47 | bundler (~> 1.1)
48 | i18n (~> 0.6.1)
49 | listen (~> 1.1)
50 | rack (>= 1.4.5)
51 | rack-test (~> 0.6.1)
52 | thor (>= 0.15.2, < 2.0)
53 | tilt (~> 1.3.6)
54 | middleman-livereload (3.1.1)
55 | em-websocket (>= 0.2.0)
56 | middleman-core (>= 3.0.2)
57 | multi_json (~> 1.0)
58 | rack-livereload
59 | middleman-more (3.1.6)
60 | middleman-sprockets (3.1.4)
61 | middleman-core (>= 3.0.14)
62 | middleman-more (>= 3.0.14)
63 | sprockets (~> 2.1)
64 | sprockets-helpers (~> 1.0.0)
65 | sprockets-sass (~> 1.0.0)
66 | multi_json (1.8.4)
67 | rack (1.5.2)
68 | rack-livereload (0.3.15)
69 | rack
70 | rack-test (0.6.2)
71 | rack (>= 1.0)
72 | rb-fsevent (0.9.4)
73 | rb-inotify (0.9.3)
74 | ffi (>= 0.5.0)
75 | rb-kqueue (0.2.0)
76 | ffi (>= 0.5.0)
77 | ruby18_source_location (0.2)
78 | sass (3.2.14)
79 | sprockets (2.10.1)
80 | hike (~> 1.2)
81 | multi_json (~> 1.0)
82 | rack (~> 1.0)
83 | tilt (~> 1.1, != 1.3.0)
84 | sprockets-helpers (1.0.1)
85 | sprockets (~> 2.0)
86 | sprockets-sass (1.0.2)
87 | sprockets (~> 2.0)
88 | tilt (~> 1.1)
89 | thor (0.18.1)
90 | tilt (1.3.7)
91 | uglifier (2.1.2)
92 | execjs (>= 0.3.0)
93 | multi_json (~> 1.0, >= 1.0.2)
94 |
95 | PLATFORMS
96 | ruby
97 |
98 | DEPENDENCIES
99 | middleman (~> 3.1.5)
100 | middleman-livereload (~> 3.1.0)
101 | ruby18_source_location
102 | wdm (~> 0.1.0)
103 |
--------------------------------------------------------------------------------
/smarty/templates_c/19a156ae4171149918b54a25b40e74346cbcfc90.file.debug.tpl.php:
--------------------------------------------------------------------------------
1 |
3 | decodeProperties(array (
5 | 'file_dependency' =>
6 | array (
7 | '19a156ae4171149918b54a25b40e74346cbcfc90' =>
8 | array (
9 | 0 => '/usr/local/lib/php/Smarty/debug.tpl',
10 | 1 => 1391073628,
11 | 2 => 'file',
12 | ),
13 | ),
14 | 'nocache_hash' => '212303524952eb65d2ab2fb2-15105225',
15 | 'function' =>
16 | array (
17 | ),
18 | 'variables' =>
19 | array (
20 | 'template_name' => 0,
21 | 'execution_time' => 0,
22 | 'template_data' => 0,
23 | 'template' => 0,
24 | 'assigned_vars' => 0,
25 | 'vars' => 0,
26 | 'config_vars' => 0,
27 | 'id' => 0,
28 | 'debug_output' => 0,
29 | ),
30 | 'has_nocache_code' => false,
31 | 'version' => 'Smarty-3.1.16',
32 | 'unifunc' => 'content_52eb65d2c6bc44_67536740',
33 | ),false); /*/%%SmartyHeaderCode%%*/?>
34 | _capture_stack[0][] = array('_smarty_debug', 'debug_output', null); ob_start(); ?>
36 |
37 |
38 |
39 | Smarty Debug Console
40 |
120 |
121 |
122 |
123 | Smarty Debug Console - tpl_vars['template_name']->value)) {?>tpl_vars['template_name']->value);?>
124 | Total Time tpl_vars['execution_time']->value);?>
125 |
126 |
127 | tpl_vars['template_data']->value)) {?>
128 | included templates & config files (load time in seconds)
129 |
130 |
131 | tpl_vars['template'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['template']->_loop = false;
132 | $_from = $_smarty_tpl->tpl_vars['template_data']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
133 | foreach ($_from as $_smarty_tpl->tpl_vars['template']->key => $_smarty_tpl->tpl_vars['template']->value) {
134 | $_smarty_tpl->tpl_vars['template']->_loop = true;
135 | ?>
136 | tpl_vars['template']->value['name'];?>
137 |
138 |
139 | (compile tpl_vars['template']->value['compile_time']);?>
140 | ) (render tpl_vars['template']->value['render_time']);?>
141 | ) (cache tpl_vars['template']->value['cache_time']);?>
142 | )
143 |
144 |
145 |
146 |
147 |
148 |
149 | assigned template variables
150 |
151 |
152 | tpl_vars['vars'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['vars']->_loop = false;
153 | $_from = $_smarty_tpl->tpl_vars['assigned_vars']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
154 | $_smarty_tpl->tpl_vars['vars']->iteration=0;
155 | foreach ($_from as $_smarty_tpl->tpl_vars['vars']->key => $_smarty_tpl->tpl_vars['vars']->value) {
156 | $_smarty_tpl->tpl_vars['vars']->_loop = true;
157 | $_smarty_tpl->tpl_vars['vars']->iteration++;
158 | ?>
159 |
160 | | $tpl_vars['vars']->key, ENT_QUOTES, 'UTF-8', true);?>
161 | |
162 | tpl_vars['vars']->value);?>
163 | |
164 |
165 |
166 |
167 | assigned config file variables (outer template scope)
168 |
169 |
170 | tpl_vars['vars'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['vars']->_loop = false;
171 | $_from = $_smarty_tpl->tpl_vars['config_vars']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
172 | $_smarty_tpl->tpl_vars['vars']->iteration=0;
173 | foreach ($_from as $_smarty_tpl->tpl_vars['vars']->key => $_smarty_tpl->tpl_vars['vars']->value) {
174 | $_smarty_tpl->tpl_vars['vars']->_loop = true;
175 | $_smarty_tpl->tpl_vars['vars']->iteration++;
176 | ?>
177 |
178 | | tpl_vars['vars']->key, ENT_QUOTES, 'UTF-8', true);?>
179 | |
180 | tpl_vars['vars']->value);?>
181 | |
182 |
183 |
184 |
185 |
186 |
187 | _capture_stack[0]);
188 | if (!empty($_capture_buffer)) {
189 | if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
190 | if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
191 | Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
192 | } else $_smarty_tpl->capture_error();?>
193 |
201 |
202 |
--------------------------------------------------------------------------------
/source/stylesheets/normalize.css:
--------------------------------------------------------------------------------
1 | /*! normalize.css v2.0.1 | MIT License | git.io/normalize */
2 |
3 | /* ==========================================================================
4 | HTML5 display definitions
5 | ========================================================================== */
6 |
7 | /*
8 | * Corrects `block` display not defined in IE 8/9.
9 | */
10 |
11 | article,
12 | aside,
13 | details,
14 | figcaption,
15 | figure,
16 | footer,
17 | header,
18 | hgroup,
19 | nav,
20 | section,
21 | summary {
22 | display: block;
23 | }
24 |
25 | /*
26 | * Corrects `inline-block` display not defined in IE 8/9.
27 | */
28 |
29 | audio,
30 | canvas,
31 | video {
32 | display: inline-block;
33 | }
34 |
35 | /*
36 | * Prevents modern browsers from displaying `audio` without controls.
37 | * Remove excess height in iOS 5 devices.
38 | */
39 |
40 | audio:not([controls]) {
41 | display: none;
42 | height: 0;
43 | }
44 |
45 | /*
46 | * Addresses styling for `hidden` attribute not present in IE 8/9.
47 | */
48 |
49 | [hidden] {
50 | display: none;
51 | }
52 |
53 | /* ==========================================================================
54 | Base
55 | ========================================================================== */
56 |
57 | /*
58 | * 1. Sets default font family to sans-serif.
59 | * 2. Prevents iOS text size adjust after orientation change, without disabling
60 | * user zoom.
61 | */
62 |
63 | html {
64 | font-family: sans-serif; /* 1 */
65 | -webkit-text-size-adjust: 100%; /* 2 */
66 | -ms-text-size-adjust: 100%; /* 2 */
67 | }
68 |
69 | /*
70 | * Removes default margin.
71 | */
72 |
73 | body {
74 | margin: 0;
75 | }
76 |
77 | /* ==========================================================================
78 | Links
79 | ========================================================================== */
80 |
81 | /*
82 | * Addresses `outline` inconsistency between Chrome and other browsers.
83 | */
84 |
85 | a:focus {
86 | outline: thin dotted;
87 | }
88 |
89 | /*
90 | * Improves readability when focused and also mouse hovered in all browsers.
91 | */
92 |
93 | a:active,
94 | a:hover {
95 | outline: 0;
96 | }
97 |
98 | /* ==========================================================================
99 | Typography
100 | ========================================================================== */
101 |
102 | /*
103 | * Addresses `h1` font sizes within `section` and `article` in Firefox 4+,
104 | * Safari 5, and Chrome.
105 | */
106 |
107 | h1 {
108 | font-size: 2em;
109 | }
110 |
111 | /*
112 | * Addresses styling not present in IE 8/9, Safari 5, and Chrome.
113 | */
114 |
115 | abbr[title] {
116 | border-bottom: 1px dotted;
117 | }
118 |
119 | /*
120 | * Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
121 | */
122 |
123 | b,
124 | strong {
125 | font-weight: bold;
126 | }
127 |
128 | /*
129 | * Addresses styling not present in Safari 5 and Chrome.
130 | */
131 |
132 | dfn {
133 | font-style: italic;
134 | }
135 |
136 | /*
137 | * Addresses styling not present in IE 8/9.
138 | */
139 |
140 | mark {
141 | background: #ff0;
142 | color: #000;
143 | }
144 |
145 |
146 | /*
147 | * Corrects font family set oddly in Safari 5 and Chrome.
148 | */
149 |
150 | code,
151 | kbd,
152 | pre,
153 | samp {
154 | font-family: monospace, serif;
155 | font-size: 1em;
156 | }
157 |
158 | /*
159 | * Improves readability of pre-formatted text in all browsers.
160 | */
161 |
162 | pre {
163 | white-space: pre;
164 | white-space: pre-wrap;
165 | word-wrap: break-word;
166 | }
167 |
168 | /*
169 | * Sets consistent quote types.
170 | */
171 |
172 | q {
173 | quotes: "\201C" "\201D" "\2018" "\2019";
174 | }
175 |
176 | /*
177 | * Addresses inconsistent and variable font size in all browsers.
178 | */
179 |
180 | small {
181 | font-size: 80%;
182 | }
183 |
184 | /*
185 | * Prevents `sub` and `sup` affecting `line-height` in all browsers.
186 | */
187 |
188 | sub,
189 | sup {
190 | font-size: 75%;
191 | line-height: 0;
192 | position: relative;
193 | vertical-align: baseline;
194 | }
195 |
196 | sup {
197 | top: -0.5em;
198 | }
199 |
200 | sub {
201 | bottom: -0.25em;
202 | }
203 |
204 | /* ==========================================================================
205 | Embedded content
206 | ========================================================================== */
207 |
208 | /*
209 | * Removes border when inside `a` element in IE 8/9.
210 | */
211 |
212 | img {
213 | border: 0;
214 | }
215 |
216 | /*
217 | * Corrects overflow displayed oddly in IE 9.
218 | */
219 |
220 | svg:not(:root) {
221 | overflow: hidden;
222 | }
223 |
224 | /* ==========================================================================
225 | Figures
226 | ========================================================================== */
227 |
228 | /*
229 | * Addresses margin not present in IE 8/9 and Safari 5.
230 | */
231 |
232 | figure {
233 | margin: 0;
234 | }
235 |
236 | /* ==========================================================================
237 | Forms
238 | ========================================================================== */
239 |
240 | /*
241 | * Define consistent border, margin, and padding.
242 | */
243 |
244 | fieldset {
245 | border: 1px solid #c0c0c0;
246 | margin: 0 2px;
247 | padding: 0.35em 0.625em 0.75em;
248 | }
249 |
250 | /*
251 | * 1. Corrects color not being inherited in IE 8/9.
252 | * 2. Remove padding so people aren't caught out if they zero out fieldsets.
253 | */
254 |
255 | legend {
256 | border: 0; /* 1 */
257 | padding: 0; /* 2 */
258 | }
259 |
260 | /*
261 | * 1. Corrects font family not being inherited in all browsers.
262 | * 2. Corrects font size not being inherited in all browsers.
263 | * 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
264 | */
265 |
266 | button,
267 | input,
268 | select,
269 | textarea {
270 | font-family: inherit; /* 1 */
271 | font-size: 100%; /* 2 */
272 | margin: 0; /* 3 */
273 | }
274 |
275 | /*
276 | * Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
277 | * the UA stylesheet.
278 | */
279 |
280 | button,
281 | input {
282 | line-height: normal;
283 | }
284 |
285 | /*
286 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
287 | * and `video` controls.
288 | * 2. Corrects inability to style clickable `input` types in iOS.
289 | * 3. Improves usability and consistency of cursor style between image-type
290 | * `input` and others.
291 | */
292 |
293 | button,
294 | html input[type="button"], /* 1 */
295 | input[type="reset"],
296 | input[type="submit"] {
297 | -webkit-appearance: button; /* 2 */
298 | cursor: pointer; /* 3 */
299 | }
300 |
301 | /*
302 | * Re-set default cursor for disabled elements.
303 | */
304 |
305 | button[disabled],
306 | input[disabled] {
307 | cursor: default;
308 | }
309 |
310 | /*
311 | * 1. Addresses box sizing set to `content-box` in IE 8/9.
312 | * 2. Removes excess padding in IE 8/9.
313 | */
314 |
315 | input[type="checkbox"],
316 | input[type="radio"] {
317 | box-sizing: border-box; /* 1 */
318 | padding: 0; /* 2 */
319 | }
320 |
321 | /*
322 | * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
323 | * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
324 | * (include `-moz` to future-proof).
325 | */
326 |
327 | input[type="search"] {
328 | -webkit-appearance: textfield; /* 1 */
329 | -moz-box-sizing: content-box;
330 | -webkit-box-sizing: content-box; /* 2 */
331 | box-sizing: content-box;
332 | }
333 |
334 | /*
335 | * Removes inner padding and search cancel button in Safari 5 and Chrome
336 | * on OS X.
337 | */
338 |
339 | input[type="search"]::-webkit-search-cancel-button,
340 | input[type="search"]::-webkit-search-decoration {
341 | -webkit-appearance: none;
342 | }
343 |
344 | /*
345 | * Removes inner padding and border in Firefox 4+.
346 | */
347 |
348 | button::-moz-focus-inner,
349 | input::-moz-focus-inner {
350 | border: 0;
351 | padding: 0;
352 | }
353 |
354 | /*
355 | * 1. Removes default vertical scrollbar in IE 8/9.
356 | * 2. Improves readability and alignment in all browsers.
357 | */
358 |
359 | textarea {
360 | overflow: auto; /* 1 */
361 | vertical-align: top; /* 2 */
362 | }
363 |
364 | /* ==========================================================================
365 | Tables
366 | ========================================================================== */
367 |
368 | /*
369 | * Remove most spacing between table cells.
370 | */
371 |
372 | table {
373 | border-collapse: collapse;
374 | border-spacing: 0;
375 | }
--------------------------------------------------------------------------------