Giter VIP home page Giter VIP logo

acorn-block-templates's Introduction

Acorn Block Templates

Easily override block markup with Blade templates in Sage 10.

Requirements

Installation

Install via Composer:

$ composer require tiny-pixel/acorn-block-templates

Usage

Create a blocks directory in resources/views. Templates should be named after the block they target and should be placed within a directory with a name matching the block's namespace.

Example

├── blocks
    └── core
        ├── gallery.blade.php     # core/gallery
        ├── image.blade.php       # core/image
        └── paragraph.blade.php   # core/paragraph

The template is passed two variables: $attr and $content.

  • $attr is an array of the block's attributes.
  • $content is a string of the block's output.

In this way you can override the template for any block, regardless of if it is registered by core or a plugin. You can use Composers, extends, or any other feature afforded to you by Sage, Illuminate or other packages.

Contributing

Contributing, whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.

All contributors absolutely must strictly adhere to our Code of Conduct.

License

This project is provided under the MIT License.

acorn-block-templates's People

Contributors

dsturm avatar kellymears avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.