diff options
author | Luke Macken <lmacken@redhat.com> | 2008-01-17 11:13:22 -0500 |
---|---|---|
committer | Luke Macken <lmacken@redhat.com> | 2008-01-17 11:13:22 -0500 |
commit | c498c67ed6bd18be1d54f884099df10b1db06509 (patch) | |
tree | db1dd0fba37babcec610421e5857ad3a22f29e62 /funcweb/funcweb/templates | |
parent | aee6076dd78dfb1b88ab4d369e24fb1bbf710816 (diff) | |
download | func-c498c67ed6bd18be1d54f884099df10b1db06509.tar.gz func-c498c67ed6bd18be1d54f884099df10b1db06509.tar.xz func-c498c67ed6bd18be1d54f884099df10b1db06509.zip |
Initial `tg-admin quickstart` of funcweb
Diffstat (limited to 'funcweb/funcweb/templates')
-rw-r--r-- | funcweb/funcweb/templates/__init__.py | 0 | ||||
-rw-r--r-- | funcweb/funcweb/templates/login.kid | 114 | ||||
-rw-r--r-- | funcweb/funcweb/templates/master.kid | 47 | ||||
-rw-r--r-- | funcweb/funcweb/templates/welcome.kid | 47 |
4 files changed, 208 insertions, 0 deletions
diff --git a/funcweb/funcweb/templates/__init__.py b/funcweb/funcweb/templates/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/funcweb/funcweb/templates/__init__.py diff --git a/funcweb/funcweb/templates/login.kid b/funcweb/funcweb/templates/login.kid new file mode 100644 index 0000000..4fd6755 --- /dev/null +++ b/funcweb/funcweb/templates/login.kid @@ -0,0 +1,114 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:py="http://purl.org/kid/ns#"> + +<head> + <meta content="text/html; charset=UTF-8" + http-equiv="content-type" py:replace="''"/> + <title>Login</title> + <style type="text/css"> + #loginBox + { + width: 30%; + margin: auto; + margin-top: 10%; + padding-left: 10%; + padding-right: 10%; + padding-top: 5%; + padding-bottom: 5%; + font-family: verdana; + font-size: 10px; + background-color: #eee; + border: 2px solid #ccc; + } + + #loginBox h1 + { + font-size: 42px; + font-family: "Trebuchet MS"; + margin: 0; + color: #ddd; + } + + #loginBox p + { + position: relative; + top: -1.5em; + padding-left: 4em; + font-size: 12px; + margin: 0; + color: #666; + } + + #loginBox table + { + table-layout: fixed; + border-spacing: 0; + width: 100%; + } + + #loginBox td.label + { + width: 33%; + text-align: right; + } + + #loginBox td.field + { + width: 66%; + } + + #loginBox td.field input + { + width: 100%; + } + + #loginBox td.buttons + { + text-align: right; + } + + </style> +</head> + +<body> + <div id="loginBox"> + <h1>Login</h1> + <p>${message}</p> + <form action="${previous_url}" method="POST"> + <table> + <tr> + <td class="label"> + <label for="user_name">User Name:</label> + </td> + <td class="field"> + <input type="text" id="user_name" name="user_name"/> + </td> + </tr> + <tr> + <td class="label"> + <label for="password">Password:</label> + </td> + <td class="field"> + <input type="password" id="password" name="password"/> + </td> + </tr> + <tr> + <td colspan="2" class="buttons"> + <input type="submit" name="login" value="Login"/> + </td> + </tr> + </table> + + <input py:if="forward_url" type="hidden" name="forward_url" + value="${forward_url}"/> + + <div py:for="name,values in original_parameters.items()" py:strip="1"> + <input py:for="value in isinstance(values, list) and values or [values]" + type="hidden" name="${name}" value="${value}"/> + </div> + </form> + </div> +</body> +</html> diff --git a/funcweb/funcweb/templates/master.kid b/funcweb/funcweb/templates/master.kid new file mode 100644 index 0000000..1b9841a --- /dev/null +++ b/funcweb/funcweb/templates/master.kid @@ -0,0 +1,47 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?python import sitetemplate ?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="sitetemplate">
+
+<head py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'" py:attrs="item.items()">
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title py:replace="''">Your title goes here</title>
+ <meta py:replace="item[:]"/>
+ <style type="text/css">
+ #pageLogin
+ {
+ font-size: 10px;
+ font-family: verdana;
+ text-align: right;
+ }
+ </style>
+ <style type="text/css" media="screen">
+@import "${tg.url('/static/css/style.css')}";
+</style>
+</head>
+
+<body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()">
+ <div py:if="tg.config('identity.on') and not defined('logging_in')" id="pageLogin">
+ <span py:if="tg.identity.anonymous">
+ <a href="${tg.url('/login')}">Login</a>
+ </span>
+ <span py:if="not tg.identity.anonymous">
+ Welcome ${tg.identity.user.display_name}.
+ <a href="${tg.url('/logout')}">Logout</a>
+ </span>
+ </div>
+ <div id="header"> </div>
+ <div id="main_content">
+ <div id="status_block" class="flash" py:if="value_of('tg_flash', None)" py:content="tg_flash"></div>
+
+ <div py:replace="[item.text]+item[:]"/>
+
+ <!-- End of main_content -->
+ </div>
+<div id="footer"> <img src="${tg.url('/static/images/under_the_hood_blue.png')}" alt="TurboGears under the hood" />
+ <p>TurboGears is a open source front-to-back web development
+ framework written in Python</p>
+ <p>Copyright © 2007 Kevin Dangoor</p>
+</div>
+</body>
+
+</html>
diff --git a/funcweb/funcweb/templates/welcome.kid b/funcweb/funcweb/templates/welcome.kid new file mode 100644 index 0000000..9095267 --- /dev/null +++ b/funcweb/funcweb/templates/welcome.kid @@ -0,0 +1,47 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+<head>
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
+<title>Welcome to TurboGears</title>
+</head>
+<body>
+
+ <div id="sidebar">
+ <h2>Learn more</h2>
+ Learn more about TurboGears and take part in its
+ development
+ <ul class="links">
+ <li><a href="http://www.turbogears.org">Official website</a></li>
+ <li><a href="http://docs.turbogears.org">Documentation</a></li>
+ <li><a href="http://trac.turbogears.org/turbogears/">Trac
+ (bugs/suggestions)</a></li>
+ <li><a href="http://groups.google.com/group/turbogears"> Mailing list</a> </li>
+ </ul>
+ <span py:replace="now">now</span>
+ </div>
+ <div id="getting_started">
+ <ol id="getting_started_steps">
+ <li class="getting_started">
+ <h3>Model</h3>
+ <p> <a href="http://docs.turbogears.org/1.0/GettingStarted/DefineDatabase">Design models</a> in the <span class="code">model.py</span>.<br/>
+ Edit <span class="code">dev.cfg</span> to <a href="http://docs.turbogears.org/1.0/GettingStarted/UseDatabase">use a different backend</a>, or start with a pre-configured SQLite database. <br/>
+ Use script <span class="code">tg-admin sql create</span> to create the database tables.</p>
+ </li>
+ <li class="getting_started">
+ <h3>View</h3>
+ <p> Edit <a href="http://docs.turbogears.org/1.0/GettingStarted/Kid">html-like templates</a> in the <span class="code">/templates</span> folder;<br/>
+ Put all <a href="http://docs.turbogears.org/1.0/StaticFiles">static contents</a> in the <span class="code">/static</span> folder. </p>
+ </li>
+ <li class="getting_started">
+ <h3>Controller</h3>
+ <p> Edit <span class="code"> controllers.py</span> and <a href="http://docs.turbogears.org/1.0/GettingStarted/CherryPy">build your
+ website structure</a> with the simplicity of Python objects. <br/>
+ TurboGears will automatically reload itself when you modify your project. </p>
+ </li>
+ </ol>
+ <div class="notice"> If you create something cool, please <a href="http://groups.google.com/group/turbogears">let people know</a>, and consider contributing something back to the <a href="http://groups.google.com/group/turbogears">community</a>.</div>
+ </div>
+ <!-- End of getting_started -->
+</body>
+</html>
|