Updates for New Species. Added basic CSS styles for frontend.

This commit is contained in:
Philipp Naderer 2010-11-14 19:45:29 +00:00
parent 0f842d6541
commit cc3eb4332e
21 changed files with 613 additions and 239 deletions

View file

@ -38,8 +38,8 @@
%> %>
</p> </p>
<p> <p>
<button type="submit" name="save" value="1"><% gettext Save %></button> <button type="submit" class="normal small" name="save" value="1"><% gettext Save %></button>
<button type="button" id="restore" value="1"><% gettext Restore %></button> <button type="button" class="normal small" id="restore" value="1"><% gettext Restore %></button>
<a href="" class="cancel"><% gettext Cancel %></a> <a href="" class="cancel"><% gettext Cancel %></a>
</p> </p>
</form> </form>

View file

@ -1,40 +1,27 @@
<% #edit %> <% #edit %>
<script type="text/javascript"> <h1 class="storyTitle"><% response.title %></h1>
$(function() { <form class="form" method="post" action="<% response.action %>" enctype="multipart/form-data">
if ("<% file.created %>") {
$(".name").hide(); <div class="row topLabel">
$(".resize").hide(); <label for="file_origin"><% gettext "File" suffix=: %></label>
}; <% file.upload file %>
}); </div>
</script>
<p class="storyTitle"><% response.title %></p> <div class="row topLabel">
<form method="post" action="<% response.action %>" enctype="multipart/form-data"> <label for="name"><% gettext Name suffix=: %></label>
<table border="0" width="400" cellspacing="0" cellpadding="3"> <% file.input name %><br />
<tr> <small><% gettext "If you do not specify a name Antville will
<td class="small"><% gettext "File" suffix=: %></td> create one based on the name of the local file." %></small>
<td><% file.upload file %></td> </div>
</tr>
<tr class="name"> <div class="row topLabel">
<td valign="top" class="small"><% gettext Name suffix=: %></td> <label for="description"><% gettext Description suffix=: %></label>
<td> <% file.textarea description cols=40 %>
<% file.input name %><br /> </div>
<span class="small"><% gettext "If you do not specify a name Antville will
create one based on the name of the local or remote file, resp." %></span>
</td> <button type="submit" class="normal small" name="save" value="1"><% gettext Save %></button>
</tr>
<tr>
<td class="small" valign="top"><% gettext Description suffix=: %></td>
<td><% file.textarea description cols=40 %></td>
</tr>
<tr>
<td class="small" valign="top"> </td>
<td>
<br />
<button type="submit" name="save" value="1"><% gettext Save %></button>
<a href="" class="cancel"><% gettext Cancel %></button> <a href="" class="cancel"><% gettext Cancel %></button>
</td>
</tr>
</table>
</form> </form>

View file

