(index ("itemize" 0) ("enumerate" 881) ("html-page" 1064) ("combo-box" 5433) ("hidden-input" 6493) ("text-input" 7469) ("password-input" 7850) ("submit-input" 7991) ("tabularize" 8335))
(def (sig (procedure "(itemize items #!key list-id list-class quote-procedure)" (id itemize))) (p "Generates an HTML unordered list of " (tt "items") ".  The following attributes may be used:") (ul (li (tt "list-id") ": the value for the HTML " (tt "id") " attribute for the list.") (li (tt "list-class") ": the value for the HTML " (tt "class") " attribute for the list.") (li (tt "quote-procedure") ": an one-argument procedure to specify the quoting of attributes' values for tags.")) (p "Examples:") (highlight scheme "(itemize '(apple watermelon strawberry))") (p "Produces:") (pre " \"<ul><li>apple</li><li>watermelon</li><li>strawberry</li></ul>\"") (highlight scheme "(itemize '(apple watermelon strawberry) list-id: \"my-list\" list-class: \"lists\")") (p "Produces:") (pre " \"<ul id='my-list' class='lists'><li>apple</li><li>watermelon</li><li>strawberry</li></ul>\""))
(def (sig (procedure "(enumerate items #!key list-id list-class quote-procedure)" (id enumerate))) (p "Generates an HTML ordered list of " (tt "items") ".  See " (tt "itemize") "."))
(def (sig (procedure "(html-page contents #!key css title (doctype \"\") (headers \"\") charset content-type literal-style? html-attribs body-attribs)" (id html-page))) (p "Generates an HTML page containing " (tt "contents") " (a string). If contents starts with " (tt "\"<body\"") " (case insensitive), " (tt "html-page") " won't use the " (tt "<body>") " tag to enclose " (tt "contents") ". The following keywords arguments may be used to customize the page:") (ul (li (tt "headers") ": a string (when not in SXML mode) or an SXML form (when in SXML mode) containing additional headers to be inserted in the section delimited by the " (tt "<head>") " tag. Default = " (tt "\"\"") ".") (li (tt "title") ": the title for the page (to be used in the " (tt "<title>") " tag). Default = " (tt "\"\"") ".") (li (tt "css") ": may be either a path to a Cascading Style Sheet file, to be linked from the generated page (the default value is " (tt "#f") ", so no CSS is used) or a list of paths to CSS files. If a list of paths is used, the elements which are also lists are read and inlined into the generated page. Example: " (tt "css: '(\"css1.css\" (\"css2.css\"))") ". In the example, " (tt "css1.css") " would be linked from the generated page (using the link tag) and " (tt "css2.css") " would be inlined into the generated page (e.g., " (tt "html-page") " would read the " (tt "css2.css") " file and inline its contents in the HTML code).") (li (tt "doctype") ": specifies the document type of the generated page. The default value is " (tt "doctype:html-4.01-strict") ". The possible values are the ones available from the " (int-link "doctype") " egg.") (li (tt "charset") ": specifies the default charset to be used in the corresponding meta tag of the document. The default value is " (tt "\"UTF-8\"") " (only when " (tt "content-type") " is provided).") (li (tt "literal-style?") " (introduced in version 0.9): if " (tt "#f") ", convert special characters in style code (CSS) to theyr equivalent HTML entities.  If non-" (tt "#f") ", insert them verbatim.") (li (tt "content-type") " (introduced in version 0.9) and " (tt "charset") " work together: if " (tt "content-type") " is provided and " (tt "charset") " is not provided, " (tt "charset") " is assumed to be " (tt "\"UTF-8\"") "; if " (tt "charset") " is provided and " (tt "content-type") " is not provided, " (tt "content-type") " is assumed to be " (tt "\"text/html\"") " (if " (int-link "/egg/html-tags" "html-tags") "' " (tt "generate-sxml?") " is " (tt "#f") ") or " (tt "\"application/xhtml+xml\"") " (if " (tt "generate-sxml?") " is non-" (tt "#f") ").") (li (tt "html-attribs") " (introduced in version 0.10): attributes to the " (tt "html") " tag. The format is a list of lists " (tt "(<attribute> <value>)") " (" (tt "<attribute>") " is a symbol).  Example: " (tt "(html-page \"foo\" html-attribs: '((lang \"us\")))") ".") (li (tt "body-attribs") " (introduced in version 0.10): attributes to the " (tt "body") " tag. The format is a list of lists " (tt "(<attribute> <value>)") " (" (tt "<attribute>") " is a symbol).  Example: " (tt "(html-page \"foo\" body-attribs: '((bgcolor \"red\")))") ".")) (p "Examples:") (highlight scheme "(html-page \"hello\")") (p "Produces:") (pre " \"<html><head></head><body>hello</body></html>\"") (highlight scheme "(html-page \"hello\" title: \"hello\")") (p "Produces:") (pre " \"<html><head><title>hello</title></head><body>hello</body></html>\"") (highlight scheme "(use doctype)\n(html-page \"hello\" title: \"hello\" doctype: xhtml-1.0-strict)") (p "Produces:") (pre " \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\"><html><head><title>hello</title></head><body>hello</body></html>\"") (highlight scheme "(html-page \"hello\" headers: (<script> type: \"text/javascript\" src: \"my-script.js\"))") (p "Produces:") (pre " \"<html><head><script type='text/javascript' src='my-script.js'></script></head><body>hello</body></html>\"    ") (highlight scheme "(use html-tags html-utils)\n(parameterize ((generate-sxml? #t))\n  (html-page \"hello\"\n             headers: (<script> type: \"text/javascript\"\n                                src: \"my-script.js\")))") (p "Produces:") (pre " (html (head (script (@ (type \"text/javascript\") (src \"my-script.js\")))) (body \"hello\"))"))
(def (sig (procedure "(combo-box name options #!key default id first-empty onchange onkeyup disabled length multiple selectedindex size tabindex type class)" (id combo-box))) (p "Generates an HTML combo box using " (tt "<select>") " and " (tt "<option>") " tags. The keyword parameters " (tt "id") ", " (tt "onchange") ", " (tt "onkeyup") ", " (tt "disabled") ", " (tt "length") ", " (tt "multiple") ", " (tt "selectedindex") ", " (tt "size") ", " (tt "tabindex") ", " (tt "type") " and " (tt "class") " are passed to the " (tt "<select>") " procedure (from " (int-link "/egg/html-tags" "html-tags") "). " (tt "default") " is the value from the list of options to be selected.  If " (tt "first-empty") " is " (tt "#t") ", the first option of the combo box will be empty.") (p "Example:") (highlight scheme "(combo-box \"test\" '(#(1 1) #(2 2) #(3 3)) first-empty: #t default: 2)") (p "Produces:") (pre "\"<select name='test' id='test'><option></option><option value='1'>1</option><option value='2' selected>2</option><option value='3'>3</option></select>\""))
(def (sig (procedure "(hidden-input name/list #!optional value id)" (id hidden-input))) (p "Generates an HTML hidden input field. " (tt "name/list") " can be either a string representing the name attribute of the HTML input tag or an alist mapping names to values to be used by the corresponding input tags.  When " (tt "name/list") " is a string, so representing the name of the input tag, the optional values VALUE and ID can be used to be represent the values of their corresponding HTML attributes.") (p "Examples:") (highlight scheme "(hidden-input 'secret-var \"secret-val\")") (p "Produces:") (pre " \"<input type='hidden' name='secret-var' id='secret-var' value='secret-val'>\"") (highlight scheme "(hidden-input '((secret-var1 . \"secret-val1\") (secret-var2 . \"secret-val2\")))") (p "Produces:") (pre " \"<input type='hidden' id='secret-var1' name='secret-var1' value='secret-val1'><input type='hidden' id='secret-var2' name='secret-var2' value='secret-val2'>\""))
(def (sig (procedure "(text-input name . args)" (id text-input))) (p "Generates an input text box. " (tt "args") " are keyword arguments to be passed to " (tt "<input>") " (from " (int-link "/egg/html-tags" "html-tags") ").") (p "Examples:") (highlight scheme "(text-input \"foo\" value: \"bar\")") (p "Produces:") (pre " \"<input type='text' name='foo' id='foo' value='bar'>\""))
(def (sig (procedure "(password-input name . args)" (id password-input))) (p "The same as " (tt "text-input") ", but for password inputs."))
(def (sig (procedure "(submit-input . args)" (id submit-input))) (p "Generates a submit widget.  " (tt "args") " are keyword arguments to be passed to " (tt "<input>") " (from " (int-link "/egg/html-tags" "html-tags") ").") (highlight scheme " (submit-input value: \"Send!\")") (p "Produces:") (pre " \"<input type='submit' value='Send!'>\""))
(def (sig (procedure "(tabularize items #!key table-id table-class quote-procedure even-row-class odd-row-class header)" (id tabularize))) (p "Generates an HTML table from " (tt "items") " (a list of lists). The following keyword parameters may be used:") (ul (li (tt "table-id") ": the value for the HTML " (tt "id") " attribute for the table.") (li (tt "table-class") ": the value for the HTML " (tt "class") " attribute for the table.") (li (tt "quote-procedure") ": an one-argument procedure to specify the quoting of attributes' values for tags.") (li (tt "even-row-class") ": the value for the HTML " (tt "class") " attribute for even rows of the the table.") (li (tt "odd-row-class") ": the value for the HTML " (tt "class") " attribute for odd rows of the the table.") (li (tt "header") ": a list of column names to be used as the table header (enclosed by the " (tt "th") " tag).") (li (tt "thead/tbody") ": if " (tt "#t") ", generates the table with " (tt "<thead>") " and " (tt "<tbody>") " tags.")) (p "Examples:") (highlight scheme "(tabularize '((1 2 3) (4 5 6)))") (p "Produces:") ((pre "\n\"" "<" "table" ">" "<" "tr" ">" "<" "td" ">" "1" "<" "/td" ">" "<" "td" ">" "2" "<" "/td" ">" "<" "td" ">" "3" "<" "/td" ">" "<" "/tr" ">" "<" "tr" ">" "<" "td" ">" "4" "<" "/td" ">" "<" "td" ">" "5" "<" "/td" ">" "<" "td" ">" "6" "<" "/td" ">" "<" "/tr" ">" "<" "/table" ">" "\"\n")) (highlight scheme "(tabularize '((1 2 3) (4 5 6)) table-id: \"test\" even-row-class: \"yellow\" odd-row-class: \"blue\")") (p "Produces:") ((pre "\n\"" "<" "table id='test'" ">" "<" "tr class='yellow'" ">" "<" "td" ">" "1" "<" "/td" ">" "<" "td" ">" "2" "<" "/td" ">" "<" "td" ">" "3" "<" "/td" ">" "<" "/tr" ">" "<" "tr class='blue'" ">" "<" "td" ">" "4" "<" "/td" ">" "<" "td" ">" "5" "<" "/td" ">" "<" "td" ">" "6" "<" "/td" ">" "<" "/tr" ">" "<" "/table" ">" "\"\n")))
