bezoerb/shopware-styleguide

风格指南插件允许您轻松地为您的Shopware安装添加一个动态风格指南

安装: 50

依赖项: 0

建议者: 0

安全: 0

星星: 5

关注者: 3

分支: 0

开放问题: 0

类型:shopware-plugin

v1.1.2 2018-10-17 05:04 UTC

This package is not auto-updated.

Last update: 2024-09-15 05:44:37 UTC


README

Software License

轻松为您的shopware项目添加动态风格指南

安装

使用composer安装

此方法需要Shopware也通过composer安装。有关详细信息,请参阅此指南:developers-guide/shopware-composer

composer require bezoerb/shopware-styleguide

替代安装方法

如果您不想使用composer,您将不得不下载最新的发布版本并将文件复制到custom/plugins/Styleguide。之后,您需要通过composer安装插件依赖项。

cd custom/plugins/Styleguide
composer install

此插件尚未在Shopware插件注册表中找到。

入门

安装并激活此插件后,您可以通过URL http://my.shopoware.project.com/styleguide 访问风格指南

插件会尝试从主题配置中提取有关您的主题的一些基本信息,例如颜色和字体。如果您要扩展Shopware响应式主题,页面应类似于以下内容

styleguide

文件结构

风格指南组件

此插件会收集在THEME/frontend/_includes/styleguide/**/*.tpl中提供的所有文件
它还会截获分配给{$sMainCategories}模板的THEME/frontend/_includes/styleguide/内部每个文件夹的菜单条目

这些文件夹中的每个文件应代表风格指南中的一个部分

示例

{extends file="frontend/styleguide/section.tpl"}

{block name="frontend_styleguide_section_title"}
  Fonts
{/block}

{block name="frontend_styleguide_section_description"}
  Lorem ipsum ...
{/block}

{block name="frontend_styleguide_section_content"}
  Main content...
{/block}

example

Smarty助手

此插件包含一些助手和模板,以帮助您开始。

styleguide_html

用法: {styleguide_html} ... {/styleguide_html}

将任何标记放在其中,您将获得预览。
您可以在开头添加HTML注释以提供一些文档(支持Markdown)。

example

styleguide_function

用法: {styleguide_function name="..." arguments=[...]}

参数

  • name: smarty函数名称
  • arguments: 关联数组或关联数组的数组,包含函数参数。使用参数数组的数组来显示函数结果的不同变体。

styleguide_include

用法: {styleguide_include file="..." arguments=[...]}

参数

  • file: 文件名
  • arguments: 关联数组或关联数组的数组,包含传递给包含文件的变量。使用参数数组的数组来显示组件的不同变体。

许可证

MIT许可证(MIT)。有关更多信息,请参阅许可证文件

© Ben Zörb