O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the user interface

We've defined the layout for the local storage demo page inside the localstorage_layout.tmpl source file found in the shared/templates/layouts folder:

<!doctype html><html>  {{ template "partials/localstorageheader_partial" }}  <body>    <div class="pageContent" id="primaryContent">      {{ template "pagecontent" . }}    </div>  <script type="text/javascript" src="/js/client.js"></script>  </body></html>

This layout template defines the layout of the local storage demo web page. We use template actions (shown in bold) to render the partials/localstorageheader_partial header template, and the pagecontent page content template.

Notice that at the bottom of the web page, we include the JavaScript source file, client.js, which was ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required