Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Materialize Bundle Laravel Package

evheniy/materialize-bundle

MaterializeBundle integrates the Materialize CSS framework into Symfony2 via cdnjs CDN, with optional local JS, CSS, and font sourcing configured through config.yml. Includes Assetic support and Twig template includes for styles and scripts.

View on GitHub
Deep Wiki
Context7

MaterializeBundle

knpbundles.com

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status Coverage Status Scrutinizer Code Quality Build Status

This bundle provides Materialize in Symfony2 from CDN cdnjs

Installation

$ composer require evheniy/materialize-bundle "1.*"

Or add to composer.json

"evheniy/materialize-bundle": "1.*"

AppKernel:

public function registerBundles()
    {
        $bundles = array(
            ...
            new Evheniy\MaterializeBundle\MaterializeBundle(),
        );
        ...

config.yml:

#MaterializeBundle
materialize: ~

or

#MaterializeBundle
materialize:
    local_js: '@AppBundle/Resources/public/js/materialize.min.js'
    local_fonts_dir: '@AppBundle/Resources/public/fonts/'
    local_css: '@AppBundle/Resources/public/css/materialize.min.css'
    local_cdn: 'cdn.domain.com'
    version: 0.97.0
    html5: true
    async: false

And Assetic Configuration in config.yml:

#Assetic Configuration
assetic:
    bundles: [ MaterializeBundle ]

Add this string to your layout (styles and js)

<html>
    <head>
    ...

    {%- include "MaterializeBundle:Materialize:css.html.twig" -%}
    </head>
    <body>
    ...

    {%- include "MaterializeBundle:Materialize:js.html.twig" -%}
    </body>
</html>

The last step

app/console assetic:dump --env=prod --no-debug

Documentation

You can change Materialize version:

materialize:
    version: 0.97.0

You can set Materialize local version (it helps if cdn doesn't work).

materialize:
    local_js: '@AppBundle/Resources/public/js/materialize.min.js'

Default value: '@MaterializeBundle/Resources/public/js/materialize.min.js'

materialize:
    local_fonts_dir: '@AppBundle/Resources/public/fonts/'

Default value: '@MaterializeBundle/Resources/public/fonts/'

materialize:
    local_css: '@AppBundle/Resources/public/css/materialize.min.css'

Default value: '@MaterializeBundle/Resources/public/css/materialize.min.css'

You can set local CDN:

materialize:
    local_cdn: 'cdn.domain.com'

You can use old html version:

materialize:
    html5: false

Default value: true. If false script will be with type="text/javascript"

You can use async loading:

materialize:
    async: true

Default value: false. If true script will be with async="async"

License

This bundle is under the MIT license.

Документация на русском языке

Materialize

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin