Duration: 20 to 30 minutes.
In this exercise, you will add a list of books for purchase to the Nan & Bob's Online site.
- Open WidgetsUI/Exercises/lists.html in a file editor.
- In the "Books" page, add a list of four books and give them dummy titles.
- Allow the user to filter the list with a search field at top.
- Each book listing should show a thumbnail image at left (use the images provided in the "images" directory), the title and author, and a plus icon at right.
- Clicking the thumbnail image or book title brings the user to a detail page (provided for you) with a "back" button at upper right.
- Clicking the plus icon brings the user to a dialog asking them to confirm their intent to purchase. Clicking "yes" brings the user to a checkout page (with no form), which you will need to create; clicking "no" returns the user to the book-list page.
- Test your work in a mobile browser; the results should look like this:
We use a split-button list to present the books available for purchase to the user. Attribute
data-filter="true" adds the filter functionality; attribute
data-split-icon="plus" sets the right-side icon.
The first link (pointing to the appropriate detail page) in each list item includes an image, which displays flush left, and the book title and author. The second link (pointing to the confirm dialog) in the list item becomes the icon.
The dialog presents two buttons: "yes" points to the checkout page; "no" points back to the book-list page.