added a small includable starter form with just one input field, started layouting it, added a frontpage.html (currently just polls.html + form), modified links

This commit is contained in:
phear 2010-04-17 13:18:36 +00:00
parent 0b07302b48
commit b002283947
5 changed files with 106 additions and 27 deletions

View file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:py="http://genshi.edgewall.org/">
<xi:include href="layout.html" />
<head>
<title>Instant Notes</title>
</head>
<body>
<h1>Neuer Wortschlucker</h1>
${poll_new_small()}
<h1>All Polls</h1>
<p py:if="errors" class="error">Error:
<ul>
<li py:for="message in errors.values()">${message}</li>
</ul>
</p>
<p><a href="${base_url}polls/new" title="Create a new poll">Create a new poll</a></p>
<ul py:if="polls">
<li py:for="poll in polls">
<a href="${poll.get_admin_url()}" title="Details of poll ${poll.title}">
Poll: ${poll.title} (${poll.get_num_of_submissions()}/${poll.get_num_of_submitters()})
</a>
</li>
</ul>
</body>
</html>

View file

@ -13,6 +13,17 @@
</head> </head>
</py:match> </py:match>
<div py:def="poll_new_small" class="poll_new_small">
<form action="/polls/new" method="post">
<label for="title">Titel eingeben:</label>
<input type="text" id="title" class="poll_new_small_text" name="title" />
<span py:if="'title' in errors" class="error">${errors.title}</span>
<input type="submit" name="submit" class="poll_new_small_button" value="N&auml;chster Schritt" />
</form>
</div>
<py:match path="body" once="true"> <py:match path="body" once="true">
<body py:attrs="select('@*')"> <body py:attrs="select('@*')">
<div id="header-wrapper"> <div id="header-wrapper">
@ -69,35 +80,32 @@
<div id="sidebar"> <div id="sidebar">
<ul> <ul>
<li> <li>
<h2>Aliquam tempus</h2> <h2>Nav</h2>
<p>Mauris vitae nisl nec metus placerat perdiet est. Phasellus dapibus semper urna. Pellentesque ornare, orci in consectetuer hendrerit, volutpat.</p>
</li>
<li>
<h2>Pellenteque ornare </h2>
<ul> <ul>
<li><a href="#">Nec metus sed donec</a></li> <li><a href="#">AGB</a></li>
<li><a href="#">Magna lacus bibendum mauris</a></li> <li><a href="#">Impressum</a></li>
<li><a href="#">Velit semper nisi molestie</a></li> <li><a href="#">Datenschutz</a></li>
<li><a href="#">Eget tempor eget nonummy</a></li> <li><a href="#">Kontakt</a></li>
<li><a href="#">Nec metus sed donec</a></li>
<li><a href="#">Velit semper nisi molestie</a></li>
<li><a href="#">Eget tempor eget nonummy</a></li>
<li><a href="#">Nec metus sed donec</a></li>
</ul> </ul>
</li> </li>
<li> <li>
<h2>Turpis nulla</h2> <h2>Advertisement </h2>
<ul> <ul>
<li><a href="#">Nec metus sed donec</a></li> <li><a href="#">&nbsp;</a></li>
<li><a href="#">Magna lacus bibendum mauris</a></li> <li><a href="#">&nbsp;</a></li>
<li><a href="#">Velit semper nisi molestie</a></li> <li><a href="#">&nbsp;</a></li>
<li><a href="#">Eget tempor eget nonummy</a></li> <li><a href="#">&nbsp;</a></li>
<li><a href="#">Nec metus sed donec</a></li> <li><a href="#">&nbsp;</a></li>
<li><a href="#">Nec metus sed donec</a></li> <li><a href="#">&nbsp;</a></li>
<li><a href="#">Magna lacus bibendum mauris</a></li> <li><a href="#">&nbsp;</a></li>
<li><a href="#">Velit semper nisi molestie</a></li> <li><a href="#">&nbsp;</a></li>
<li><a href="#">Eget tempor eget nonummy</a></li> </ul>
<li><a href="#">Nec metus sed donec</a></li> </li>
<li>
<h2>Use Cases</h2>
<ul>
<li><a href="/node/brainstorming.html">Brainstorming</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>

View file

@ -295,6 +295,39 @@ hr { display: none; }
margin-bottom: 10px; margin-bottom: 10px;
} }
/* Small Poll Creation Form */
.poll_new_small {
text-align:center;
margin-top: 20px;
margin-bottom: 20px;
}
.poll_new_small label {
font-size: 18px;
display: inline-block;
background: #454545;
color: #FFFFFF;
padding:10px;
}
.poll_new_small_text {
font-size: 18px;
display: inline-block;
background: #454545;
color: #FFFFFF;
padding:10px;
}
.poll_new_small_button{
font-size: 18px;
display: inline-block;
background: #454545;
color: #FFFFFF;
padding:10px;
}
/* Post */ /* Post */
.post { .post {

View file

@ -17,11 +17,12 @@
<title>${title}</title> <title>${title}</title>
</head> </head>
<body> <body>
<h1>Foo</h1> <h1>${title}</h1>
<div class="post">
${content01} ${content01}
<div class="small_form">
formular
</div> </div>
${poll_new_small()}
</body> </body>
</html> </html>

View file

@ -311,6 +311,11 @@ def base_polls():
return bobo.redirect(BASE_DICT["base_url"] + "polls/") return bobo.redirect(BASE_DICT["base_url"] + "polls/")
@bobo.query('/') @bobo.query('/')
def show_frontpage():
value_dict = get_default_values()
value_dict["polls"] = Poll.select()
return render("frontpage.html", **value_dict)
@bobo.query('/polls/') @bobo.query('/polls/')
def show_polls(): def show_polls():
value_dict = get_default_values() value_dict = get_default_values()