]> git.ipfire.org Git - thirdparty/foundation/foundation-emails.git/commitdiff
adds panini docs
authorRafiBomb <rafi@zurb.com>
Wed, 23 Mar 2016 20:06:06 +0000 (13:06 -0700)
committerRafiBomb <rafi@zurb.com>
Wed, 23 Mar 2016 20:06:06 +0000 (13:06 -0700)
docs/pages/panini.md
docs/partials/component-list.html
gulpfile.js

index b343c49bf3d11c4b81b60eff68afabe5948131f7..6c08d55fdefde642d444d77a57373b5af8bc273e 100644 (file)
@@ -8,11 +8,11 @@ library:
 
 {{{{raw}}}}
 
-If you've ever created a static site, maybe you had five pages that all shared the same header and footer. You create your first page, and then copy and paste the common elements to the next page. But now if you need to make a change to the header, the change has to be made across multiple files.
+If you've ever created a static site, maybe you had five pages that all shared the same header and footer. You create your first page, and then copy and paste the common elements to the next page. But now if you need to make a change to the header, the change has to be made across multiple files. You can do this with Emails in your campaigns too!
 
 Panini is a flat file compiler that uses the concepts of templates, pages, and partials&mdash;powered by the [Handlebars](http://handlebarsjs.com/) templating language&mdash;to streamline the process of creating static prototypes.
 
-Our [prototyping template](starter-projects.html) uses Panini, along with a host of other tools for processing Sass, JavaScript, and images, to make creating static prototypes easy. It's already been configured to utilize all of the features below, but if you want to learn the specifics of how to configure the library, head over to the [Panini GitHub page](https://github.com/zurb/panini).
+Our [prototyping template](starter-projects.html) uses Panini, along with a host of other tools for processing Sass and images, to make creating optimized templates easy. It's already been configured to utilize all of the features below, but if you want to learn the specifics of how to configure the library, head over to the [Panini GitHub page](https://github.com/zurb/panini).
 
 ---
 
@@ -25,7 +25,7 @@ Here's what a basic template might look like:
 ```handlebars
 <html>
   <head>
-    <title>Definitely a Website!</title>
+    <title>Definitely an Email!</title>
   </head>
   <body>
     <header class="header"><!-- ... --></header>
@@ -48,7 +48,7 @@ A basic page might look like this:
 
 Note that there's no `<html>` or `<body>` tags, and no header or footer. This code will be injected into the `{{> body}}` declaration when Panini assembles your pages.
 
-In the prototyping template, these finished files are compiled into a standalone folder called `dist` (short for "distribution"), which also includes your processed CSS, JavaScript, and images. This folder can easily be uploaded to any web server, or Notable's [Hosted Prototypes](http://zurb.com/notable/features/hosted) service.
+In the prototyping template, these finished files are compiled into a standalone folder called `dist` (short for "distribution"), which also includes your processed CSS, JavaScript, and images. This folder can easily be uploaded to any ESP (Email Service Provider).
 
 ---
 
@@ -61,11 +61,10 @@ Here's an example of a layout file that divides its key sections into partials:
 ```handlebars
 <html>
   <head>
-    <title>Definitely STILL a Website!</title>
+    <title>Definitely STILL an Email!</title>
   </head>
   <body>
-    {{> header}}
-    {{> navigation}}
+    {{> header}
     {{> body}}
     {{> footer}}
   </body>
@@ -232,4 +231,10 @@ Panini will load in the contents of this YML file as a variable called `{{ break
 
 This code will print three `<li>`s, one for each item in the file.
 
+## Tutorials
+
+[Staying D.R.Y. with Panini](http://zurb.com/university/lessons/staying-d-r-y-with-panini) 
+Panini comes with tons of Handlebars helpers built in, like a repeat helper or markdown parser, but in this lesson we’ll take a look at creating a custom month/year helper for an HTML email.
+
+
 {{{{/raw}}}}
index 85ce31bf3acaf8f0bd74af15a71f5e8a9e7531b7..85cdcb9dc75b0cb77cf8ae6b11b1ac75ea640f0d 100644 (file)
@@ -26,4 +26,7 @@
   <li><a href="thumbnail.html">Thumbnail</a></li>
   <li><a href="typography.html">Typography</a></li>
   <li><a href="visibility.html">Visibility Classes</a></li>
+
+  <li class="docs-nav-title">Libraries</li>
+  <li><a href="panini.html">Panini (Handlebars)</a></li>
 </ul>
index cac9b32da808e9d4bd0503e4f039c55092f81c75..23a293222f1472158ece7cc688840520a12e9990 100644 (file)
@@ -56,7 +56,8 @@ gulp.task('html', function() {
     .pipe(panini({
       root: 'docs/pages/',
       layouts: 'docs/layouts/',
-      partials: 'docs/partials/'
+      partials: 'docs/partials/',
+      helpers: foundationDocs.handlebarsHelpers
     }))
     .pipe(gulp.dest('_build'))
     .on('finish', function() {