- Revision
- 799
- Author
- mauro
- Date
- 2008-08-29 07:24:42 -0500 (Fri, 29 Aug 2008)
Log Message
Updated freemarker example to use css-driven layout styling. Added jstl dependencies to keep Tomcat happy.
Modified Paths
- trunk/examples/freemarker-example/pom.xml
- trunk/examples/freemarker-example/src/main/webapp/footer.ftl
- trunk/examples/freemarker-example/src/main/webapp/header.ftl
- trunk/examples/freemarker-example/src/main/webapp/index.jsp
- trunk/examples/freemarker-example/src/main/webapp/layout.ftl
- trunk/examples/freemarker-example/src/main/webapp/style/style.css
Added Paths
- trunk/examples/freemarker-example/src/main/webapp/images/
- trunk/examples/freemarker-example/src/main/webapp/images/bg.gif
Diff
Modified: trunk/examples/freemarker-example/pom.xml (798 => 799)
--- trunk/examples/freemarker-example/pom.xml 2008-08-29 00:45:20 UTC (rev 798) +++ trunk/examples/freemarker-example/pom.xml 2008-08-29 12:24:42 UTC (rev 799) @@ -26,6 +26,17 @@ <artifactId>sitemesh</artifactId> <version>2.3</version> </dependency> + <dependency> + <groupId>jstl</groupId> + <artifactId>jstl</artifactId> + <version>1.1.2</version> + </dependency> + <dependency> + <groupId>taglibs</groupId> + <artifactId>standard</artifactId> + <version>1.1.2</version> + <scope>compile</scope> + </dependency> </dependencies> </project>
Modified: trunk/examples/freemarker-example/src/main/webapp/footer.ftl (798 => 799)
--- trunk/examples/freemarker-example/src/main/webapp/footer.ftl 2008-08-29 00:45:20 UTC (rev 798) +++ trunk/examples/freemarker-example/src/main/webapp/footer.ftl 2008-08-29 12:24:42 UTC (rev 799) @@ -1,4 +1,3 @@ <div id="footer"> - ~ Footer ~ </div> \ No newline at end of file
Modified: trunk/examples/freemarker-example/src/main/webapp/header.ftl (798 => 799)
--- trunk/examples/freemarker-example/src/main/webapp/header.ftl 2008-08-29 00:45:20 UTC (rev 798) +++ trunk/examples/freemarker-example/src/main/webapp/header.ftl 2008-08-29 12:24:42 UTC (rev 799) @@ -1,4 +1,3 @@ <div id="header"> - ~ Header ~ </div> \ No newline at end of file
Added: trunk/examples/freemarker-example/src/main/webapp/images/bg.gif
(Binary files differ)
Modified: trunk/examples/freemarker-example/src/main/webapp/index.jsp (798 => 799)
--- trunk/examples/freemarker-example/src/main/webapp/index.jsp 2008-08-29 00:45:20 UTC (rev 798) +++ trunk/examples/freemarker-example/src/main/webapp/index.jsp 2008-08-29 12:24:42 UTC (rev 799) @@ -1,3 +1,4 @@ -<jsp:root xmlns="http://www.w3.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" version="2.0"> -<c:redirect url="" -</jsp:root> \ No newline at end of file +<jsp:root xmlns="http://www.w3.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page" + xmlns:c="http://java.sun.com/jsp/jstl/core" version="2.0"> + <c:redirect url="" /> +</jsp:root>
Modified: trunk/examples/freemarker-example/src/main/webapp/layout.ftl (798 => 799)
--- trunk/examples/freemarker-example/src/main/webapp/layout.ftl 2008-08-29 00:45:20 UTC (rev 798) +++ trunk/examples/freemarker-example/src/main/webapp/layout.ftl 2008-08-29 12:24:42 UTC (rev 799) @@ -3,14 +3,13 @@ <html> <head> <title>${title}</title> - ${head} <#include "/resources.ftl" parse="true"> </head> <body> - <#include "/header.ftl" parse="true"> - <hr/> - ${body} - <hr/> - <#include "/footer.ftl" parse="true"> +<div id="view"> +<#include "/header.ftl" parse="true"> +${body} +<#include "/footer.ftl" parse="true"> +</div> </body> </html> \ No newline at end of file
Modified: trunk/examples/freemarker-example/src/main/webapp/style/style.css (798 => 799)
--- trunk/examples/freemarker-example/src/main/webapp/style/style.css 2008-08-29 00:45:20 UTC (rev 798) +++ trunk/examples/freemarker-example/src/main/webapp/style/style.css 2008-08-29 12:24:42 UTC (rev 799) @@ -1,89 +1,161 @@ body { - font-family: sans-serif; - font-size: 12px; + background-image: url(../images/bg.gif); + background-repeat: repeat-y; + background-position: center; + background-color: #434b4c; + font-family: Verdana, Arial, Helvetica, Sans-Serif; + font-size: 12px; } -h3 { - margin: 10px 0 15px 10px; - color: chocolate; +#view { + background-color: #fff; + position: relative; + width: 770px; + margin: 0 auto; + text-align: left; } -.items { - background-color: #FFF; - border: dashed gray 1px; - width: 280px; - padding: 5px; - margin: 10px; - float: left; +#content { + width: 600px; + float: right; + margin-top: -25px; + padding: 10px } -.item_selected { - background-color: #cf3; - border: solid gray 1px; - margin: 10px; - padding: 4px; - width: 250px; - height: 10px; - cursor: pointer; +#navigation { + width: 170px; + float: left; } -.item_available { - background-color: tomato; - border: solid gray 1px; - margin: 10px; - padding: 4px; - width: 250px; - height: 10px; - cursor: pointer; +#menu { + background-color: #ebebeb; + position: absolute; + top: 0px; + left: 0px; + width: 150px; + margin-top: 200px; + line-height: 1; } -table { - border: solid 1px; - width: 60%; +.menu-group { + font-weight: bold; + padding: 0px 1px 0px 1px; + text-decoration: none; } -table th { - font-weight: bold; - background-color: tomato; +.menu-group a { + background: #666 none repeat scroll 0%; + border-right: 4px solid #b3b3a1; + color: #fff; + cursor: pointer; + display: block; + font-weight: bold; + padding: 2px 5px 2px 2px; + text-align: right; + text-decoration: none; + text-shadow: #5e708e 2px 2px 1px; } -table th, td { - padding-left: 5px; - padding-right: 5px; +.menu-group-content { + font-weight: normal; + text-transform: none; } -.odd { - background-color: gold; +#menu-selected,.menu-file a:link,.menu-file a:visited,.menu-index a:link,.menu-index a:visited + { + background: #999 none repeat scroll 0%; + border-right: 4px solid #666; + color: #fff; + display: block; + font-weight: bold; + margin: 2px 0pt; + padding: 2px 2px 2px 5px; + text-align: left; + text-decoration: none; + text-shadow: #036 2px 2px 1px; } -.editContainer { - margin-top: 25px; - border: solid 1px; - width: 60%; +.menu-file a:hover,.menu-file a:active,.menu-index a:hover,.menu-index a:active + { + background-color: #999; + border-right: 4px solid #036; + color: #003; + text-shadow: #036 2px 2px 1px; } -.fieldRow { - margin: 4px; +#menu-selected { + background-color: #fff; + border-right: 4px solid #fff; + color: #036; + text-shadow: none; } -.fieldRow label { - font-weight: bold; - width: 120px; - float: left; - text-align: right; - padding-right: 5px; +#header { + height: 167px; } -.fieldRow input { - position: relative; - float: left; - width: 125px; - font-size: 10px; +#footer { + clear: both; } -.errors { - color:red; - border: solid red 2px; - padding: 4px; - margin: 20px 20px 20px 20px; +a,a:active,a:link,a:hover,a:visited { + color: #003; + font-weight: bold; + text-decoration: none } + +fieldset { + background-color: #ebebeb; + border: 2px solid #ccc; +} + +fieldset legend { + font-weight: bold; +} + +fieldset table { + border-style: none; +} + +fieldset p { + vertical-align: bottom; +} + +fieldset label { + width: 120px; + float: left; + text-align: right; + padding-right: 2px; +} + +fieldset input { + width: 120px; + float: left; + text-align: left; + padding-left: 2px; +} + +table { + background-color: #ebebeb; + border: 2px solid #ccc; + width: 100%; + margin-top: 10px; +} + +table th { + font-weight: bold; + background-color: #666; + color: #fff; +} + +table th { + padding-left: 5px; + padding-right: 5px; + text-align: center; +} + +table td { + padding-left: 5px; + padding-right: 5px; + text-align: center; +} \ No newline at end of file
To unsubscribe from this list please visit:
