Difference between revisions of "S2 Cookbook: A Testbed Layout"
From Dreamwidth Notes
Foxfirefey (Talk | contribs) m |
Foxfirefey (Talk | contribs) m (→S2 Testbed Layout) |
||
Line 14: | Line 14: | ||
""""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n"""; | """"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n"""; | ||
"""<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n"""; | """<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n"""; | ||
+ | """<head>\n"""; | ||
"""<title>S2 Testbed Layout</title>\n"""; | """<title>S2 Testbed Layout</title>\n"""; | ||
"""</head>\n"""; | """</head>\n"""; |
Revision as of 01:30, 18 June 2010
This layout is meant to give you a clean testbed to explore examples with. It gives ONLY the barest basics to get a blank HTML page to load, ensuring your test code is at the forefront of attention. It is NOT a good start to creating a new layout--it's missing key information a functional layout needs. For examples about making layouts, please see S2 Cookbook: Converting a CSS design to a layout.
To use it, make a new layout layer containing the code below, and then a style that uses that layout. If you need more information on how to do that, please see S2 Guide: Style System Overview: Creating and managing layers, as well as the section on creating and managing styles.
S2 Testbed Layout
layerinfo "type" = "layout"; layerinfo "name" = "S2 Testbed Layout"; function Page::print() "This is a skeleton page function, for testing." { """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" """; """"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n"""; """<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n"""; """<head>\n"""; """<title>S2 Testbed Layout</title>\n"""; """</head>\n"""; """<body>\n"""; # Code you want to test goes here """</body>\n"""; """</html>\n"""; }