定制 dxw/govpress-blocks 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dxw/govpress-blocks

Composer 安装命令:

composer require dxw/govpress-blocks

包简介

Reusable custom blocks for WordPress

README 文档

README

A library of reusable blocks for use in GovPress projects.

How to use

  1. Install the package in your theme:
    composer require dxw/govpress-blocks
    
  2. Use the factory to create the blocks you want to use, and pass them any configuration, e.g. To create a card block with default config:
    \Dxw\GovPressBlocks\Factory::create('card');
    
    To create a card block that renders a custom template:
    \Dxw\GovPressBlocks\Factory::create('card', [
      'template' => '\the\full\path\to\your\custom\template.php`
    ]);
    
    For dxw projects, the recommended approach is to add this code to your theme's app/di.php, if the theme uses Iguana.
  3. If you want to use the default styles for a block, import them into your main SASS file like so (where the final name in the path is the block type):
    @import 'vendor/dxw/govpress-blocks/assets/scss/blocks/card'
    

The available blocks are documented below.

Blocks

Card

\Dxw\GovPressBLocks\Factory::create('card', array $config)

Config options:

[
    'template' => string $theFullPathToYourCustomCardTemplate
]

Sass:

@import 'vendor/dxw/govpress-blocks/assets/scss/blocks/card'

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 8
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固