Sha256: 7a15480d8b2a126e82a4fe20413ae486d7dbf469c915e5fb1f8b924f59f72fd4

Contents?: true

Size: 2 KB

Versions: 5

Compression:

Stored size: 2 KB

Contents

<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  !{

      A quick guide to spontaneous templating:

        ${ ... } inserts a value, e.g. `${ title }` inserts the value of the page's title field

        %{ ... } creates a code block with no output into the template,
                 e.g. `%{ total_entries = boxes.map { |box| box.length }.sum }`

        !{ ... } inserts a comment, e.g. `!{ this is a comment }`

        Adding a '-' before the closing bracket removes whitespace after the tag, e.g. `${ title -}`

  }
  <title>${ title } ­ <%= @domain %></title>

  !{ inserts a CSS link to assets/css/site.css which is a Sprockets 'manifest' file }

	${ stylesheets 'css/site' }

</head>
<body>
  %{ block :content }
		<h2>Welcome to <%= @domain %></h2>

    !{ 'fields' dumps all the page fields into the template with no layout
       you won't be wanting to do this in your actual templates but its useful
       for instant feedback in the early stages... }

		${ fields }

    !{  'boxes' is useful however:

        `${ boxes }` is the same as doing

        %{ boxes.each do |box| }
          ${ box }
        %{ end }

        Which is different to:

        %{ boxes.each do |box| }
          %{ box.each do |entry| }
            ${ entry }
          %{ end }
        %{ end }

        because it also renders any template that belongs to the box.

        Since the default template for a box is `${ contents }` you will always get a valid output
        from `${ box }`.
    }

		${ boxes  }

  %{ endblock :content }

  !{ inserts a script tag pointing to assets/js/site.js which is a Sprockets 'manifest' file }

	${ scripts %w(js/site) }

</body>
</html>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spontaneous-0.2.0.beta10 lib/spontaneous/generators/site/templates/layouts/standard.html.cut.tt
spontaneous-0.2.0.beta9 lib/spontaneous/generators/site/templates/layouts/standard.html.cut.tt
spontaneous-0.2.0.beta8 lib/spontaneous/generators/site/templates/layouts/standard.html.cut.tt
spontaneous-0.2.0.beta7 lib/spontaneous/generators/site/templates/layouts/standard.html.cut.tt
spontaneous-0.2.0.beta6 lib/spontaneous/generators/site/templates/layouts/standard.html.cut.tt