Giter Site home page Giter Site logo

js-templates-template-engines-lab-v-000's Introduction

JavaScript Lodash Templates Lab

Objectives

  1. Practice using JavaScript templates for a simple blog
  2. Practice modularizing code and templates
  3. Practice separating view and logic concerns

Introduction

In this lab, we're going to be using lodash templates to create a simple blog site with posts and comments. We want to use templates to modularize the page and dynamically load new elements.

Don't forget to run the tests and make sure everything works!

Instructions

  1. Create a template with an id of page-template that will represent the page of a blog post, including a sidebar element and a post element that will hold our blog post.
  2. Create a post-template that will represent the blog post itself. It should have a header for the post title and a footer for the post author, and be wrapped in an article element.
  3. Create a comments-template that will be the container for the collection of comments on the blog post, as well as the comment form.
  4. Create a comment-template that will hold an individual comment. Should have a footer for the commenter name.
  5. Provide a form with an id of post-form to create a blog post with a title, body, and author. Submitting the form should build the page template with the post inside. Make the form submit using a createPost() function.
  6. Provide a form within the comments-template to post comments, including commenter name and comment text. These should use the template to insert individual comments into the comments section. You should be able to keep adding more comments. Make the form submit use a postComment() function.

Resources

js-templates-template-engines-lab-v-000's People

Contributors

pletcher avatar gj avatar scottcreynolds avatar jamesonbass1987 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.