[wordpress插件] Bulma Shortcodes布尔玛简码

wordpress 插件 文章 2020-03-14 02:10 532 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

This plugin adds a collection of WordPress shortcodes for Bulma components as well as a simple TinyMCE dropdown to add them.<

此插件为布尔玛组件以及一个简单的TinyMCE下拉列表添加了WordPress短代码集合。

/p>

/ p>

Usage

用法

The easiest way to add shortcodes is through the Bulma dropdown in the WordPress editor.

添加短代码的最简单方法是通过WordPress编辑器中的Bulma下拉菜单。

Alternatively, you can manually type out the shortcodes.

另外,您也可以手动输入简码。

Columns

Columns are used to create a responsive grid:

列用于创建响应式网格:

[bulma-columns]

  [bulma-columns]

[bulma-column]

[bulma-column]

Your content...

您的内容...

[/bulma-column]

[/ bulma-column]

[bulma-column]

[bulma-column]

Your content...

您的内容...

[/bulma-column]

[/ bulma-column]

[/bulma-columns]

[/ bulma-columns]

The [bulma-column] shortcode accepts a type argument:

[bulma-column] 简码接受类型参数:

[bulma-column type="is-8"][/bulma-column]

  [bulma-column type =“ is-8”] [/ bulma-column]

Due to limitations within the WordPress shortcode system, nesting identical shortcodes will break.

由于WordPress简码系统的局限性,嵌套相同的简码会中断。

To work around this, there are additional shortcodes you can use that will also produce columns:

要解决此问题,您可以使用其他一些短代码,这些短代码也会产生列:

// Will break

  //会中断

[bulma-columns]    

[布尔列]    

[bulma-column]        

[bulma-column]        

[bulma-columns]            

[布尔列]            

[bulma-column][/bulma-column]            

[bulma-column] [/ bulma-column]            

[bulma-column][/bulma-column]        

[bulma-column] [/ bulma-column]        

[/bulma-columns]    

[/ bulma-columns]    

[/bulma-column]    

[/ bulma-column]    

[bulma-column]        

[bulma-column]        

[bulma-columns]            

[布尔列]            

[bulma-column][/bulma-column]            

[bulma-column] [/ bulma-column]            

[bulma-column][/bulma-column]        

[bulma-column] [/ bulma-column]        

[/bulma-columns]    

[/ bulma-columns]    

[/bulma-column]

[/ bulma-column]

[/bulma-columns]

[/ bulma-columns]

// Will Work

// 将工作

[bulma-columns]    

[布尔列]    

[bulma-column]        

[bulma-column]        

[bulma-columns-1]            

[bulma-columns-1]            

[bulma-column-1][/bulma-column-1]            

[bulma-column-1] [/ bulma-column-1]            

[bulma-column-1][/bulma-column-1]        

[bulma-column-1] [/ bulma-column-1]        

[/bulma-columns-1]    

[/ bulma-columns-1]    

[/bulma-column]    

[/ bulma-column]    

[bulma-column]        

[bulma-column]        

[bulma-columns-1]            

[bulma-columns-1]            

[bulma-column-1][/bulma-column-1]            

[bulma-column-1] [/ bulma-column-1]            

[bulma-column-1][/bulma-column-1]        

[bulma-column-1] [/ bulma-column-1]        

[/bulma-columns-1]    

[/ bulma-columns-1]    

[/bulma-column]

[/ bulma-column]

[/bulma-columns]

[/ bulma-columns]

You can nest up to five levels deep with this system (column, column-1, column-2, column-3, column-4).

此系统最多可以嵌套五个级别(列,列1,列2,列3,列4)。

Button

按钮

Creates the tag Your Content.

创建标签 您的内容

Accepts three arguments:

