Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rebol [
- Title: "Web Library"
- ]
- pTag: func [text] [ join "<p>" [ text "</p>" ] ]
- linkTag: func [href link] [
- join {<a href="} [href {">} link "</a>"]
- ]
- homeLink: func [] [ pTag linkTag "index.r" "Go home..." ]
- listItem: func [item] [
- switch to-string (type? item) [
- "block" [
- either (length? item) > 1 [
- join (listItem item/1) (ulTag skip item 1)
- ] [
- listItem item/1
- ]
- ]
- "word" [ get item ]
- "string" [ item ]
- ]
- ]
- ulTag: func [ list ] [
- join "<ul>" [(liTag list) "</ul>"]
- ]
- liTag: func [ list ] [
- either (length? list) > 1 [
- join "<li>" [(listItem list/1) "</li>" (liTag skip list 1)]
- ] [
- join "<li>" [(listItem list/1) "</li>"]
- ]
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement