rywa / silverstripe-foundation
SilverStripe 的 Foundation 5 原型主题
Requires
README
将 Foundation 5 + Compass/Grunt 打包成一个干净的 SilverStripe 主题,适合快速原型设计或作为您自己的响应式主题的坚实基础。
基于 Foundation Compass 模板 和 Foundation libsass 模板。
实时主题演示
http://silverstripe-foundation.com
使用主题
您可以使用主题的两种不同的方式。
-
使用 Composer 管理主题 并通过
composer update
进行更新。如果您使用该主题进行原型设计且不需要直接编辑主题文件,则应使用此方法。 -
将主题作为您自己的自定义主题的起点。在这种情况下,您最好通过 使用 git 安装并将更改提交到您的 git 仓库。
Composer 安装
"require": { "rywa/silverstripe-foundation": "1.1.*" }
将 themes/foundation
添加到您的 .gitignore
Git 安装
cd themes
git clone git://github.com/ryanwachtl/silverstripe-foundation-theme.git foundation
启用主题
SSViewer:
theme: 'foundation'
在 /mysite/_config/config.yml
使用 Compass 和 Bower
如果您正在编辑 Sass 文件,只需运行以下命令
compass watch
如果您想将来升级到 Foundation 的新版本,只需运行
bower update
使用 Grunt & Libsass(而不是 Compass)
您可以使用 Grunt 和 Libsass 而不是 Compass。
您需要设置 npm 包,为此,请进入主题目录并运行
npm install
现在,运行
grunt
要求
SilverStripe 3.1.x
可选
使用 Compass
- Ruby 1.9+
- compass:
gem install compass
使用 Grunt
- Grunt:
npm install -g grunt-cli
推荐
虽然这不是必需的,但您可以通过安装下面的 foundationforms
模块来获得最佳体验。Foundation Forms 模块也与 User Forms 模块 兼容,并成为其绝佳的伴侣。
SilverStripe ZURB Foundation Forms 模块
使用 .ss 模板与 Interchange
SilverStripe ZURB Foundation Interchange 模块
以下链接的 Gist 是我使用的自定义 Editor Config。它是一行按钮,具有 Foundation 特定样式。
SilverStripe Foundation HtmlEditorConfig Gist
关于 Foundation 5
Foundation 是世界上最先进的响应式前端框架。使用 Foundation,您可以快速创建在任何设备上工作的网站或应用的原型,并提供大量内置布局结构(如完整的响应式网格)、元素和最佳实践。