@ -132,23 +132,12 @@ File.prototype.edit_action = function() {
File.prototype.getFormValue = function(name) { File.prototype.getFormValue = function(name) {
var self = this; var self = this;
var getOrigin = function(str) {
var origin = req.postParams.file_origin || self.origin;
if (origin && origin.contains("://")) {
return origin;
}
return null;
}
if (req.isPost()) { if (req.isPost()) {
if (name === "file") {
return getOrigin();
}
return req.postParams[name]; return req.postParams[name];
} }
switch (name) { switch (name) {
case "file": case "file":
return getOrigin(); return req.postParams.file_origin;
} }
return this[name]; return this[name];
} }
@ -169,7 +158,7 @@ File.prototype.update = function(data) {
throw Error(gettext("There was nothing to upload. Please be sure to choose a file.")); throw Error(gettext("There was nothing to upload. Please be sure to choose a file."));
} }
} else if (data.file_origin !== this.origin) { } else if (data.file_origin !== this.origin) {
var mime = data.file; var mime = data.file_origin;
if (mime.contentLength < 1) { if (mime.contentLength < 1) {
mime = getURL(data.file_origin); mime = getURL(data.file_origin);
if (!mime) { if (!mime) {

View file

@ -10,30 +10,7 @@
<span class="<% param.class %>"><% param.text %></span> <span class="<% param.class %>"><% param.text %></span>
<% #upload %> <% #upload %>
<script type="text/javascript"> <input type="file" name="<% param.name %>_origin" id="<% param.name %>_origin" value="<% param.value %>" />
$(function() {
if ($.browser.safari) {
$(".upload #<% param.name %>").css("visibility", "hidden");
} else {
$(".upload #<% param.name %>_control").hide();
}
});
</script>
<div class="upload" style="position: relative;">
<input type="file" id="<% param.name %>" name="<% param.name %>"
onchange='$("#<% param.name %>_origin").val($(this).val());'
style="position: relative; z-index: 1;" />
<div class="text" style="position: absolute; z-index: 2; top: 0; left: 0;">
<input type="text" name="<% param.name %>_origin"
id="<% param.name %>_origin" value="<% param.value %>"
onblur='$("#<% param.name %>").val("");' />
<button id="<% param.name %>_control" name="<% param.name %>_control"
type="button" onclick='$("#<% param.name %>").click();'>
<% gettext "Browse..." %>
</button>
</div>
</div>
<% #listItemFlag %> <% #listItemFlag %>
<td rowspan="2" width="10" align="center" valign="top" nowrap="nowrap" <td rowspan="2" width="10" align="center" valign="top" nowrap="nowrap"

View file

@ -8,7 +8,7 @@ click “Proceed” below the changes will be applied irreversibly.' %></p>
proceed.' %></p> proceed.' %></p>
<% this.skin <% this.type prefix=$ suffix=#delete %> %> <% this.skin <% this.type prefix=$ suffix=#delete %> %>
<p> <p>
<button type="submit" name="proceed" value="1"><% gettext Proceed %></button> <button type="submit" class="normal small" name="proceed" value="1"><% gettext Proceed %></button>
<a href="./" class="cancel"><% gettext Cancel %></a> <a href="./" class="cancel"><% gettext Cancel %></a>
</p> </p>
</form> </form>

View file

@ -1,74 +1,87 @@
<% #edit %> <% #add %>
<script type="text/javascript"> <h1 class="storyTitle"><% response.title %></h1>
$(function() { <form class="form" method="post" action="<% response.action %>" enctype="multipart/form-data">
if ("<% image.fileName %>") { <div class="row topLabel">
$(".name").hide(); <label for="file"><% gettext "File" suffix=: %></label>
} else { <% image.upload file %>
$("#image").hide(); </div>
}
if ("<% image.parent_type %>" === "Layout") {
$(".tags").hide();
}
});
</script>
<p class="storyTitle"><% response.title %></p> <div class="row topLabel">
<form method="post" action="<% response.action %>" enctype="multipart/form-data"> <label for="name"><% gettext "Name" suffix=: %></label>
<table border="0" width="400" cellspacing="0" cellpadding="3" style="clear: both;"> <% image.input name %><br/>
<tr>
<td class="small"><% gettext "File" suffix=: %></td> <small><% gettext "If you do not specify a name Antville will
<td><% image.upload file %></td> create one based on the name of the local or remote file, resp." %></small>
</tr> </div>
<tr class="name">
<td valign="top" class="small"><% gettext Name suffix=: %></td>
<td> <div class="row topLabel">
<% image.input name %><br /> <label for="description"><% gettext Description suffix=: %></label>
<span class="small"><% gettext "If you do not specify a name Antville will <% image.textarea description cols=40 %>
create one based on the name of the local or remote file, resp." %></span> </div>
</td>
</tr> <div class="row topLabel">
<tr> <label for="tags"><% gettext Tags suffix=: %></label>
<td class="small" valign="baseline"><% gettext Description suffix=: %></td> <% image.input tags size=55 %>
<td><% image.textarea description cols=40 %></td> </div>
</tr>
<tr class="tags"> <div class="row topLabel">
<td class="small"><% gettext Tags suffix=: %></td> <label for="maxWidth"><% gettext "Max. width" suffix=: %></label>
<td><% image.input tags size=55 %></td> <% image.input maxWidth value="400" %>
</tr> </div>
<tr class="resize">
<td></td> <div class="row topLabel">
<td> <label for="maxHeight"><% gettext "Max. height" suffix=: %></label>
<span class="small"></small> <% image.input maxHeight value="400" %>
</td> </div>
</tr>
<tr class="resize"> <p><small>
<td class="small" nowrap="nowrap"><% gettext "Max. width" suffix=: %></td>
<td><% image.input maxWidth value="400" %> pixel</td>
</tr>
<tr class="resize">
<td class="small" nowrap="nowrap"><% gettext "Max. height" suffix=: %></td>
<td><% image.input maxHeight value="400" %> pixel</td>
</tr>
<tr class="resize">
<td class="small"> </td>
<td class="small">
<% gettext "If you want to resize the image please specify your desired <% gettext "If you want to resize the image please specify your desired
maximum width and/or maximum height in pixels. If you specify both the image maximum width and/or maximum height in pixels. If you specify both the image
will be resized to match both criterias, but the image ratio will be will be resized to match both criterias, but the image ratio will be
preserved." %><br /><br /> preserved." %><br />
<% gettext "If the width or height of your image exceeds 100 pixels Antville <% gettext "If the width or height of your image exceeds 100 pixels Antville
automatically creates a thumbnail of it, too." %> automatically creates a thumbnail of it, too." %>
</td> </small></p>
</tr>
<tr> <div class="row topLabel">
<td class="small" valign="top"> </td> <button type="submit" class="normal small" id="save" name="save" value="1"><% gettext Save %></button>
<td> <a href="" class="cancel"><% gettext Cancel %></a>
<br /> </div>
<button type="submit" id="save" name="save" value="1"><% gettext Save %></button>
<a href="" class="cancel"><% gettext Cancel %></a> </form>
</td>
</tr> <% #edit %>
</table> <h1 class="storyTitle"><% response.title %></h1>
<form class="form" method="post" action="<% response.action %>" enctype="multipart/form-data">
<div class="row topLabel">
<label for="name"><% gettext "Name" suffix=: %></label>
<% image.input name %><br/>
<small><% gettext "If you do not specify a name Antville will
create one based on the name of the local or remote file, resp." %></small>
</div>
<div class="row topLabel">
<label for="description"><% gettext Description suffix=: %></label>
<% image.textarea description cols=40 %>
</div>
<div class="row topLabel">
<label for="tags"><% gettext Tags suffix=: %></label>
<% image.input tags size=55 %>
</div>
<div class="row">
<p class="imageThumbnail"><% image.thumbnail | image.link %></p>
</div>
<div class="row topLabel">
<button type="submit" class="normal small" id="save" name="save" value="1"><% gettext Save %></button>
<a href="delete" class="delete"><% gettext Delete %></a>
<a href="" class="cancel"><% gettext Cancel %></a>
</div>
</form> </form>
<% #listItem %> <% #listItem %>
@ -80,7 +93,7 @@ $(function() {
<p><em><% gettext "{0} on {1}" <% image.creator link %> <% image.created short %> %></em></p> <p><em><% gettext "{0} on {1}" <% image.creator link %> <% image.created short %> %></em></p>
<p><% gettext Properties suffix=':' %> <p><% gettext Properties suffix=':' %>
<% image.contentType %>, <% image.contentLength %>, <% image.width %>&times;<% image.height %> <% gettext pixels %></p> <% image.contentType %>, <% image.contentLength %>, <% image.width %>&times;<% image.height %> <% gettext pixels %></p>
<p><% image.thumbnail | image.link %></p> <p class="imageThumbnail"><% image.thumbnail | image.link %></p>
</div> </div>
<ul> <ul>

View file

@ -194,23 +194,12 @@ Image.prototype.edit_action = function() {
Image.prototype.getFormValue = function(name) { Image.prototype.getFormValue = function(name) {
var self = this; var self = this;
var getOrigin = function(str) {
var origin = req.postParams.file_origin || self.origin;
if (origin && origin.contains("://")) {
return origin;
}
return null;
}
if (req.isPost()) { if (req.isPost()) {
if (name === "file") {
return getOrigin();
}
return req.postParams[name]; return req.postParams[name];
} }
switch (name) { switch (name) {
case "file": case "file":
return getOrigin(); return req.postParams.file_origin;
case "maxWidth": case "maxWidth":
case "maxHeight": case "maxHeight":
return this[name] || 400; return this[name] || 400;
@ -236,7 +225,7 @@ Image.prototype.update = function(data) {
throw Error(gettext("There was nothing to upload. Please be sure to choose a file.")); throw Error(gettext("There was nothing to upload. Please be sure to choose a file."));
} }
} else if (data.file_origin !== this.origin) { } else if (data.file_origin !== this.origin) {
var mime = data.file; var mime = data.file_origin;
if (mime.contentLength < 1) { if (mime.contentLength < 1) {
mime = getURL(data.file_origin); mime = getURL(data.file_origin);
if (!mime) { if (!mime) {

View file

@ -110,7 +110,7 @@ Images.prototype.create_action = function() {
res.data.action = this.href(req.action); res.data.action = this.href(req.action);
res.data.title = gettext("Add Image"); res.data.title = gettext("Add Image");
res.data.body = image.renderSkinAsString("$Image#edit"); res.data.body = image.renderSkinAsString("$Image#add");
res.handlers.site.renderSkin("Site#page"); res.handlers.site.renderSkin("Site#page");
return; return;
} }

View file

@ -40,7 +40,7 @@ $(function() {
<a href="" id="addValueLink"><% gettext "Add variable" %></a> <a href="" id="addValueLink"><% gettext "Add variable" %></a>
</div> </div>
<p><br /> <p><br />
<button type="submit" name="save" value="1"><% gettext Save %></button> <button type="submit" class="normal small" name="save" value="1"><% gettext Save %></button>
<a href="" class="cancel"><% gettext Cancel %></a> <a href="" class="cancel"><% gettext Cancel %></a>
</p> </p>
</td> </td>
@ -53,7 +53,7 @@ $(function() {
<form method="post" action="<% response.action %>" enctype="multipart/form-data"> <form method="post" action="<% response.action %>" enctype="multipart/form-data">
<% layout.upload upload %> <% layout.upload upload %>
<br /> <br />
<button type="submit" name="submit" value="1"><% gettext Import %></button> <button type="submit" class="normal small" name="submit" value="1"><% gettext Import %></button>
<a href="" class="cancel"><% gettext Cancel %></button> <a href="" class="cancel"><% gettext Cancel %></button>
</form> </form>

View file

@ -63,7 +63,7 @@ $(function() {
</div> </div>
<div class="row"> <div class="row">
<button type="submit" id="submit" name="login" value="1" tabindex="4"><% gettext Login %></button> <button type="submit" class="normal small" id="submit" name="login" value="1" tabindex="4"><% gettext Login %></button>
<small><a href="<% site.href %>" class="cancel"><% gettext Cancel %></a></small> <small><a href="<% site.href %>" class="cancel"><% gettext Cancel %></a></small>
</div> </div>
</div> </div>
@ -123,7 +123,7 @@ $(function() {
</div> </div>
<div class="row"> <div class="row">
<button type="submit" id="submit" name="register" value="1"><% gettext Register %></button> <button type="submit" class="normal small" id="submit" name="register" value="1"><% gettext Register %></button>
<small><a href="<% site.href %>" class="cancel"><% gettext Cancel %></a></small> <small><a href="<% site.href %>" class="cancel"><% gettext Cancel %></a></small>
</div> </div>
</div> </div>
@ -146,7 +146,7 @@ $(function() {
</div> </div>
<div class="row"> <div class="row">
<button type="submit" id="submit" name="reset" value="1"><% gettext "Request password" %></button> <button type="submit" class="normal small" id="submit" name="reset" value="1"><% gettext "Request password" %></button>
<small><a href="<% site.href %>" class="cancel"><% gettext Cancel %></a></small> <small><a href="<% site.href %>" class="cancel"><% gettext Cancel %></a></small>
</div> </div>
</div> </div>
@ -170,7 +170,7 @@ $(function() {
<input type="hidden" name="token" id="token" value="<% request.token %>" /> <input type="hidden" name="token" id="token" value="<% request.token %>" />
<div class="row"> <div class="row">
<button type="submit" id="save" name="save" value="1"><% gettext "Save" %></button> <button type="submit" class="normal small" id="save" name="save" value="1"><% gettext "Save" %></button>
<small><a href="<% site.href %>" class="cancel"><% gettext Cancel %></a></small> <small><a href="<% site.href %>" class="cancel"><% gettext Cancel %></a></small>
</div> </div>
</div> </div>
@ -184,7 +184,7 @@ $(function() {
<form method="post" action="<% response.action %>"> <form method="post" action="<% response.action %>">
<label for="term" class="hidden"><% gettext "Search term" suffix=":" %></label> <label for="term" class="hidden"><% gettext "Search term" suffix=":" %></label>
<input type="text" name="term" id="term" value="<% request.term encoding="form" %>" /> <input type="text" name="term" id="term" value="<% request.term encoding="form" %>" />
<button type="submit" name="search" value="1"><% gettext Search %></button> <button type="submit" class="normal small" name="search" value="1"><% gettext Search %></button>
<small><a href="<% this.href %>" class="cancel"><% gettext Cancel %></a></small> <small><a href="<% this.href %>" class="cancel"><% gettext Cancel %></a></small>
</form> </form>
<% response.result %> <% response.result %>
@ -195,7 +195,7 @@ $(function() {
<% param.result %> <% param.result %>
<button type="submit" id="add" name="add" value="1"><% gettext "Add Member" %></button> <button type="submit" class="normal small" id="add" name="add" value="1"><% gettext "Add Member" %></button>
</form> </form>
<% #result %> <% #result %>

View file

@ -18,7 +18,7 @@
</div> </div>
<div class="row"> <div class="row">
<button type="submit" id="submit" name="save" value="1"><% gettext "Save" %></button> <button type="submit" class="normal small" id="submit" name="save" value="1"><% gettext "Save" %></button>
<small><a href="." class="cancel"><% gettext Cancel %></a></small> <small><a href="." class="cancel"><% gettext Cancel %></a></small>
</div> </div>
</div> </div>
@ -73,7 +73,7 @@
</div> </div>
<div class="row"> <div class="row">
<button type="submit" id="send" name="send" value="1"><% gettext "Send" %></button> <button type="submit" class="normal small" id="send" name="send" value="1"><% gettext "Send" %></button>
<a href="." class="cancel"><% gettext Cancel %></a> <a href="." class="cancel"><% gettext Cancel %></a>
</div> </div>
</div> </div>

View file

@ -1,8 +1,8 @@
<% #status %> <% #status %>
<ul> <ul>
<li><% gettext "Logged in as {0}" <% membership.name | membership.link %> %></li> <li><% gettext "Logged in as {0}" <% membership.name | membership.link %> %><br/>
<li><% gettext <% membership.role | capitalize %> prefix='(' suffix=')' %></li> <% gettext <% membership.role | capitalize %> prefix='(' suffix=')' %></li>
<% site.members.link edit <% gettext "Edit User Profile" %> prefix="<li>" suffix="</li>" %> <% site.members.link edit <% gettext "Edit User Profile" %> prefix="<li>" suffix="</li>" %>
<% site.link subscribe <% gettext Subscribe context=verb %> prefix="<li>" suffix="</li>" %> <% site.link subscribe <% gettext Subscribe context=verb %> prefix="<li>" suffix="</li>" %>
<% site.members.link updated <% gettext Subscriptions %> prefix="<li>" suffix="</li>" %> <% site.members.link updated <% gettext Subscriptions %> prefix="<li>" suffix="</li>" %>
@ -11,6 +11,5 @@
<% #login %> <% #login %>
<div> <div>
<h2><% gettext "You are not logged in" %></h2> <p><em><% gettext "You are not logged in" %></em><br/><% site.members.link login <% gettext Login context=verb %> %></p>
<p><% site.members.link login <% gettext Login context=verb %> %></p>
</div> </div>

View file

@ -1,25 +1,27 @@
<% #header %> <% #header %>
<h2 class="storyTitle"><% poll.question %></h2> <h2 class="voteTitle"><% poll.question %></h2>
<p><small><% gettext "{0} on {1}" <% poll.creator %> <% poll.created %> %></small></p> <p><small><% gettext "{0} on {1}" <% poll.creator %> <% poll.created %> %></small></p>
<% #footer %> <% #footer %>
<p> <p>
<% poll.link edit <% gettext Edit %> %> <% poll.link edit <% gettext Edit %> prefix='<button class="controls">' suffix='</button>' %>
<% poll.link rotate prefix=" | " %> <% poll.link rotate prefix='<button class="controls">' suffix='</button>' %>
<% poll.link delete <% gettext Delete %> prefix=" | " %> <% poll.link delete <% gettext Delete %> prefix='<button class="controls">' suffix='</button>' %>
</p> </p>
<% #main %> <% #main %>
<section>
<% if <% param.header %> is true then <% poll.skin #header %> else <% if <% param.header %> is true then <% poll.skin #header %> else
<% poll.question prefix='<h2 class="storyTitle">' suffix="</h2> %> %> <% poll.question prefix='<h2 class="voteTitle">' suffix="</h2> %> %>
<form method="post" action="<% poll.href %>"> <form class="voteForm" method="post" action="<% poll.href %>">
<% poll.loop skin="$Choice#main" %> <% poll.loop skin="$Choice#main" %>
<p> <p>
<button type="submit" name="vote" value="1"><% gettext Vote %></button> <button type="submit" class="vote normal small" name="vote" value="1"><% gettext Vote %></button>
<% poll.link result <% gettext "Results" %> %> <% poll.link result <% gettext "Results" %> %>
</p> </p>
</section>
</form> </form>
<% poll.skin #footer %> <% poll.skin #footer %>
@ -81,11 +83,11 @@ $(function() {
</script> </script>
<h1 class="storyTitle"><% response.title %></h1> <h1 class="storyTitle"><% response.title %></h1>
<form method="post" action="<% response.action %>"> <form class="form" method="post" action="<% response.action %>">
<p> <div class="row">
<% gettext Question suffix=':' %><br/> <label for="question"><% gettext Question suffix=':' %><label>
<% poll.input question class="w300" %> <% poll.input question class="w300" %>
</p> </div>
<% poll.input choices %> <% poll.input choices %>
<p> <p>
<a href="#/" id="add" role="button"><% gettext "Add Choice" %></a> <a href="#/" id="add" role="button"><% gettext "Add Choice" %></a>
@ -98,13 +100,13 @@ $(function() {
<% poll.modified short %> prefix="<br />" %> <% poll.modified short %> prefix="<br />" %>
%> %>
</p> </p>
<div> <div style="margin-top: 10px;">
<button type="submit" name="save" value="<% poll.status default=closed %>"> <button type="submit" class="normal small" name="save" value="<% poll.status default=closed %>">
<% gettext Save %> <% gettext Save %>
</button> </button>
<% if <% poll.status %> is open then "" else <% if <% poll.status %> is open then "" else
<% gettext "Save and Run" prefix='<button type="submit" <% gettext "Save and Run" prefix='<button type="submit"
name="save" value="open"><strong>' suffix=</strong></button> %> class="normal small" name="save" value="open"><strong>' suffix=</strong></button> %>
%> %>
<a href="./" class="cancel"><% gettext Cancel %></a> <a href="./" class="cancel"><% gettext Cancel %></a>
</div> </div>

View file

@ -45,7 +45,7 @@ simple site hosting system with many advanced
<td></td> <td></td>
<td> <td>
<br /> <br />
<button type="submit" name="create" value="1"><% gettext Create %></button> <button type="submit" class="normal small" name="create" value="1"><% gettext Create %></button>
<a href="" class="cancel"><% gettext Cancel %></a> <a href="" class="cancel"><% gettext Cancel %></a>
</td> </td>
</tr> </tr>
@ -166,6 +166,12 @@ input.macroCode {
padding: 3px 2px; padding: 3px 2px;
} }
.storyTitle {
font-size: 24px;
font-weight: bold;
margin-bottom: 12px;
}
.choice input[type='text'] { .choice input[type='text'] {
margin-left: 10px; margin-left: 10px;
width: 180px; width: 180px;
@ -179,6 +185,25 @@ input.macroCode {
margin: 0; margin: 0;
} }
h2.voteTitle {
font-size: 16px;
font-weight: bold;
}
form.voteForm p {
margin-top: 6px;
font-size: 15px;
}
form.voteForm .choice {
margin: 2px 0;
font-size: 15px;
}
button.vote.normal {
margin-right: 10px;
}
.pollResultsBar.votes0 { .pollResultsBar.votes0 {
background: rgb(80, 20, 10); background: rgb(80, 20, 10);
background-color: rgba(80, 20, 10, 0.5); background-color: rgba(80, 20, 10, 0.5);
@ -217,23 +242,42 @@ input.macroCode {
} }
.form .row { .form .row {
margin: 10px 0px; margin: 12px 0px;
} }
.form .row label:first-child { .form .row label:first-child {
width: 160px; width: 160px;
display: inline-block; display: inline-block;
margin-bottom: 3px;
} }
.form .row.topLabel label:first-child { .form .row.topLabel label:first-child {
display: block; display: block;
width: 100%; width: 100%;
margin-bottom: 2px;
} }
.form .row .col { .form .row .col {
display: inline-block; display: inline-block;
} }
form fieldset {
border: 1px solid #ccc;
padding: 8px;
font-size: 13px;
}
form fieldset legend {
padding: 2px 5px 2px 5px;
margin-left: 10px;
font-size: 12px;
color: #8c8c8c;
}
form p {
margin: 10px 0;
}
/** Needed for basic form layout **/ /** Needed for basic form layout **/
.w100 { .w100 {
width: 100px; width: 100px;
@ -272,7 +316,12 @@ hr.listSeparator {
} }
.listNavigationItem h2 { .listNavigationItem h2 {
font-size: 18px; font-size: 15px;
margin-bottom: 2px;
}
.listNavigationItem p {
font-size: 13px;
} }
.listNavigationItem .details { .listNavigationItem .details {
@ -280,10 +329,9 @@ hr.listSeparator {
width: 500px; width: 500px;
} }
.listNavigationItem h2,
.listNavigationItem p, .listNavigationItem p,
.listNavigationItem ul { .listNavigationItem ul {
margin: 0px; margin: 0 0 2px 0;
} }
.listNavigationItem em { .listNavigationItem em {
@ -298,8 +346,12 @@ hr.listSeparator {
.listNavigationItem li { .listNavigationItem li {
margin: 3px 0; margin: 3px 0;
font-size: 13px;
} }
.listNavigationItem p.imageThumbnail {
margin-top: 8px;
}
/** Table Styles */ /** Table Styles */
.scoreboard { .scoreboard {
@ -350,6 +402,86 @@ hr.listSeparator {
text-align: center; text-align: center;
} }
/**********************************************************
* BUTTONS WITH CSS3
*********************************************************/
/* pale blue (inspired by okcupid.com)
*******************************************************************************/
button.controls {
background: #e7eef5;
border: 1px solid #becfe3;
border-radius: 16px;
-moz-border-radius: 16px;
-webkit-border-radius: 16px;
box-shadow: inset 0 1px 0 0 #fff;
-moz-box-shadow: inset 0 1px 0 0 #fff;
-webkit-box-shadow: inset 0 1px 0 0 #fff;
color: #2a65a6;
font-family: "lucida grande", sans-serif;
font-size: 12px;
font-weight: normal;
line-height: 1;
padding: 4px 15px;
text-align: center;
}
button.controls:hover {
color: #6f8cc0;
}
button.controls:active {
border: 1px solid #8c98a7;
color: #6f8cc0;
}
button.controls a {
text-decoration: none;
}
/**** https://github.com/ubuwaits/css3-buttons ****/
button.normal {
background: #eee;
background: -moz-linear-gradient(0% 100% 90deg, #bfbfbf, #eee);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#eee), to(#bfbfbf));
border: 1px solid #ccc;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
box-shadow: inset 0 0 5px #f5f5f5;
-moz-box-shadow: inset 0 0 5px #f5f5f5;
-webkit-box-shadow: inset 0 0 5px #f5f5f5;
color: #333;
font-family: "lucida grande", sans-serif;
font-size: 12px;
font-weight: bold;
line-height: 1;
padding: 8px 26px;
text-align: center;
text-shadow: 0 1px 0px #eee;
}
button.normal:hover {
cursor: pointer;
background: #dfdfdf;
background: -moz-linear-gradient(0% 100% 90deg, #aaa, #dfdfdf);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#dfdfdf), to(#aaa));
box-shadow: inset 0 0 5px #e5e5e5;
-moz-box-shadow: inset 0 0 5px #e5e5e5;
-webkit-box-shadow: inset 0 0 5px #e5e5e5;
}
button.normal:active {
background: #bfbfbf;
background: -moz-linear-gradient(0% 100% 90deg, #eee, #bfbfbf);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#bfbfbf), to(#eee));
}
button.normal.small {
padding: 5px 10px
}
/*********************************************************** /***********************************************************
ul.skinmgrTree { ul.skinmgrTree {
padding-left:15px; padding-left:15px;

View file

@ -18,7 +18,7 @@ document.writeln('<' + 'scr' + 'ipt type="text/javascript"' +
<div class="form"> <div class="form">
<div class="row"> <div class="row">
<input type="text" name="filter" value="<% request.filter encoding="form" %>" size="30" /> <input type="text" name="filter" value="<% request.filter encoding="form" %>" size="30" />
<button type="submit" name="submit" value="1"><% gettext Filter %></button> <button type="submit" class="normal small" name="submit" value="1"><% gettext Filter %></button>
</div> </div>
<div class="row"> <div class="row">
@ -107,7 +107,7 @@ referrers.push(new Antville.Referrer("<% param.referrer %>",
<% file.skin File#main %> '<small>' <% file.skin File#main %> '<small>'
<% file.created | format short %> '</small>' %> %> else <% param.status %> %></p> <% file.created | format short %> '</small>' %> %> else <% param.status %> %></p>
<form action="" method="post"> <form action="" method="post">
<button type="submit" name="submit" value="<% if <% param.status %> is null then start else stop %>"> <button type="submit" class="normal small" name="submit" value="<% if <% param.status %> is null then start else stop %>">
<% if <% param.status %> is null then <% gettext Start %> else <% gettext Stop %> %> <% if <% param.status %> is null then <% gettext Start %> else <% gettext Stop %> %>
</button> </button>
<a href="" class="cancel"><% gettext Cancel %></a> <a href="" class="cancel"><% gettext Cancel %></a>
@ -123,7 +123,7 @@ referrers.push(new Antville.Referrer("<% param.referrer %>",
<form method="post" enctype="multipart/form-data"> <form method="post" enctype="multipart/form-data">
<% if <% file.self %> is null then <% site.upload file prefix=<p> suffix=</p> %> %> <% if <% file.self %> is null then <% site.upload file prefix=<p> suffix=</p> %> %>
<button type="submit" name="submit" value="<% if <% file.self %> is null then start else stop %>"> <button type="submit" class="normal small" name="submit" value="<% if <% file.self %> is null then start else stop %>">
<% if <% file.self %> is null then <% gettext Start %> else <% gettext Stop %> %> <% if <% file.self %> is null then <% gettext Start %> else <% gettext Stop %> %>
</button> </button>
<a href="" class="cancel"><% gettext Cancel %></a> <a href="" class="cancel"><% gettext Cancel %></a>
@ -218,7 +218,7 @@ line to be applied on every URL in the referrer and backlink lists."
<tr> <tr>
<td></td> <td></td>
<td><br /> <td><br />
<button type="submit" name="save" value="1"><% gettext Save %></button> <button type="submit" class="normal small" name="save" value="1"><% gettext Save %></button>
<a href="" class="cancel"><% gettext Cancel %></a> <a href="" class="cancel"><% gettext Cancel %></a>
</tr> </tr>
</table> </table>

View file

@ -39,7 +39,7 @@ prefix="Last update: " default="None so far" %>)</small></li>
<form method="post" action="<% site.href search %>"> <form method="post" action="<% site.href search %>">
<label for="q" class="hidden"><% gettext "Search term" suffix=":" %></label> <label for="q" class="hidden"><% gettext "Search term" suffix=":" %></label>
<input type="text" size="15" name="q" class="searchbox" value="<% request.q encoding="form" %>" /> <input type="text" size="15" name="q" class="searchbox" value="<% request.q encoding="form" %>" />
<button type="submit" name="search" value="1" class="searchbox"><% gettext Find %></button> <button type="submit" class="normal small" name="search" value="1" class="searchbox"><% gettext Find %></button>
</form> </form>
<% #robots %> <% #robots %>
@ -62,6 +62,7 @@ Disallow: /stories/top
<!-- Beta, just a try --> <!-- Beta, just a try -->
<link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Neuton&subset=latin' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" title="CSS Stylesheet" href="<% site.href main.css %>" /> <link rel="stylesheet" type="text/css" title="CSS Stylesheet" href="<% site.href main.css %>" />
<!--[if IE]> <!--[if IE]>
@ -75,7 +76,7 @@ Disallow: /stories/top
<h1><% site.title | site.link title=<% site.tagline %> %></h1> <h1><% site.title | site.link title=<% site.tagline %> %></h1>
</header> </header>
<div id="main"> <div class="wrapper">
<section> <section>
<% response.message prefix='<div class="message">' suffix='</div><br />' %> <% response.message prefix='<div class="message">' suffix='</div><br />' %>
<% response.body %> <% response.body %>
@ -103,14 +104,14 @@ suffix='</h2><div class="calendarBox">' %> suffix="</div>" %>
<h2><% gettext "Updates" %></h2> <h2><% gettext "Updates" %></h2>
<% list postings skin=Story#history %> <% list postings skin=Story#history %>
<hr> <hr class="madeSeparator" />
<ul> <ul>
<li><% image /rss.png | site.link rss.xml %></li>
<li><% image /smallchaos.gif | link http://antville.org %></li> <li><% image /smallchaos.gif | link http://antville.org %></li>
<li><% image /helma.png | link http://helma.org %></li> <li><% image /helma.png | link http://helma.org %></li>
</ul> </ul>
</nav> </nav>
<div class="clearer"></div>
</div> </div>
</body> </body>
</html> </html>
@ -142,6 +143,134 @@ $(document).ready(function() {
<% value "small font color" #959595 %> <% value "small font color" #959595 %>
<% #stylesheet %> <% #stylesheet %>
/** YUI 3 reset.css **/
s/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
/*
TODO will need to remove settings on HTML since we can't namespace it.
TODO with the prefix, should I group by selector or property for weight savings?
*/
html{
color:#000;
background:#FFF;
}
/*
TODO remove settings on BODY since we can't namespace it.
*/
/*
TODO test putting a class on HEAD.
- Fails on FF.
*/
body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
form,
fieldset,
legend,
input,
textarea,
p,
blockquote,
th,
td {
margin:0;
padding:0;
}
table {
border-collapse:collapse;
border-spacing:0;
}
fieldset,
img {
border:0;
}
/*
TODO think about hanlding inheritence differently, maybe letting IE6 fail a bit...
*/
address,
caption,
cite,
code,
dfn,
em,
strong,
th,
var {
font-style:normal;
font-weight:normal;
}
/*
TODO Figure out where this list-style rule is best set. Hedger has a request to investigate.
*/
li {
list-style:none;
}
caption,
th {
text-align:left;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-size:100%;
font-weight:normal;
}
q:before,
q:after {
content:'';
}
abbr,
acronym {
border:0;
font-variant:normal;
}
/* to preserve line-height and selector appearance */
sup {
vertical-align:text-top;
}
sub {
vertical-align:text-bottom;
}
input,
textarea,
select {
font-family:inherit;
font-size:inherit;
font-weight:inherit;
}
/*to enable resizing for IE*/
input,
textarea,
select {
*font-size:100%;
}
/*because legend doesn't inherit in IE */
legend {
color:#000;
}
/** DO NOT REMOVE THE .hidden CLASS! IT'S USED TO IMPROVE THE ACCESSIBILITY **/ /** DO NOT REMOVE THE .hidden CLASS! IT'S USED TO IMPROVE THE ACCESSIBILITY **/
.hidden { .hidden {
position: absolute; position: absolute;
@ -149,20 +278,174 @@ $(document).ready(function() {
left: -6000px; left: -6000px;
} }
.clearer {
clear: both;
}
body { body {
font-family: 'Droid Sans', arial, serif; font-family: 'Droid Sans', arial, serif;
margin: 0px 0px 0px 16px; margin: 0;
padding: 0px; padding: 0 0 60px 0;
color: #161616;
} }
#main > section { .wrapper {
width: 700px; width: 982px;
}
.wrapper > section {
width: 675px;
float: left;
padding: 0 25px 0 30px;
}
.wrapper > nav {
width: 230px;
padding: 0px 0px 0px 20px;
float: left; float: left;
} }
#main > nav { .wrapper section > p {
float: left; margin: 10px 0;
width: 240px;
padding: 0px 0px 0px 14px;
} }
a {
color: #2e4e94;
}
a:focus,
a:hover {
color: #444;
text-decoration: underline;
}
header a {
color: #fff;
text-decoration: none;
-webkit-transition: color 250ms ease-in;
-moz-transition: color 250ms ease-in;
-o-transition: color 250ms ease-in;
transition: color 250ms ease-in;
}
header a:focus,
header a:hover {
color: #fff;
text-decoration: none;
}
header a:focus:after,
header a:hover:after {
content: ' ‣';
}
header {
border-bottom: 1px solid #e0e0e2;
margin-bottom: 23px;
padding: 10px 8px 8px 30px;
background: #93cede; /* old browsers */
background: -moz-linear-gradient(top, #93cede 0%, #75bdd1 41%, #49a5bf 100%); /* firefox */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#93cede), color-stop(41%,#75bdd1), color-stop(100%,#49a5bf)); /* webkit */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#93cede', endColorstr='#49a5bf',GradientType=0 ); /* ie */
}
header h1 {
font-size: 2em;
}
article {
border-bottom: 1px solid #e0e0e2;
padding-bottom: 26px;
margin-bottom: 22px;
font-size: 16px;
line-height: 20px;
}
article .storyDate {
font-size: 13px;
margin: 0 0 8px 0;
}
article h1 {
font-size: 22px;
margin: 0 0 2px 0;
}
article h1 a {
color: inherit;
text-decoration: none;
}
article h1 a:focus,
article h1 a:hover {
color: inherit;
text-decoration: none;
}
article h1 a:focus:after,
article h1 a:hover:after {
content: ' ‣';
}
article .storyText {
padding-right: 15px;
}
article .storyText p {
margin-bottom: 10px;
}
article footer {
margin-top: -4px;
}
article footer .action {
margin-right: 10px;
}
nav {
font-size: 13px;
border-left: 1px solid #e0e0e2;
}
nav h2 {
font-size: 15px;
font-family: 'Neuton', arial, helvetica, serif;
margin: 12px 0 0 0;
font-weight: bold;
}
nav .historyItem {
margin-bottom: 6px;
}
nav li {
margin: 0 0 3px 0;
}
nav .madeSeparator {
border: none;
height: none;
outline: none;
background: transparent;
color: #fff;
margin-top: 30px;
}
nav .calendar th {
text-align: center;
font-weight: bold;
height: 20px;
}
nav .calendar .day {
width: 32px;
height: 20px;
}
/**** List Styles ****/
article ul li {
list-style-type: disc;
}

View file

@ -12,10 +12,10 @@ else
</div> </div>
<% skin.textarea source class="formWide" wrap="virtual" %> <% skin.textarea source class="formWide" wrap="virtual" %>
<p> <p>
<button type="submit" name="save" value="1"> <button type="submit" class="normal small" name="save" value="1">
<% gettext "Save and Edit" %> <% gettext "Save and Edit" %>
</button> </button>
<button type="submit" name="save" value="2"> <button type="submit" class="normal small" name="save" value="2">
<strong><% gettext "Save" %></strong> <strong><% gettext "Save" %></strong>
</button> </button>
<a href="<% layout.skins.href modified %>"><% gettext Cancel %></a> <a href="<% layout.skins.href modified %>"><% gettext Cancel %></a>

View file

@ -575,7 +575,7 @@ Story.prototype.format_filter = function(value, param, mode) {
break; break;
default: default:
value = this.macro_filter(format(value), param); value = this.macro_filter(formatParagraphs(value), param);
return this.url_filter(value, param); return this.url_filter(value, param);
} }
} }

View file

@ -1,14 +1,10 @@
<% #main %> <% #main %>
<article> <article>
<% story.skin Story#date %> <% story.skin Story#content %>
<% story.skin Story#content %> <footer>
<p class="small"> <% story.skin Story#actions %>
<% story.link comment#form <% gettext Comment context=verb %> %> <% story.skin Story#comments %>
<% story.link edit <% gettext Edit %> %> </footer>
</p>
<a name="comments" id="comments"></a>
<p><% story.comments %></p>
<p><% story.referrers %></p>
</article> </article>
<% #edit %> <% #edit %>
@ -36,47 +32,54 @@
<legend><% gettext Options %></legend> <legend><% gettext Options %></legend>
<p><% gettext "The story is {0} and {1}" <% story.select status %> <% story.select mode %> %></p> <p><% gettext "The story is {0} and {1}" <% story.select status %> <% story.select mode %> %></p>
<p><% gettext "Comments of the story are {0}" <% story.select commentMode %> %></p> <p><% gettext "Comments of the story are {0}" <% story.select commentMode %> %></p>
<p>
<% if <% story.creator %> is null then "" else
<% gettext "Created by {0} on {1}" <% story.creator %> <% story.created %> prefix="<p>" suffix="</p>" %>
%>
<% if <% story.created %> is <% story.modified %> then "" else
<% gettext "Last modified by {0} on {1}" <% story.modifier %>
<% story.modified %> prefix="<p>" suffix="</p>" %>
%>
</p>
</fieldset> </fieldset>
<% if <% story.creator %> is null then "" else
<% gettext "Created by {0} on {1}" <% story.creator %> <% story.created %> prefix="<p>" suffix="</p>" %>
%>
<% if <% story.created %> is <% story.modified %> then "" else
<% gettext "Last modified by {0} on {1}" <% story.modifier %>
<% story.modified %> prefix="<p>" suffix="</p>" %>
%>
<div class="row"> <div class="row">
<button type="submit" name="save" value="1"><% gettext Save %></button> <button type="submit" class="normal" name="save" value="1"><% gettext Save %></button>
<button type="button" id="restore" value="1"><% gettext Restore %></button> <button type="button" id="restore" value="1"><% gettext Restore %></button>
</div> </div>
</div> </div>
</form> </form>
<% #date %> <% #content %>
<h1><a href="<% story.href %>"><% story.title %></a></h1>
<div class="storyDate"> <div class="storyDate">
<% story.creator link suffix=, %> <% story.creator link suffix=, %>
<time datetime="<% story.created "iso8601w3c" %>"><% story.created "EEEE, d. MMMM yyyy HH:mm" %></time> <time datetime="<% story.created "iso8601w3c" %>"><% story.created "EEEE, d. MMMM yyyy HH:mm" %></time>
</div> </div>
<% #content %> <div class="storyText"><% story.text | story.format %></div>
<h1><% story.title %></h1>
<div><% story.text | story.format %></div>
<% #preview %> <% #preview %>
<article> <article>
<% story.skin Story#date %>
<% story.skin Story#content %> <% story.skin Story#content %>
<p> <footer>
<% story.link main <% gettext Link %> %> <% story.skin Story#actions %>
<% story.comments link prefix="(" suffix=")" %> </footer>
<% story.link comment#form <% gettext Comment context=verb %> %>
<% story.link edit <% gettext Edit %> %>
</p>
</article> </article>
<% #actions %>
<p class="small">
<% story.link comment#form <% gettext Comment context=verb %> prefix="<span class='action'>" suffix="</span>" %>
<% story.link edit <% gettext Edit %> prefix="<span class='action'>" suffix="</span>" %>
</p>
<% #comments %>
<% story.comments prefix="<p>" suffix="</p>" %>
<% story.referrers prefix="<p>" suffix="</p>" %>
<% #embed %> <% #embed %>
<% story.title prefix='<h1 class="storyTitle">'suffix="</h1>" %> <% story.title prefix='<h1 class="storyTitle">'suffix="</h1>" %>
<% story.text | clip %> <% story.text | clip %>
@ -88,7 +91,6 @@
</p> </p>
<% #comment %> <% #comment %>
<% story.skin Story#date %>
<% story.skin Story#content %> <% story.skin Story#content %>
<% #rss %> <% #rss %>

View file

@ -26,7 +26,8 @@
</tr> </tr>
<% #controls %> <% #controls %>
... <a href="" onclick='var name; ...
<a href="" onclick='var name;
if (name = prompt("<% gettext 'Please enter new name for this tag' suffix=: %>")) { if (name = prompt("<% gettext 'Please enter new name for this tag' suffix=: %>")) {
location.href="<% tag.href action="rename" %>?name=" + name; location.href="<% tag.href action="rename" %>?name=" + name;
}'><% gettext "Rename Tag" %></a> | }'><% gettext "Rename Tag" %></a> |

View file

@ -94,7 +94,7 @@ $(function() {
</div> </div>
<div class="row"> <div class="row">
<button type="submit" id="save" name="save" value="1"><% gettext "Save" %></button> <button type="submit" class="normal small" id="save" name="save" value="1"><% gettext "Save" %></button>
<small><a href="<% this.href %>" class="cancel"><% gettext Cancel %></a></small> <small><a href="<% this.href %>" class="cancel"><% gettext Cancel %></a></small>
</div> </div>
</div> </div>