接受三个参数:

    • type – Accepts class names – defaults to ‘is-primary’
    • 类型 –接受类名–默认为“是主要”

    • link – Accepts strings – defaults to ‘#’
    • 链接 –接受字符串–默认为“#”

    • icon – Accepts valid font-awesome icon names
    • 图标 –接受有效的字体很棒图标名称

    Ex: [bulma-button type="is-primary" link="www.example.com" icon="github"]Star on GitHub[/bulma-button].

    例如: [bulma-button type =“ is-primary” link =“ www.example.com” icon =“ github”]在GitHub上为星标[/bulma-button]

    p>

    >

    Icon

    图标

    Creates the tag .

    创建标签 >

    Accepts two arguments:

    接受两个参数:

      • type – Accepts class names – defaults to ‘is-primary’
      • 类型 –接受类名–默认为“是主要”

      • icon – Accepts valid font-awesome icon names
      • 图标 –接受有效的字体很棒图标名称

      Box

      Box

      Adds a Bulma box element.

      添加布尔玛盒元素。

      Accepts one argument, type.

      接受一个参数,输入。

      Defaults to NOT full-width box as this element in WordPress is mostly helpful for adding emphasis to an item like a photo.

      默认为NOT full-width box,因为WordPress中的此元素对于增加对照片等项的强调最为有用。

      If type is set to full-width, it’ll behave like a normal Bulma box.

      如果将type设置为全角,它将像普通的布尔玛盒一样。

      Ex:

      例如:

      // NOT full-width

        //非全角

      [bulma-box]Your content...[/bulma-box]

      [bulma-box]您的内容... [/ bulma-box]

      // Full-width

      // 全屏宽度

      [bulma-box type="full-width"]Your Content...[/bulma-box]

      [bulma-box type =“ full-width”]您的内容... [/ bulma-box]

      Notification

      通知

      Adds a Bulma notification element.

      添加布尔玛通知元素。

      Accepts one argument, type.

      接受一个参数,输入。

      Ex: [bulma-notification type="is-primary"]Alert[/bulma-notification]

      例如: [bulma-notification type =“ is-primary”]警报[/ bulma-notification]

      Card

      Creates a Bulma Card element.

      创建一个布尔玛卡元素。

      This shortcode has several child codes:

      该短代码包含几个子代码:

      [bulma-card]

        [大牌]

      [bulma-card-header][/culma-card-header]

      [bulma-card-header] [/ culma-card-header]

      [bulma-card-content][/bulma-card-content]

      [bulma-card-content] [/ bulma-card-content]

      [bulma-card-footer][/bulma-card-footer]

      [bulma-card-footer] [/ bulma-card-footer]

      [/bulma-card]

      [/丰满卡]

      None of the shortcodes accept arguments.

      所有简码都不接受参数。

      [bulma-card-footer] can be given multiple footer items:

      可以为

        [bulma-card-footer]提供多个页脚项:

      [bulma-card-footer]Item1|Item2|Item3[/bulma-card-footer]

      [bulma-card-footer] Item1 | Item2 | Item3 [/ bulma-card-footer]

      // Will generate:

      //将生成:

          

          

      Menu

      菜单

      Creates a Bulma menu.

      创建布尔玛菜单。

      Ex:

      例如:

      [bulma-menu]

        [bulma-menu]

      [bulma-menu-label]Label[/bulma-menu-label]

      [bulma-menu-label]标签[/ bulma-menu-label]

      [bulma-menu-list]Item1|Item2[/bulma-menu-list]

      [bulma-menu-list] Item1 | Item2 [/ bulma-menu-list]

      [/bulma-menu]

      [/ bulma-menu]

安装步骤

    1. Ensure that you have the most recent version of Bulma CSS added to your theme.
    2. 确保已将最新版本的Bulma CSS添加到主题中。

    3. Upload the plugin files to /wp-content/plugins/plugin-name or install directly through WordPress.
    4. 将插件文件上传到 / wp-content / plugins / plugin-name 或直接通过WordPress安装。

    5. Activate the plugin!
    6. 激活插件!

下载地址
https://downloads.wordpress.org/plugin/bulma-shortcodes.1.0.zip
-EOF-

AI助手支持GPT4.0