Learn how to transform HTML files using Enlive.
- [Man] In this video, we'll load the base HTML page…and insert the HTML regenerating into the proper location.…First, I'll use a macro from enlive called deft template.…Its first argument is it takes a name,…we'll call this add table, cuz we'll be adding tables.…Its next argument is the HTMl file we wanna load.…So I'll use the string website/programs/graphic-design.htm.…Next this macro takes any parameters that we wanna pass in.…
So I'll use table HTML data, and when we use this macro…we'll pass in the data that generate table returns.…Next, the body of this macro takes pairs of a selector…on the left, and what we wanna do with it on the right.…First, for the selector portion, I'll use a vector…with the article keyword which will look for…the article tag.…Then I'll use pound main content to look for…an article tag with the ID main content.…
This mimics CSS selectors.…You can also use classes and so on.…Now after that, we'll implement what we want to do.…We'll use enlive's append function, so that what we…pass in is appended to the existing HTML within this tag.…
Skill Level Intermediate
1. Problem 1: Exploring Lake Pend Oreille
2. Problem 2: Image Analysis
3. Problem 3: Eight Queens
4. Problem 4: Accessing Peripherals
5. Problem 5: Recursion and Directories
6. Problem 6: Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.