frontsau 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +30 -0
- data/Rakefile +2 -0
- data/bin/frontsau +15 -0
- data/bin/frontsau-phaml-compiler +35 -0
- data/example/.frontsau +12 -0
- data/example/assets/head.jpg +0 -0
- data/example/assets/script.js +4 -0
- data/example/assets/style.css +6 -0
- data/example/css/includes.sass +2 -0
- data/example/css/style.sass +6 -0
- data/example/image/head.jpg +0 -0
- data/example/index.html +0 -0
- data/example/js/script.coffee +1 -0
- data/frontsau.gemspec +41 -0
- data/lib/Phamlp/Phamlp.php +72 -0
- data/lib/Phamlp/PhamlpException.php +31 -0
- data/lib/Phamlp/haml/HamlException.php +29 -0
- data/lib/Phamlp/haml/HamlHelpers.php +199 -0
- data/lib/Phamlp/haml/HamlParser.php +1250 -0
- data/lib/Phamlp/haml/filters/HamlBaseFilter.php +30 -0
- data/lib/Phamlp/haml/filters/HamlCdataFilter.php +29 -0
- data/lib/Phamlp/haml/filters/HamlCssFilter.php +30 -0
- data/lib/Phamlp/haml/filters/HamlEscapedFilter.php +32 -0
- data/lib/Phamlp/haml/filters/HamlJavascriptFilter.php +31 -0
- data/lib/Phamlp/haml/filters/HamlPhpFilter.php +27 -0
- data/lib/Phamlp/haml/filters/HamlPlainFilter.php +28 -0
- data/lib/Phamlp/haml/filters/HamlPreserveFilter.php +29 -0
- data/lib/Phamlp/haml/filters/HamlSassFilter.php +37 -0
- data/lib/Phamlp/haml/filters/HamlScssFilter.php +37 -0
- data/lib/Phamlp/haml/filters/_HamlMarkdownFilter.php +50 -0
- data/lib/Phamlp/haml/filters/_HamlTextileFilter.php +50 -0
- data/lib/Phamlp/haml/messages/_i18n.php +32 -0
- data/lib/Phamlp/haml/messages/de.php +32 -0
- data/lib/Phamlp/haml/messages/fr.php +32 -0
- data/lib/Phamlp/haml/renderers/HamlCompactRenderer.php +32 -0
- data/lib/Phamlp/haml/renderers/HamlCompressedRenderer.php +48 -0
- data/lib/Phamlp/haml/renderers/HamlExpandedRenderer.php +58 -0
- data/lib/Phamlp/haml/renderers/HamlNestedRenderer.php +77 -0
- data/lib/Phamlp/haml/renderers/HamlRenderer.php +137 -0
- data/lib/Phamlp/haml/tree/HamlCodeBlockNode.php +58 -0
- data/lib/Phamlp/haml/tree/HamlCommentNode.php +41 -0
- data/lib/Phamlp/haml/tree/HamlDoctypeNode.php +27 -0
- data/lib/Phamlp/haml/tree/HamlElementNode.php +52 -0
- data/lib/Phamlp/haml/tree/HamlFilterNode.php +50 -0
- data/lib/Phamlp/haml/tree/HamlHelperNode.php +73 -0
- data/lib/Phamlp/haml/tree/HamlNode.php +253 -0
- data/lib/Phamlp/haml/tree/HamlNodeExceptions.php +19 -0
- data/lib/Phamlp/haml/tree/HamlRootNode.php +58 -0
- data/lib/Phamlp/sass/SassException.php +29 -0
- data/lib/Phamlp/sass/SassFile.php +164 -0
- data/lib/Phamlp/sass/SassParser.php +848 -0
- data/lib/Phamlp/sass/extensions/compass/config.php +65 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/_blueprint.scss +47 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_buttons.scss +101 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_colors.scss +32 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_debug.scss +11 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_fancy-type.scss +86 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_form.scss +68 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_grid.scss +249 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_ie.scss +109 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.scss +57 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_link-icons.scss +37 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_liquid.scss +147 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_print.scss +93 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_reset.scss +3 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.scss +133 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss +54 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_typography.scss +104 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_utilities.scss +37 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss +58 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/basic/grid.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/basic/ie.sass +4 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/basic/manifest.rb +30 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/basic/partials/_base.sass +10 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/basic/print.sass +4 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/basic/screen.sass +12 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons/cross.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons/key.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons/tick.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons.sass +49 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/buttons/manifest.rb +17 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/doc.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/email.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/external.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/feed.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/im.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/pdf.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/visited.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/xls.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons.sass +13 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/link_icons/manifest.rb +23 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/project/grid.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/project/ie.sass +16 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/project/manifest.rb +30 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/project/partials/_base.sass +11 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/project/print.sass +8 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/project/screen.sass +45 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/semantic/grid.png +0 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/semantic/ie.sass +16 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/semantic/manifest.rb +33 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/semantic/partials/_base.sass +10 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/semantic/partials/_form.sass +6 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/semantic/partials/_page.sass +18 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/semantic/partials/_two_col.sass +38 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/semantic/print.sass +5 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/blueprint/templates/semantic/screen.sass +14 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/_compass.scss +2 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/_css3.scss +15 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/_layout.scss +1 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/_reset.scss +3 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/_utilities.scss +6 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_background-clip.scss +43 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_background-origin.scss +42 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_background-size.scss +14 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_border-radius.scss +135 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss +50 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss +13 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_box.scss +112 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_columns.scss +55 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_font-face.scss +33 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_gradient.scss +82 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_inline-block.scss +12 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_opacity.scss +27 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_shared.scss +47 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss +25 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_transform.scss +85 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_transition.scss +85 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/layout/_sticky-footer.scss +23 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/reset/_utilities.scss +133 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_general.scss +6 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_links.scss +3 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_lists.scss +4 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_print.scss +17 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_sprites.scss +1 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_tables.scss +3 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_text.scss +3 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss +31 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_float.scss +15 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_hacks.scss +35 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_min.scss +16 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_reset.scss +2 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_tabs.scss +1 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_tag-cloud.scss +18 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/links/_hover-link.scss +5 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/links/_link-colors.scss +28 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/links/_unstyled-link.scss +7 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.scss +34 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal-list.scss +52 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/lists/_inline-block-list.scss +47 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/lists/_inline-list.scss +29 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite-img.scss +56 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss +20 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/tables/_borders.scss +27 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.scss +9 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/text/_ellipsis.scss +25 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/text/_nowrap.scss +2 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/text/_replacement.scss +34 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/templates/ellipsis/ellipsis.sass +9 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/templates/ellipsis/manifest.rb +27 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/templates/ellipsis/xml/ellipsis.xml +14 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/templates/extension/manifest.rb +20 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/templates/extension/stylesheets/main.sass +1 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/templates/extension/templates/project/manifest.rb +2 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/templates/extension/templates/project/screen.sass +2 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/templates/project/USAGE.markdown +32 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/templates/project/ie.sass +6 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/templates/project/manifest.rb +4 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/templates/project/print.sass +6 -0
- data/lib/Phamlp/sass/extensions/compass/frameworks/compass/templates/project/screen.sass +7 -0
- data/lib/Phamlp/sass/extensions/compass/functions/colourStops.php +268 -0
- data/lib/Phamlp/sass/extensions/compass/functions/constants.php +44 -0
- data/lib/Phamlp/sass/extensions/compass/functions/fontFiles.php +30 -0
- data/lib/Phamlp/sass/extensions/compass/functions/imageSize.php +39 -0
- data/lib/Phamlp/sass/extensions/compass/functions/inlineData.php +84 -0
- data/lib/Phamlp/sass/extensions/compass/functions/lists.php +47 -0
- data/lib/Phamlp/sass/extensions/compass/functions/selectors.php +128 -0
- data/lib/Phamlp/sass/extensions/compass/functions/urls.php +143 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/_compass.scss +2 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/_css3.scss +15 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/_layout.scss +1 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/_reset.scss +3 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/_utilities.scss +6 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_background-clip.scss +43 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_background-origin.scss +42 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_background-size.scss +14 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_border-radius.scss +135 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_box-shadow.scss +50 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_box-sizing.scss +13 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_box.scss +112 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_columns.scss +55 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_font-face.scss +33 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_gradient.scss +96 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_inline-block.scss +12 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_opacity.scss +27 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_shared.scss +47 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_text-shadow.scss +25 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_transform.scss +85 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/css3/_transition.scss +85 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/layout/_sticky-footer.scss +23 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/reset/_utilities.scss +133 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/_general.scss +6 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/_links.scss +3 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/_lists.scss +4 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/_print.scss +17 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/_sprites.scss +1 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/_tables.scss +3 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/_text.scss +3 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/general/_clearfix.scss +31 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/general/_float.scss +15 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/general/_hacks.scss +35 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/general/_min.scss +16 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/general/_reset.scss +2 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/general/_tabs.scss +1 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/general/_tag-cloud.scss +18 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/links/_hover-link.scss +5 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/links/_link-colors.scss +28 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/links/_unstyled-link.scss +7 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/lists/_bullets.scss +34 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/lists/_horizontal-list.scss +52 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/lists/_inline-block-list.scss +47 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/lists/_inline-list.scss +29 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/sprites/_sprite-img.scss +56 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss +20 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/tables/_borders.scss +27 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/tables/_scaffolding.scss +9 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/text/_ellipsis.scss +25 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/text/_nowrap.scss +2 -0
- data/lib/Phamlp/sass/extensions/compass/stylesheets/compass/utilities/text/_replacement.scss +34 -0
- data/lib/Phamlp/sass/messages/_i18n.php +122 -0
- data/lib/Phamlp/sass/messages/de.php +70 -0
- data/lib/Phamlp/sass/messages/fr.php +70 -0
- data/lib/Phamlp/sass/renderers/SassCompactRenderer.php +130 -0
- data/lib/Phamlp/sass/renderers/SassCompressedRenderer.php +102 -0
- data/lib/Phamlp/sass/renderers/SassExpandedRenderer.php +62 -0
- data/lib/Phamlp/sass/renderers/SassNestedRenderer.php +61 -0
- data/lib/Phamlp/sass/renderers/SassRenderer.php +51 -0
- data/lib/Phamlp/sass/script/SassScriptFunction.php +169 -0
- data/lib/Phamlp/sass/script/SassScriptFunctions.php +751 -0
- data/lib/Phamlp/sass/script/SassScriptLexer.php +114 -0
- data/lib/Phamlp/sass/script/SassScriptOperation.php +151 -0
- data/lib/Phamlp/sass/script/SassScriptParser.php +192 -0
- data/lib/Phamlp/sass/script/SassScriptParserExceptions.php +40 -0
- data/lib/Phamlp/sass/script/SassScriptVariable.php +57 -0
- data/lib/Phamlp/sass/script/literals/SassBoolean.php +67 -0
- data/lib/Phamlp/sass/script/literals/SassColour.php +886 -0
- data/lib/Phamlp/sass/script/literals/SassLiteral.php +359 -0
- data/lib/Phamlp/sass/script/literals/SassLiteralExceptions.php +47 -0
- data/lib/Phamlp/sass/script/literals/SassNumber.php +503 -0
- data/lib/Phamlp/sass/script/literals/SassString.php +106 -0
- data/lib/Phamlp/sass/tree/SassCommentNode.php +64 -0
- data/lib/Phamlp/sass/tree/SassContext.php +120 -0
- data/lib/Phamlp/sass/tree/SassDebugNode.php +84 -0
- data/lib/Phamlp/sass/tree/SassDirectiveNode.php +76 -0
- data/lib/Phamlp/sass/tree/SassElseNode.php +28 -0
- data/lib/Phamlp/sass/tree/SassExtendNode.php +47 -0
- data/lib/Phamlp/sass/tree/SassForNode.php +99 -0
- data/lib/Phamlp/sass/tree/SassIfNode.php +95 -0
- data/lib/Phamlp/sass/tree/SassImportNode.php +69 -0
- data/lib/Phamlp/sass/tree/SassMixinDefinitionNode.php +88 -0
- data/lib/Phamlp/sass/tree/SassMixinNode.php +91 -0
- data/lib/Phamlp/sass/tree/SassNode.php +342 -0
- data/lib/Phamlp/sass/tree/SassNodeExceptions.php +117 -0
- data/lib/Phamlp/sass/tree/SassPropertyNode.php +239 -0
- data/lib/Phamlp/sass/tree/SassRootNode.php +100 -0
- data/lib/Phamlp/sass/tree/SassRuleNode.php +337 -0
- data/lib/Phamlp/sass/tree/SassVariableNode.php +90 -0
- data/lib/Phamlp/sass/tree/SassWhileNode.php +64 -0
- data/lib/frontsau/assets/rack.rb +12 -0
- data/lib/frontsau/assets/sprockets.rb +59 -0
- data/lib/frontsau/assets/static_assets_compiler.rb +50 -0
- data/lib/frontsau/assets/url_rewriter.rb +22 -0
- data/lib/frontsau/assets/watcher.rb +60 -0
- data/lib/frontsau/thor_app.rb +118 -0
- data/lib/frontsau/version.rb +3 -0
- data/lib/frontsau.rb +64 -0
- metadata +578 -0
@@ -0,0 +1,77 @@
|
|
1
|
+
<?php
|
2
|
+
/* SVN FILE: $Id: HamlNestedRenderer.php 72 2010-04-20 00:41:36Z chris.l.yates $ */
|
3
|
+
/**
|
4
|
+
* HamlNestedRenderer class file.
|
5
|
+
* @author Chris Yates <chris.l.yates@gmail.com>
|
6
|
+
* @copyright Copyright (c) 2010 PBM Web Development
|
7
|
+
* @license http://phamlp.googlecode.com/files/license.txt
|
8
|
+
* @package PHamlP
|
9
|
+
* @subpackage Haml.renderers
|
10
|
+
*/
|
11
|
+
|
12
|
+
/**
|
13
|
+
* HamlNestedRenderer class.
|
14
|
+
* Blocks and content are indented according to their nesting level.
|
15
|
+
* @package PHamlP
|
16
|
+
* @subpackage Haml.renderers
|
17
|
+
*/
|
18
|
+
class HamlNestedRenderer extends HamlRenderer {
|
19
|
+
/**
|
20
|
+
* Renders the opening tag of an element
|
21
|
+
*/
|
22
|
+
public function renderOpeningTag($node) {
|
23
|
+
return ($node->whitespaceControl['outer'] ? '' : $this->getIndent($node)) .
|
24
|
+
parent::renderOpeningTag($node) . ($node->whitespaceControl['inner'] ? '' :
|
25
|
+
($node->isSelfClosing && $node->whitespaceControl['outer'] ? '' : "\n"));
|
26
|
+
}
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Renders the closing tag of an element
|
30
|
+
*/
|
31
|
+
public function renderClosingTag($node) {
|
32
|
+
return ($node->isSelfClosing ? '' : ($node->whitespaceControl['inner'] ? '' :
|
33
|
+
$this->getIndent($node)) . parent::renderClosingTag($node) .
|
34
|
+
($node->whitespaceControl['outer'] ? '' : "\n"));
|
35
|
+
}
|
36
|
+
|
37
|
+
/**
|
38
|
+
* Renders content.
|
39
|
+
* @param HamlNode the node being rendered
|
40
|
+
* @return string the rendered content
|
41
|
+
*/
|
42
|
+
public function renderContent($node) {
|
43
|
+
return $this->getIndent($node) . parent::renderContent($node) . "\n";
|
44
|
+
}
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Renders the opening of a comment
|
48
|
+
*/
|
49
|
+
public function renderOpenComment($node) {
|
50
|
+
return parent::renderOpenComment($node) . (empty($node->content) ? "\n" : '');
|
51
|
+
}
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Renders the closing of a comment
|
55
|
+
*/
|
56
|
+
public function renderCloseComment($node) {
|
57
|
+
return parent::renderCloseComment($node) . "\n";
|
58
|
+
}
|
59
|
+
|
60
|
+
/**
|
61
|
+
* Renders the start of a code block
|
62
|
+
*/
|
63
|
+
public function renderStartCodeBlock($node) {
|
64
|
+
return $this->getIndent($node) . parent::renderStartCodeBlock($node) . "\n";
|
65
|
+
}
|
66
|
+
|
67
|
+
/**
|
68
|
+
* Renders the end of a code block
|
69
|
+
*/
|
70
|
+
public function renderEndCodeBlock($node) {
|
71
|
+
return $this->getIndent($node) . parent::renderEndCodeBlock($node) . "\n";
|
72
|
+
}
|
73
|
+
|
74
|
+
private function getIndent($node) {
|
75
|
+
return str_repeat(' ', 2 * $node->line['indentLevel']);
|
76
|
+
}
|
77
|
+
}
|
@@ -0,0 +1,137 @@
|
|
1
|
+
<?php
|
2
|
+
/* SVN FILE: $Id: HamlRenderer.php 93 2010-05-20 17:43:41Z chris.l.yates $ */
|
3
|
+
/**
|
4
|
+
* HamlRenderer class file.
|
5
|
+
* @author Chris Yates <chris.l.yates@gmail.com>
|
6
|
+
* @copyright Copyright (c) 2010 PBM Web Development
|
7
|
+
* @license http://phamlp.googlecode.com/files/license.txt
|
8
|
+
* @package PHamlP
|
9
|
+
* @subpackage Haml.renderers
|
10
|
+
*/
|
11
|
+
|
12
|
+
require_once('HamlCompressedRenderer.php');
|
13
|
+
require_once('HamlCompactRenderer.php');
|
14
|
+
require_once('HamlExpandedRenderer.php');
|
15
|
+
require_once('HamlNestedRenderer.php');
|
16
|
+
|
17
|
+
/**
|
18
|
+
* HamlRenderer class.
|
19
|
+
* Provides the most common version of each method. Child classs override
|
20
|
+
* methods to provide style specific rendering.
|
21
|
+
* @package PHamlP
|
22
|
+
* @subpackage Haml.renderers
|
23
|
+
*/
|
24
|
+
class HamlRenderer {
|
25
|
+
/**#@+
|
26
|
+
* Output Styles
|
27
|
+
*/
|
28
|
+
const STYLE_COMPRESSED = 'compressed';
|
29
|
+
const STYLE_COMPACT = 'compact';
|
30
|
+
const STYLE_EXPANDED = 'expanded';
|
31
|
+
const STYLE_NESTED = 'nested';
|
32
|
+
/**#@-*/
|
33
|
+
|
34
|
+
const INDENT = ' ';
|
35
|
+
|
36
|
+
private $format;
|
37
|
+
private $attrWrapper;
|
38
|
+
private $minimizedAttributes;
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Returns the renderer for the required render style.
|
42
|
+
* @param string render style
|
43
|
+
* @return HamlRenderer
|
44
|
+
*/
|
45
|
+
static public function getRenderer($style, $options) {
|
46
|
+
switch ($style) {
|
47
|
+
case self::STYLE_COMPACT:
|
48
|
+
return new HamlCompactRenderer($options);
|
49
|
+
case self::STYLE_COMPRESSED:
|
50
|
+
return new HamlCompressedRenderer($options);
|
51
|
+
case self::STYLE_EXPANDED:
|
52
|
+
return new HamlExpandedRenderer($options);
|
53
|
+
case self::STYLE_NESTED:
|
54
|
+
return new HamlNestedRenderer($options);
|
55
|
+
} // switch
|
56
|
+
}
|
57
|
+
|
58
|
+
public function __construct($options) {
|
59
|
+
foreach ($options as $name => $value) {
|
60
|
+
$this->$name = $value;
|
61
|
+
} // foreach
|
62
|
+
}
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Renders element attributes
|
66
|
+
*/
|
67
|
+
private function renderAttributes($attributes) {
|
68
|
+
$output = '';
|
69
|
+
foreach ($attributes as $name => $value) {
|
70
|
+
if (is_integer($name)) { // attribute function
|
71
|
+
$output .= " $value";
|
72
|
+
}
|
73
|
+
elseif ($name == $value &&
|
74
|
+
($this->format === 'html4' || $this->format === 'html5')) {
|
75
|
+
$output .= " $name";
|
76
|
+
}
|
77
|
+
else {
|
78
|
+
$output .= " $name={$this->attrWrapper}$value{$this->attrWrapper}";
|
79
|
+
}
|
80
|
+
}
|
81
|
+
return $output;
|
82
|
+
}
|
83
|
+
|
84
|
+
/**
|
85
|
+
* Renders the opening tag of an element
|
86
|
+
*/
|
87
|
+
public function renderOpeningTag($node) {
|
88
|
+
$output = "<{$node->content}";
|
89
|
+
$output .= $this->renderAttributes($node->attributes);
|
90
|
+
$output .= ($node->isSelfClosing ? ' /' : '') . '>';
|
91
|
+
return $output;
|
92
|
+
}
|
93
|
+
|
94
|
+
/**
|
95
|
+
* Renders the closing tag of an element
|
96
|
+
*/
|
97
|
+
public function renderClosingTag($node) {
|
98
|
+
return ($node->isSelfClosing ? '' : "</{$node->content}>");
|
99
|
+
}
|
100
|
+
|
101
|
+
/**
|
102
|
+
* Renders the opening of a comment
|
103
|
+
*/
|
104
|
+
public function renderOpenComment($node) {
|
105
|
+
return ($node->isConditional ? "\n\n" : '') . "<!--{$node->content}" . ($node->isConditional ? ">\n" : ' ');
|
106
|
+
}
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Renders the closing of a comment
|
110
|
+
*/
|
111
|
+
public function renderCloseComment($node) {
|
112
|
+
return ($node->isConditional ? "\n<![endif]" : ' ') . '-->' . ($node->isConditional ? "\n" : '');
|
113
|
+
}
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Renders the start of a code block
|
117
|
+
*/
|
118
|
+
public function renderStartCodeBlock($node) {
|
119
|
+
return $this->renderContent($node);
|
120
|
+
}
|
121
|
+
|
122
|
+
/**
|
123
|
+
* Renders the end of a code block
|
124
|
+
*/
|
125
|
+
public function renderEndCodeBlock($node) {
|
126
|
+
return '<?php }' . (!empty($node->doWhile) ? " {$node->doWhile}" : '') . ' ?>';
|
127
|
+
}
|
128
|
+
|
129
|
+
/**
|
130
|
+
* Renders content.
|
131
|
+
* @param HamlNode the node being rendered
|
132
|
+
* @return string the rendered content
|
133
|
+
*/
|
134
|
+
public function renderContent($node) {
|
135
|
+
return $node->content;
|
136
|
+
}
|
137
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<?php
|
2
|
+
/* SVN FILE: $Id: HamlCodeBlockNode.php 92 2010-05-20 17:42:59Z chris.l.yates $ */
|
3
|
+
/**
|
4
|
+
* HamlCodeBlockNode class file.
|
5
|
+
* @author Chris Yates <chris.l.yates@gmail.com>
|
6
|
+
* @copyright Copyright (c) 2010 PBM Web Development
|
7
|
+
* @license http://phamlp.googlecode.com/files/license.txt
|
8
|
+
* @package PHamlP
|
9
|
+
* @subpackage Haml.tree
|
10
|
+
*/
|
11
|
+
|
12
|
+
require_once('HamlRootNode.php');
|
13
|
+
require_once('HamlNodeExceptions.php');
|
14
|
+
|
15
|
+
/**
|
16
|
+
* HamlCodeBlockNode class.
|
17
|
+
* Represents a code block - if, elseif, else, foreach, do, and while.
|
18
|
+
* @package PHamlP
|
19
|
+
* @subpackage Haml.tree
|
20
|
+
*/
|
21
|
+
class HamlCodeBlockNode extends HamlNode {
|
22
|
+
/**
|
23
|
+
* @var HamlCodeBlockNode else nodes for if statements
|
24
|
+
*/
|
25
|
+
public $else;
|
26
|
+
/**
|
27
|
+
* @var string while clause for do-while loops
|
28
|
+
*/
|
29
|
+
public $doWhile;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Adds an "else" statement to this node.
|
33
|
+
* @param SassIfNode "else" statement node to add
|
34
|
+
* @return SassIfNode this node
|
35
|
+
*/
|
36
|
+
public function addElse($node) {
|
37
|
+
if (is_null($this->else)) {
|
38
|
+
$node->root = $this->root;
|
39
|
+
$node->parent = $this->parent;
|
40
|
+
$this->else = $node;
|
41
|
+
}
|
42
|
+
else {
|
43
|
+
$this->else->addElse($node);
|
44
|
+
}
|
45
|
+
return $this;
|
46
|
+
}
|
47
|
+
|
48
|
+
public function render() {
|
49
|
+
$output = $this->renderer->renderStartCodeBlock($this);
|
50
|
+
foreach ($this->children as $child) {
|
51
|
+
$output .= $child->render();
|
52
|
+
} // foreach
|
53
|
+
$output .= (empty($this->else) ?
|
54
|
+
$this->renderer->renderEndCodeBlock($this) : $this->else->render());
|
55
|
+
|
56
|
+
return $this->debug($output);
|
57
|
+
}
|
58
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<?php
|
2
|
+
/* SVN FILE: $Id: HamlCommentNode.php 49 2010-04-04 10:51:24Z chris.l.yates $ */
|
3
|
+
/**
|
4
|
+
* HamlCommentNode class file.
|
5
|
+
* @author Chris Yates <chris.l.yates@gmail.com>
|
6
|
+
* @copyright Copyright (c) 2010 PBM Web Development
|
7
|
+
* @license http://phamlp.googlecode.com/files/license.txt
|
8
|
+
* @package PHamlP
|
9
|
+
* @subpackage Haml.tree
|
10
|
+
*/
|
11
|
+
|
12
|
+
/**
|
13
|
+
* HamlCommentNode class.
|
14
|
+
* Represents a comment, including MSIE conditional comments.
|
15
|
+
* @package PHamlP
|
16
|
+
* @subpackage Haml.tree
|
17
|
+
*/
|
18
|
+
class HamlCommentNode extends HamlNode {
|
19
|
+
private $isConditional;
|
20
|
+
|
21
|
+
public function __construct($content, $parent) {
|
22
|
+
$this->content = $content;
|
23
|
+
$this->isConditional = (bool)preg_match('/^\[.+\]$/', $content, $matches);
|
24
|
+
$this->parent = $parent;
|
25
|
+
$this->root = $parent->root;
|
26
|
+
$parent->children[] = $this;
|
27
|
+
}
|
28
|
+
|
29
|
+
public function getIsConditional() {
|
30
|
+
return $this->isConditional;
|
31
|
+
}
|
32
|
+
|
33
|
+
public function render() {
|
34
|
+
$output = $this->renderer->renderOpenComment($this);
|
35
|
+
foreach ($this->children as $child) {
|
36
|
+
$output .= $child->render();
|
37
|
+
} // foreach
|
38
|
+
$output .= $this->renderer->renderCloseComment($this);
|
39
|
+
return $this->debug($output);
|
40
|
+
}
|
41
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<?php
|
2
|
+
/* SVN FILE: $Id: HamlDoctypeNode.php 49 2010-04-04 10:51:24Z chris.l.yates $ */
|
3
|
+
/**
|
4
|
+
* HamlDoctypeNode class file.
|
5
|
+
* @author Chris Yates <chris.l.yates@gmail.com>
|
6
|
+
* @copyright Copyright (c) 2010 PBM Web Development
|
7
|
+
* @license http://phamlp.googlecode.com/files/license.txt
|
8
|
+
* @package PHamlP
|
9
|
+
* @subpackage Haml.tree
|
10
|
+
*/
|
11
|
+
|
12
|
+
/**
|
13
|
+
* HamlDoctypeNode class.
|
14
|
+
* Represents a Doctype.
|
15
|
+
* Doctypes are always rendered on a single line with a newline.
|
16
|
+
* @package PHamlP
|
17
|
+
* @subpackage Haml.tree
|
18
|
+
*/
|
19
|
+
class HamlDoctypeNode extends HamlNode {
|
20
|
+
/**
|
21
|
+
* Render this node.
|
22
|
+
* @return string the rendered node
|
23
|
+
*/
|
24
|
+
public function render() {
|
25
|
+
return $this->debug($this->content . "\n");
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<?php
|
2
|
+
/* SVN FILE: $Id: HamlElementNode.php 83 2010-05-17 16:35:54Z chris.l.yates $ */
|
3
|
+
/**
|
4
|
+
* HamlElementNode class file.
|
5
|
+
* @author Chris Yates <chris.l.yates@gmail.com>
|
6
|
+
* @copyright Copyright (c) 2010 PBM Web Development
|
7
|
+
* @license http://phamlp.googlecode.com/files/license.txt
|
8
|
+
* @package PHamlP
|
9
|
+
* @subpackage Haml.tree
|
10
|
+
*/
|
11
|
+
|
12
|
+
require_once('HamlRootNode.php');
|
13
|
+
require_once('HamlNodeExceptions.php');
|
14
|
+
|
15
|
+
/**
|
16
|
+
* HamlElementNode class.
|
17
|
+
* Represents an element.
|
18
|
+
* @package PHamlP
|
19
|
+
* @subpackage Haml.tree
|
20
|
+
*/
|
21
|
+
class HamlElementNode extends HamlNode {
|
22
|
+
public $isBlock;
|
23
|
+
public $isSelfClosing;
|
24
|
+
public $attributes;
|
25
|
+
public $whitespaceControl;
|
26
|
+
public $escapeHTML;
|
27
|
+
|
28
|
+
public function render() {
|
29
|
+
$renderer = $this->renderer;
|
30
|
+
$this->output = $renderer->renderOpeningTag($this);
|
31
|
+
$close = $renderer->renderClosingTag($this);
|
32
|
+
|
33
|
+
if ($this->whitespaceControl['outer']['left']) {
|
34
|
+
$this->output = ltrim($this->output);
|
35
|
+
$close = rtrim($close);
|
36
|
+
$this->parent->output = rtrim($this->parent->output);
|
37
|
+
}
|
38
|
+
|
39
|
+
foreach ($this->children as $index=>$child) {
|
40
|
+
$output = $child->render();
|
41
|
+
$output = ($this->whitespaceControl['inner'] ? trim($output) : $output);
|
42
|
+
if ($index && $this->children[$index-1] instanceof HamlElementNode && $this->children[$index-1]->whitespaceControl['outer']['right']) {
|
43
|
+
$output = ltrim($output);
|
44
|
+
}
|
45
|
+
$this->output .= $output;
|
46
|
+
} // foreach
|
47
|
+
|
48
|
+
return $this->debug($this->output . (isset($child) &&
|
49
|
+
$child instanceof HamlElementNode &&
|
50
|
+
$child->whitespaceControl['outer']['right'] ? ltrim($close) : $close));
|
51
|
+
}
|
52
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<?php
|
2
|
+
/* SVN FILE: $Id: HamlFilterNode.php 49 2010-04-04 10:51:24Z chris.l.yates $ */
|
3
|
+
/**
|
4
|
+
* HamlFilterNode class file.
|
5
|
+
* @author Chris Yates <chris.l.yates@gmail.com>
|
6
|
+
* @copyright Copyright (c) 2010 PBM Web Development
|
7
|
+
* @license http://phamlp.googlecode.com/files/license.txt
|
8
|
+
* @package PHamlP
|
9
|
+
* @subpackage Haml.tree
|
10
|
+
*/
|
11
|
+
|
12
|
+
/**
|
13
|
+
* HamlFilterNode class.
|
14
|
+
* Represent a filter in the Haml source.
|
15
|
+
* The filter is run on the output from child nodes when the node is rendered.
|
16
|
+
* @package PHamlP
|
17
|
+
* @subpackage Haml.tree
|
18
|
+
*/
|
19
|
+
class HamlFilterNode extends HamlNode {
|
20
|
+
/**
|
21
|
+
* @var HamlBaseFilter the filter to run
|
22
|
+
*/
|
23
|
+
private $filter;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* HamlFilterNode constructor.
|
27
|
+
* Sets the filter.
|
28
|
+
* @param HamlBaseFilter the filter to run
|
29
|
+
* @return HamlFilterNode
|
30
|
+
*/
|
31
|
+
public function __construct($filter, $parent) {
|
32
|
+
$this->filter = $filter;
|
33
|
+
$this->parent = $parent;
|
34
|
+
$this->root = $parent->root;
|
35
|
+
$parent->children[] = $this;
|
36
|
+
}
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Render this node.
|
40
|
+
* The filter is run on the content of child nodes before being returned.
|
41
|
+
* @return string the rendered node
|
42
|
+
*/
|
43
|
+
public function render() {
|
44
|
+
$output = '';
|
45
|
+
foreach ($this->children as $child) {
|
46
|
+
$output .= $child->getContent();
|
47
|
+
} // foreach
|
48
|
+
return $this->debug($this->filter->run($output));
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<?php
|
2
|
+
/* SVN FILE: $Id: HamlHelperNode.php 117 2010-09-21 09:41:58Z chris.l.yates@gmail.com $ */
|
3
|
+
/**
|
4
|
+
* HamlHelperNode class file.
|
5
|
+
* @author Chris Yates <chris.l.yates@gmail.com>
|
6
|
+
* @copyright Copyright (c) 2010 PBM Web Development
|
7
|
+
* @license http://phamlp.googlecode.com/files/license.txt
|
8
|
+
* @package PHamlP
|
9
|
+
* @subpackage Haml.tree
|
10
|
+
*/
|
11
|
+
|
12
|
+
/**
|
13
|
+
* HamlHelperNode class.
|
14
|
+
* Represent a helper in the Haml source.
|
15
|
+
* The helper is run on the output from child nodes when the node is rendered.
|
16
|
+
* @package PHamlP
|
17
|
+
* @subpackage Haml.tree
|
18
|
+
*/
|
19
|
+
class HamlHelperNode extends HamlNode {
|
20
|
+
const MATCH = '/(.*?)(\w+)\((.+?)\)(?:\s+(.*))?$/';
|
21
|
+
const PRE = 1;
|
22
|
+
const NAME = 2;
|
23
|
+
const ARGS = 3;
|
24
|
+
const BLOCK = 4;
|
25
|
+
|
26
|
+
/**
|
27
|
+
* @var string the helper class name
|
28
|
+
*/
|
29
|
+
private $class;
|
30
|
+
/**
|
31
|
+
* @var string helper method name
|
32
|
+
*/
|
33
|
+
private $pre;
|
34
|
+
/**
|
35
|
+
* @var string helper method name
|
36
|
+
*/
|
37
|
+
private $name;
|
38
|
+
/**
|
39
|
+
* @var string helper method arguments
|
40
|
+
*/
|
41
|
+
private $args;
|
42
|
+
|
43
|
+
/**
|
44
|
+
* HamlFilterNode constructor.
|
45
|
+
* Sets the filter.
|
46
|
+
* @param string helper class.
|
47
|
+
* @param string helper call.
|
48
|
+
* @return HamlHelperNode
|
49
|
+
*/
|
50
|
+
public function __construct($class, $pre, $name, $args, $parent) {
|
51
|
+
$this->class = $class;
|
52
|
+
$this->pre = $pre;
|
53
|
+
$this->name = $name;
|
54
|
+
$this->args = $args;
|
55
|
+
$this->parent = $parent;
|
56
|
+
$this->root = $parent->root;
|
57
|
+
$parent->children[] = $this;
|
58
|
+
}
|
59
|
+
|
60
|
+
/**
|
61
|
+
* Render this node.
|
62
|
+
* The filter is run on the content of child nodes before being returned.
|
63
|
+
* @return string the rendered node
|
64
|
+
*/
|
65
|
+
public function render() {
|
66
|
+
$children = '';
|
67
|
+
foreach ($this->children as $child) {
|
68
|
+
$children .= trim($child->render());
|
69
|
+
} // foreach
|
70
|
+
$output = '<?php '.(empty($this->pre) ? 'echo' : $this->pre)." {$this->class}::{$this->name}('$children',{$this->args}); ?>";
|
71
|
+
return $this->debug($output);
|
72
|
+
}
|
73
|
+
}
|