mcustiel/inlineassets-plugin

There is no license information available for the latest version (v1.0.1) of this package.

Provides inlineStyles and inlineScripts that embed the assets in the HTML

Installs: 682

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:october-plugin

v1.0.1 2016-10-07 12:37 UTC

This package is auto-updated.

Last update: 2022-06-19 04:22:29 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.