2017 © Pedro Peláez
 

neos-package fusion-dynamicstyles

A Neos Fusion custom meta handler to extract dynamic stylesheet during page rendering

image

ttree/fusion-dynamicstyles

A Neos Fusion custom meta handler to extract dynamic stylesheet during page rendering

  • Saturday, January 28, 2017
  • by ttree
  • Repository
  • 4 Watchers
  • 4 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Dynamic Styles

This package contains Fusion objects to extract dynamic stylesheet during page rendering., (*1)

Warning: The current Fusion implementation does not support this feature, so this package require this Pull Request, (*2)

It's common to have complex components that are used only on a few pages. With this plugin you can nicely define in your Fusion object when you need a specific stylesheets for the the current Fusion object., (*3)

Configure your Fusion objects

prototype(WebStarter:Object.PersonList) < prototype(Fusion:Template) {
    templatePath = 'resource://Ttree.SwissConfederation.WebStarter/Private/Templates/PersonList.html'
    @css         = 'resource://Ttree.SwissConfederation.WebStarter/Private/Stylesheets/PersonList.css'
}

Configure your document to inline the CSS during page rendering

prototype(Neos.Neos:Page).@process.styles = Ttree.Fusion.DynamicStyles:InlineStyles

Configure your document to build a minified external CSS with all the CSS used in the current page

prototype(Neos.Neos:Page).@process.styles = Ttree.Fusion.DynamicStyles:ExternalStyles

What's next ?

  • [x] Fusion object to inline external CSS resource (inline)
  • [x] CSS minification
  • [x] Add a Fusion object to include external CSS resource
  • [ ] More inteligent build process (css ordering, ...)
  • [ ] Add more configuration (minification, concatenation, compression, ..)
  • [ ] Generate the CSS name automatically based on the prototype name (pluggable)
  • [x] Concatenation
  • [ ] Gzip

Acknowledgments

Development sponsored by ttree ltd - neos solution provider., (*4)

We try our best to craft this package with a lots of love, we are open to sponsoring, support request, ... just contact us., (*5)

License

The MIT License (MIT). Please see LICENSE for more information., (*6)

The Versions

28/01 2017

dev-master

9999999-dev

A Neos Fusion custom meta handler to extract dynamic stylesheet during page rendering

  Sources   Download

MIT

The Requires