mcustiel / inlineassets-plugin
Provides inlineStyles and inlineScripts that embed the assets in the HTML
Installs: 709
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Type:october-plugin
Requires
This package is auto-updated.
Last update: 2023-07-19 06:32:40 UTC
README
OctoberCMS plugin that provides embedding of assets to pages.
Twig tags
inlineStyles
Embeds the content of the add css files into the HTML code.
Example
- Component.php
$this->addCss('my/style.css');
- my/style.css
a { color: red; }
- twig.htm:
<head> {% inlineStyles %} </head>
- HTML result:
<head> <style type="text/css"> a { color: red; } </style> </head>
inlineScripts
The behaviour of this tag is analog to that of inlineStyles, for javascript assets added with addJs.