Ind.ie is now Small Technology Foundation.
Commit d5d20e6a authored by Aral Balkan's avatar Aral Balkan

Update partials demo

  - Move components to components folder to avoid namespace
    clash with the route itself
  - Use actual header as a partial
  - Update demo page description
parent e7871caf
......@@ -11,4 +11,4 @@
################################################################################
exports.route = (request, response) ->
response.render 'partials', {}
response.render 'partials', {title: 'Ind.ie Labs: Set: Partials'}
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<h1>Header (partial)</h1>
<hr>
......@@ -442,6 +442,7 @@
<h2>Other examples</h2>
<ul>
<li><a href='./simple'>A comparison of Set, Handlebars, and Plates with static data.</a></li>
<li><a href='./partials'>Partials demo</a></li>
<li><a href='./posts'>mastodon.ar.al global timeline example</a> (<a href='./posts.html'>template</a>, <a href='./posts-real-data.html'>template with real data</a>)</li>
<li><a href='./posts-client-side-updates'>mastodon.social global timeline with client‐side updates</a> using the same template.</li>
<li><a href='./profile'>mastodon.ar.al global timeline example with profiling</a> <small>Check the console for timings.</small></li>
......
<!-- include partials/common-header.html -->
<!-- include components/common-header.html -->
<div class='main' role='main'>
<h2>Main file</h2>
<!-- include components/simple-header.html -->
<p>The header and footer are included as partials.</p>
<h2>Partials Demo</h2>
<!-- include partials/simple-footer.html -->
<p>Partials enable you to construct your template using components. The header and footer in this example are included as partials. Partials are specified using standard HTML comments in the following format:</p>
<pre><code>&lt;!-- include relative/path/from/views/folder/to/the/partial.html --&gt;</code></pre>
<p>(Note: the component does not have to be HTML. It could be JS, CSS, etc.)</p>
<p>Partials take part in the template render. For example, the contents of the <code>title</code> tag on this page are specified using the <code>data-set-text</code> attribute on the tag.</p>
<!-- include components/simple-footer.html -->
</div>
</body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment