• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

foundation/foundation-emails: Quickly create responsive HTML emails that work on ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

foundation/foundation-emails

开源软件地址:

https://github.com/foundation/foundation-emails

开源编程语言:

HTML 60.7%

开源软件介绍:

Foundation for Emails

npm version badge downloads badge Gem Version downloads badge CDNJS

Foundation for Emails (previously known as Ink) is a framework for creating responsive HTML emails that work in any email client — even Outlook. Our HTML/CSS components have been tested across every major email client to ensure consistency. And with the Inky templating language, writing HTML emails is now even easier.

Getting Started

The main way to get started is with our email template stack. To use the stack, you'll need Node.js no greater than version 10 installed on your machine.

nvm installation instructions can be found here

To set up the emails template, run these commands:

git clone https://github.com/zurb/foundation-emails-template project
cd project
nvm install 10
nvm use 10
npm install

Then run npm start to run the project. A new browser window will open with a BrowserSync server showing the finished files.

Run npm run build to do a full email inlining process.

Using the Ruby gem

foundation_emails is a gem that enables you to use Foundation for Emails assets within a Rails project. To install in your app:

  1. Add the following line to your Gemfile:
gem 'foundation_emails'
  1. Then execute:
bundle install
  1. Import Foundation for Emails in your emails' stylesheet(s):
// app/assets/stylesheets/your_emails_stylesheet.scss

@import "foundation-emails";

Adding Inky's templating capabilities to Rails is easy thanks to the inky-rb gem, which bundles foundation_emails by default.

Documentation

Check out our Migration Guide for upgrading an existing template or for more in-depth code examples.

Foundation for Emails 2.0 documentation and framework are on the develop branch and you can compile it on your own machine.

Run these commands to set up the documentation:

git clone https://github.com/zurb/foundation-emails.git
cd foundation-emails

Foundation for Emails 2.0 documentation is on the develop branch.

git fetch
git checkout develop
npm install

Then run npm start to compile the documentation. When it finishes, a new browser window will open pointing to a BrowserSync server displaying the documentation.

Testing

Run npm run test:visual to compile the visual regression tests. All of the pages under test/visual/pages are compiled and inlined. From there, they can be uploaded to Litmus for testing.

Inky

Inky is our new templating language that converts simple HTML into the complex tables required for email layout.

The parser converts a set of custom HTML tags, expanding them out into full HTML syntax. Below is a list of every custom element.

Grid

<container>
  <row>
    <column small="12" large="4"></column>
    <column small="12" large="8"></column>
  </row>
</container>

Block Grid

<block-grid up="3">
  <td></td>
  <td></td>
  <td></td>
</block-grid>

Components

<button href="http://zurb.com"></button>
<menu>
  <item href="one.html">Item One</item>
  <item href="one.html">Item Two</item>
  <item href="one.html">Item Three</item>
</menu>

Contributing

As an open source project, we looooove our community support. Please file issues, or better yet pull requests on the Foundation for Emails Repo. We're stoked to hear your feedback, make improvements, and keep evolving Foundation for Emails!

Copyright (c) 2018 ZURB, inc.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap