Skip to content

Instantly share code, notes, and snippets.

@dtb
Created February 3, 2014 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dtb/8793838 to your computer and use it in GitHub Desktop.
Save dtb/8793838 to your computer and use it in GitHub Desktop.
diff --git a/test/fixtures/examples/blocks/Blocks.php b/test/fixtures/examples/blocks/Blocks.php
new file mode 100644
index 0000000..fdb0008
--- /dev/null
+++ b/test/fixtures/examples/blocks/Blocks.php
@@ -0,0 +1,7 @@
+<?php
+
+class Blocks {
+ public $items = array(
+
+ );
+}
diff --git a/test/fixtures/examples/blocks/blocks.mustache b/test/fixtures/examples/blocks/blocks.mustache
new file mode 100644
index 0000000..6b21c2c
--- /dev/null
+++ b/test/fixtures/examples/blocks/blocks.mustache
@@ -0,0 +1,19 @@
+{{% BLOCKS parent=layout}}
+
+{{$ title }}My Alsome Page{{/ title }}
+
+{{$ stylesheets }}
+ <link rel="stylesheet" href="/assets/css/page.css">
+{{/ stylesheets }}
+
+{{$ header }}
+ <h1>My page has some items!</h1>
+{{/ header }}
+
+{{$ content }}
+<ul>
+ {{# items }}
+ <li><a href="{{ link }}" title="{{ name }}">{{ name }}</a></li>
+ {{/ items }}
+</ul>
+{{/ content }}
diff --git a/test/fixtures/examples/blocks/blocks.txt b/test/fixtures/examples/blocks/blocks.txt
new file mode 100644
index 0000000..e212069
--- /dev/null
+++ b/test/fixtures/examples/blocks/blocks.txt
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>My Alsome Page</title>
+ <link rel="stylesheet" href="/assets/css/page.css">
+ </head>
+ <body>
+ <header>
+ <h1>My page has some items!</h1>
+ </header>
+ <section id="content">
+ <ul>
+ {{# items }}
+ <li><a href="{{ link }}" title="{{ name }}">{{ name }}</a></li>
+ {{/ items }}
+ </ul>
+ </section>
+ <script src="/assets/js/default.js"></script>
+ </body>
+</html>
diff --git a/test/fixtures/examples/blocks/partials/layout.mustache b/test/fixtures/examples/blocks/partials/layout.mustache
new file mode 100644
index 0000000..a3cbcf5
--- /dev/null
+++ b/test/fixtures/examples/blocks/partials/layout.mustache
@@ -0,0 +1,25 @@
+{{% BLOCKS }}
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>{{$ title }}My Alsome Site{{/ title }}</title>
+ {{$ stylesheets }}
+ <link rel="stylesheet" href="/assets/css/default.css">
+ {{/ stylesheets }}
+ </head>
+<body>
+ <header>
+ {{$ header }}
+ <h1>Welcome to My Alsome Site</h1>
+ {{/ header }}
+ </header>
+ <section id="content">
+ {{$ content }}
+ <p>Hello, World!</p>
+ {{/ content }}
+ </section>
+ {{$ scripts }}
+ <script src="/assets/js/default.js"></script>
+ {{/ scripts }}
+</body>
+</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment