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>
<button type="submit" name="save" value="1"><% gettext Save %></button>
<button type="button" id="restore" value="1"><% gettext Restore %></button>
<button type="submit" class="normal small" name="save" value="1"><% gettext Save %></button>
<button type="button" class="normal small" id="restore" value="1"><% gettext Restore %></button>
<a href="" class="cancel"><% gettext Cancel %></a>
</p>
</form>

View file

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

View file

@ -132,23 +132,12 @@ File.prototype.edit_action = function() {
File.prototype.getFormValue = function(name) {
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 (name === "file") {
return getOrigin();
}
return req.postParams[name];
}
switch (name) {
case "file":
return getOrigin();
return req.postParams.file_origin;
}
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."));
}
} else if (data.file_origin !== this.origin) {
var mime = data.file;
var mime = data.file_origin;
if (mime.contentLength < 1) {
mime = getURL(data.file_origin);
if (!mime) {

View file

@ -10,30 +10,7 @@
<span class="<% param.class %>"><% param.text %></span>
<% #upload %>
<script type="text/javascript">
$(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>
<input type="file" name="<% param.name %>_origin" id="<% param.name %>_origin" value="<% param.value %>" />
<% #listItemFlag %>
<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>
<% this.skin <% this.type prefix=$ suffix=#delete %> %>
<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>
</p>
</form>

View file

@ -1,74 +1,87 @@
<% #edit %>
<script type="text/javascript">
$(function() {
if ("<% image.fileName %>") {
$(".name").hide();
} else {
$("#image").hide();
}
if ("<% image.parent_type %>" === "Layout") {
$(".tags").hide();
}
});
</script>
<% #add %>
<h1 class="storyTitle"><% response.title %></h1>
<form class="form" method="post" action="<% response.action %>" enctype="multipart/form-data">
<div class="row topLabel">
<label for="file"><% gettext "File" suffix=: %></label>
<% image.upload file %>
</div>
<p class="storyTitle"><% response.title %></p>
<form method="post" action="<% response.action %>" enctype="multipart/form-data">
<table border="0" width="400" cellspacing="0" cellpadding="3" style="clear: both;">
<tr>
<td class="small"><% gettext "File" suffix=: %></td>
<td><% image.upload file %></td>
</tr>
<tr class="name">
<td valign="top" class="small"><% gettext Name suffix=: %></td>
<td>
<% image.input name %><br />
<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>
</tr>
<tr>
<td class="small" valign="baseline"><% gettext Description suffix=: %></td>
<td><% image.textarea description cols=40 %></td>
</tr>
<tr class="tags">
<td class="small"><% gettext Tags suffix=: %></td>
<td><% image.input tags size=55 %></td>
</tr>
<tr class="resize">
<td></td>
<td>
<span class="small"></small>
</td>
</tr>
<tr class="resize">
<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">
<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 topLabel">
<label for="maxWidth"><% gettext "Max. width" suffix=: %></label>
<% image.input maxWidth value="400" %>
</div>
<div class="row topLabel">
<label for="maxHeight"><% gettext "Max. height" suffix=: %></label>
<% image.input maxHeight value="400" %>
</div>
<p><small>
<% 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
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
automatically creates a thumbnail of it, too." %>
</td>
</tr>
<tr>
<td class="small" valign="top"> </td>
<td>
<br />
<button type="submit" id="save" name="save" value="1"><% gettext Save %></button>
</small></p>
<div class="row topLabel">
<button type="submit" class="normal small" id="save" name="save" value="1"><% gettext Save %></button>
<a href="" class="cancel"><% gettext Cancel %></a>
</td>
</tr>
</table>
</div>
</form>
<% #edit %>
<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>
<% #listItem %>
@ -80,7 +93,7 @@ $(function() {
<p><em><% gettext "{0} on {1}" <% image.creator link %> <% image.created short %> %></em></p>
<p><% gettext Properties suffix=':' %>
<% 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>
<ul>

View file

@ -194,23 +194,12 @@ Image.prototype.edit_action = function() {
Image.prototype.getFormValue = function(name) {
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 (name === "file") {
return getOrigin();
}
return req.postParams[name];
}
switch (name) {
case "file":
return getOrigin();
return req.postParams.file_origin;
case "maxWidth":
case "maxHeight":
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."));
}
} else if (data.file_origin !== this.origin) {
var mime = data.file;
var mime = data.file_origin;
if (mime.contentLength < 1) {
mime = getURL(data.file_origin);
if (!mime) {

View file

@ -110,7 +110,7 @@ Images.prototype.create_action = function() {
res.data.action = this.href(req.action);
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");
return;
}

View file

@ -40,7 +40,7 @@ $(function() {
<a href="" id="addValueLink"><% gettext "Add variable" %></a>
</div>
<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>
</p>
</td>
@ -53,7 +53,7 @@ $(function() {
<form method="post" action="<% response.action %>" enctype="multipart/form-data">
<% layout.upload upload %>
<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>
</form>

View file

@ -63,7 +63,7 @@ $(function() {
</div>
<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>
</div>
</div>
@ -123,7 +123,7 @@ $(function() {
</div>
<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>
</div>
</div>
@ -146,7 +146,7 @@ $(function() {
</div>
<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>
</div>
</div>
@ -170,7 +170,7 @@ $(function() {
<input type="hidden" name="token" id="token" value="<% request.token %>" />
<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>
</div>
</div>
@ -184,7 +184,7 @@ $(function() {
<form method="post" action="<% response.action %>">
<label for="term" class="hidden"><% gettext "Search term" suffix=":" %></label>
<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>
</form>
<% response.result %>
@ -195,7 +195,7 @@ $(function() {
<% 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>
<% #result %>

View file

@ -18,7 +18,7 @@
</div>
<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>
</div>
</div>
@ -73,7 +73,7 @@
</div>
<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>
</div>
</div>

View file

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

View file

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

View file

@ -45,7 +45,7 @@ simple site hosting system with many advanced
<td></td>
<td>
<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>
</td>
</tr>
@ -166,6 +166,12 @@ input.macroCode {
padding: 3px 2px;
}
.storyTitle {
font-size: 24px;
font-weight: bold;
margin-bottom: 12px;
}
.choice input[type='text'] {
margin-left: 10px;
width: 180px;
@ -179,6 +185,25 @@ input.macroCode {
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 {
background: rgb(80, 20, 10);
background-color: rgba(80, 20, 10, 0.5);
@ -217,23 +242,42 @@ input.macroCode {
}
.form .row {
margin: 10px 0px;
margin: 12px 0px;
}
.form .row label:first-child {
width: 160px;
display: inline-block;
margin-bottom: 3px;
}
.form .row.topLabel label:first-child {
display: block;
width: 100%;
margin-bottom: 2px;
}
.form .row .col {
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 **/
.w100 {
width: 100px;
@ -272,7 +316,12 @@ hr.listSeparator {
}
.listNavigationItem h2 {
font-size: 18px;
font-size: 15px;
margin-bottom: 2px;
}
.listNavigationItem p {
font-size: 13px;
}
.listNavigationItem .details {
@ -280,10 +329,9 @@ hr.listSeparator {
width: 500px;
}
.listNavigationItem h2,
.listNavigationItem p,
.listNavigationItem ul {
margin: 0px;
margin: 0 0 2px 0;
}
.listNavigationItem em {
@ -298,8 +346,12 @@ hr.listSeparator {
.listNavigationItem li {
margin: 3px 0;
font-size: 13px;
}
.listNavigationItem p.imageThumbnail {
margin-top: 8px;
}
/** Table Styles */
.scoreboard {
@ -350,6 +402,86 @@ hr.listSeparator {
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 {
padding-left:15px;

View file

@ -18,7 +18,7 @@ document.writeln('<' + 'scr' + 'ipt type="text/javascript"' +
<div class="form">
<div class="row">
<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 class="row">
@ -107,7 +107,7 @@ referrers.push(new Antville.Referrer("<% param.referrer %>",
<% file.skin File#main %> '<small>'
<% file.created | format short %> '</small>' %> %> else <% param.status %> %></p>
<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 %> %>
</button>
<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">
<% 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 %> %>
</button>
<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>
<td></td>
<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>
</tr>
</table>

View file

@ -39,7 +39,7 @@ prefix="Last update: " default="None so far" %>)</small></li>
<form method="post" action="<% site.href search %>">
<label for="q" class="hidden"><% gettext "Search term" suffix=":" %></label>
<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>
<% #robots %>
@ -62,6 +62,7 @@ Disallow: /stories/top
<!-- 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=Neuton&subset=latin' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" title="CSS Stylesheet" href="<% site.href main.css %>" />
<!--[if IE]>
@ -75,7 +76,7 @@ Disallow: /stories/top
<h1><% site.title | site.link title=<% site.tagline %> %></h1>
</header>
<div id="main">
<div class="wrapper">
<section>
<% response.message prefix='<div class="message">' suffix='</div><br />' %>
<% response.body %>
@ -103,14 +104,14 @@ suffix='</h2><div class="calendarBox">' %> suffix="</div>" %>
<h2><% gettext "Updates" %></h2>
<% list postings skin=Story#history %>
<hr>
<hr class="madeSeparator" />
<ul>
<li><% image /rss.png | site.link rss.xml %></li>
<li><% image /smallchaos.gif | link http://antville.org %></li>
<li><% image /helma.png | link http://helma.org %></li>
</ul>
</nav>
<div class="clearer"></div>
</div>
</body>
</html>
@ -142,6 +143,134 @@ $(document).ready(function() {
<% value "small font color" #959595 %>
<% #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 **/
.hidden {
position: absolute;
@ -149,20 +278,174 @@ $(document).ready(function() {
left: -6000px;
}
.clearer {
clear: both;
}
body {
font-family: 'Droid Sans', arial, serif;
margin: 0px 0px 0px 16px;
padding: 0px;
margin: 0;
padding: 0 0 60px 0;
color: #161616;
}
#main > section {
width: 700px;
.wrapper {
width: 982px;
}
.wrapper > section {
width: 675px;
float: left;
padding: 0 25px 0 30px;
}
.wrapper > nav {
width: 230px;
padding: 0px 0px 0px 20px;
float: left;
}
#main > nav {
float: left;
width: 240px;
padding: 0px 0px 0px 14px;
.wrapper section > p {
margin: 10px 0;
}
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>
<% skin.textarea source class="formWide" wrap="virtual" %>
<p>
<button type="submit" name="save" value="1">
<button type="submit" class="normal small" name="save" value="1">
<% gettext "Save and Edit" %>
</button>
<button type="submit" name="save" value="2">
<button type="submit" class="normal small" name="save" value="2">
<strong><% gettext "Save" %></strong>
</button>
<a href="<% layout.skins.href modified %>"><% gettext Cancel %></a>

View file

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

View file

@ -1,14 +1,10 @@
<% #main %>
<article>
<% story.skin Story#date %>
<% story.skin Story#content %>
<p class="small">
<% story.link comment#form <% gettext Comment context=verb %> %>
<% story.link edit <% gettext Edit %> %>
</p>
<a name="comments" id="comments"></a>
<p><% story.comments %></p>
<p><% story.referrers %></p>
<% story.skin Story#content %>
<footer>
<% story.skin Story#actions %>
<% story.skin Story#comments %>
</footer>
</article>
<% #edit %>
@ -36,9 +32,7 @@
<legend><% gettext Options %></legend>
<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>
</fieldset>
<p>
<% if <% story.creator %> is null then "" else
<% gettext "Created by {0} on {1}" <% story.creator %> <% story.created %> prefix="<p>" suffix="</p>" %>
%>
@ -46,37 +40,46 @@
<% gettext "Last modified by {0} on {1}" <% story.modifier %>
<% story.modified %> prefix="<p>" suffix="</p>" %>
%>
</p>
</fieldset>
<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>
</div>
</div>
</form>
<% #date %>
<% #content %>
<h1><a href="<% story.href %>"><% story.title %></a></h1>
<div class="storyDate">
<% story.creator link suffix=, %>
<time datetime="<% story.created "iso8601w3c" %>"><% story.created "EEEE, d. MMMM yyyy HH:mm" %></time>
</div>
<% #content %>
<h1><% story.title %></h1>
<div><% story.text | story.format %></div>
<div class="storyText"><% story.text | story.format %></div>
<% #preview %>
<article>
<% story.skin Story#date %>
<% story.skin Story#content %>
<p>
<% story.link main <% gettext Link %> %>
<% story.comments link prefix="(" suffix=")" %>
<% story.link comment#form <% gettext Comment context=verb %> %>
<% story.link edit <% gettext Edit %> %>
</p>
<footer>
<% story.skin Story#actions %>
</footer>
</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 %>
<% story.title prefix='<h1 class="storyTitle">'suffix="</h1>" %>
<% story.text | clip %>
@ -88,7 +91,6 @@
</p>
<% #comment %>
<% story.skin Story#date %>
<% story.skin Story#content %>
<% #rss %>

View file

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

View file

@ -94,7 +94,7 @@ $(function() {
</div>
<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>
</div>
</div>