antville/code/Site/Site.skin

768 lines
19 KiB
Text
Raw Normal View History

<% #href %>
http://<% site.name %>.antville.org<% param.path %>
<% #main %>
<% site.stories %>
<% #edit %>
<form id="prefs" method="post" action="<% response.action %>">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="2">
<strong><a name="general"><% gettext General %></a></strong>
</td>
</tr>
<tr>
<td class="small"><% gettext Mode suffix=: %></td>
<td><% site.select mode %></td>
</tr>
<tr>
<td class="small"><% gettext Title suffix=: %></td>
<td><% site.input title %></td>
</tr>
<tr>
<td class="small"><% gettext Tagline suffix=: %></td>
<td><% site.input tagline %></td>
</tr>
<tr>
<td class="small"><% gettext Paging suffix=: %></td>
<td><% site.input pageSize size="5" maxlength="2" %>
<% site.select pageMode %> per page</td>
</tr>
<tr>
<td class="small"><% gettext Comments suffix=: %></td>
<td><% site.checkbox commentMode %>
<label for="commentMode"><% gettext enabled %></label></td>
</tr>
<tr>
<td class="small"><% gettext Archive suffix=: %></td>
<td><% site.checkbox archiveMode %>
<label for="archiveMode"><% gettext enabled %></label></td>
</tr>
<tr>
<td class="small"><% gettext Language suffix=: %></td>
<td><% site.select locale %></td>
</tr>
<tr>
<td class="small"><% gettext "Time zone" suffix=: %></td>
<td><% site.select timeZone %></td>
</tr>
<tr>
<td class="small"><% gettext "Long date format" suffix=: %></td>
<td><% site.select longDateFormat %></td>
</tr>
<tr>
<td class="small"><% gettext "Short date format" suffix=: %></td>
<td><% site.select shortDateFormat %></td>
</tr>
<tr>
<td class="small"><% gettext Notifications suffix=: %></td>
<td><% site.select notificationMode %></td>
</td>
</tr>
<tr>
<td class="small" valign="top"><% gettext "Web hook" suffix=: %></td>
<td><% site.input webHookUrl %><br />
<% site.checkbox webHookMode %>
<label for="webHookMode"><% gettext enabled %><label></td>
</tr>
<!--tr>
<td colspan="2"><div class="listSeparator">&nbsp;</div>
<strong><a name="spamfilter">Referrer spam filter</a></strong></td>
</tr>
<tr>
<td class="small" valign="top">Enter one
<a href="http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/regexp.html">filter pattern</a>
per line to be applied on every URL in the referrer and backlink lists.</td>
<td valign="top"><% site.textarea spamfilter cols="30" rows="7" %></td>
</tr-->
<tr>
<td></td>
<td><br />
<button type="submit" name="save" value="1"><% gettext Save %></button>
<a href="" class="cancel"><% gettext Cancel %></a>
</tr>
</table>
</form>
<% #preview %>
<li><% site.title | site.link %>
<span class="small"><% site.modified | age %></span></li>
<% #navigation %>
<% site.link . <% gettext Home %> prefix="... " suffix="<br />" %>
<% site.tags.link prefix="... " suffix="<br />" %>
<% site.galleries.link prefix="... " suffix="<br />" %>
<br />
<% site.stories.link create <% gettext "Add story" %> prefix="... " suffix="<br />" %>
<% site.stories.link prefix="... " suffix="<br />" %>
<% site.images.link prefix="... " suffix="<br />" %>
<% site.files.link prefix="... " suffix="<br />" %>
<% site.polls.link prefix="... " suffix="<br />" %>
<% site.members.link prefix="... " suffix="<br />" %>
<br />
<% site.link edit <% gettext Preferences %> prefix="... " suffix="<br />" %>
<% layout.link . <% gettext Layout %> prefix="... " suffix="<br />" %>
<% layout.skins.link prefix="... " suffix="<br />" %>
<% site.link referrers prefix="... " suffix="<br />" %>
<% site.stories.link top <% gettext "Top stories" %> prefix="... " suffix="<br />" %>
<br />
<% root.title prefix="... " | root.link %>
<% #create %>
<% gettext "To create a new site you need to fill out the form below." %>
<p><% gettext 'The name will be part of the URL of your site. E.g. if you
enter ”{0}“ as the name, your site will be reachable via the url {1}'
foo <% root.href prefix=<code> suffix=foo</code> %> %></p>
<p><% gettext "Please note that you cannot change the name after the site was
created." %></p>
<p><% gettext "The title will appear in the header of every page of your site.
You can change it anytime you want." %></p>
<p>
<form method="post" action="<% response.action %>">
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="small"><% gettext Name suffix=: %></td>
<td><% site.input name %></td>
</tr>
<tr>
<td class="small"><% gettext Title suffix=: %></td>
<td><% site.input title %></td>
</tr>
<tr>
<td></td>
<td>
<br />
<button type="submit" name="create" value="1"><% gettext Create %></button>
<a href="" class="cancel"><% gettext Cancel %></a>
</td>
</tr>
</table>
</form>
</p>
<% #welcome %>
<p class="storyTitle"><% gettext "Welcome to {0}." <% site.title %> %></p>
<p><% gettext "This site was created by {0} on {1}." <% site.creator link %>
<% site.created long %> %></p>
<% #search %>
<form method="post" action="<% site.href search %>">
<input type="text" name="q" class="searchbox"
value="<% request.q encoding="form" %>" />
<button type="submit" name="search" value="1"
class="searchbox">search</button>
</form>
<% #robots %>
User-agent: *
Disallow: /referrers
Disallow: /stories/top
<% #menuExt %>
<script type="text/javascript" defer="defer">
<!--
var win = external.menuArguments;
var url = "<% site.url %>stories/create?content_text=";
var link = escape('<a href="' + win.location.href + '">' +
win.document.title + "</a>: ");
var text = escape(win.document.selection.createRange().text);
win.location.href = url + link + text;
//-->
</script>
<% #menuExtRegistry %>
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Post to <% site.title %>]
@="<% site.url %>menuext"
"contexts"=hex:31
<% #referrers %>
<form action="<% response.action %>" method="get">
<input type="text" name="filter" value="<% request.filter encoding="form" %>"
size="30" />
<input type="submit" name="submit" value="Filter" />
<input type="button" onclick="document.location='<% site.href
action="referrers" %>';" value="Reset" />
<div class="small">
<input type="checkbox" name="includeSpam" value="checked"
<% request.includeSpam prefix='checked="' suffix='"' encoding="form" %> />
include referrer spam
</div>
<br />
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="right" class="small">Visits</td>
<td width="10" nowrap="nowrap" rowspan="999"> </td>
<td></td>
<td class="small">Referrer</td>
</tr>
<script type="text/javascript"><!--
var referrers = [];
<% site.referrers %>
var query = new Antville.Query();
var spamFilter = new Antville.Filter([<% site.spamfilter %>]);
var searchFilter = new Antville.Filter(query.filter);
var searchEngineFilters = [
new Antville.Filter("http:\/\/.*google.*\?", "q"),
new Antville.Filter("http:\/\/.*search\.msn.*\?", "q"),
new Antville.Filter("http:\/\/.*altavista.*\?", "q"),
new Antville.Filter("http:\/\/.*search\.yahoo.*\?", "p"),
]
for (var i in referrers) {
var ref = referrers[i];
var text = ref.text;
var isSpam = spamFilter.test(ref.url);
if (isSpam && !query.includeSpam)
continue;
if (query.filter && !searchFilter.test(ref.url))
continue;
var done = false;
for (var e in searchEngineFilters) {
var filter = searchEngineFilters[e];
if (!done && filter.test(ref.url)) {
text = ref.compose(filter.key, "<em>Search request:</em> ");
done = true;
}
}
document.writeln('<tr>');
document.writeln('<td align="right" valign="top">', ref.count, '</td>');
document.writeln('<td valign="top"><% site.switch name="userMayEdit" on="<input type=\"checkbox\" name=\"permanent\" value=\"', ref.url, '\" />" off="" %></td>');
document.writeln('<td><a href="', ref.url, '"',
(isSpam ? ' style="color: <% layout.smallcolor %>;"' : ''),
'>', text, '</a></td>');
document.writeln('</tr>');
}
// --></script>
<noscript>
<tr>
<td colspan="3">
<% skite.skin noscript %>
</td>
</tr>
</noscript>
</table>
</form>
<% #noscript %>
<% gettext "To prevent spam abuse referrers and backlinks are displayed
using client-side JavaScript code. Thus, you should enable the option to
execute JavaScript code in your browser. Otherwise you will only see this
information." %>
<% #referrer %>
referrers.push(new Antville.Referrer("<% param.referrer %>",
"<% param.text %>", <% param.requests %>));
<% #values %>
<% value "background color" #ffffff %>
<% value "link color" #ff4040 %>
<% value "active link color" #ff4040 %>
<% value "visited link color" #ff4040 %>
<% value "big font" "Verdana, Helvetica, Arial, sans-serif" %>
<% value "big font size" 15px %>
<% value "big font color" #d50000 %>
<% value "base font" "Verdana, Helvetica, Arial, sans-serif" %>
<% value "base font size" 13px %>
<% value "base font color" #000000 %>
<% value "small font" "Verdana, Arial, Helvetica, sans-serif" %>
<% value "small font size" 11px %>
<% value "small font color" #959595 %>
<% #javascript %>
var imgWindow = "";
function openPopup(img, width, height) {
if (img && width && height) {
width = Math.min(width + 36, 640);
height = Math.min(height + 30, 480);
if (imgWindow.location && !imgWindow.closed)
imgWindow.close();
imgWindow = window.open(img, "imgWindow" + width + height,
"toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=" +
width + ",height=" + height);
// imgWindow.focus();
}
}
<% #page %>
<?xml version="1.0" encoding="UTF-8"?>
<!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" xml:lang="en" >
<head>
<title><% response.title %></title>
<meta http-equiv="Content-Type" content="text/html" />
<meta name="MSSmartTagsPreventParsing" content="TRUE" />
<!--script type="text/javascript" src="<% file /jquery-1.2.1.min.js url %>"></script-->
<script type="text/javascript" src="<% site.href main.js %>"></script>
<link rel="stylesheet" type="text/css" title="CSS Stylesheet" href="<% site.href main.css %>" />
<link rel="alternate" type="application/rss+xml" title="Stories and comments of <% site.title %>" href="<% site.href rss.xml %>" />
<link rel="alternate" type="application/rss+xml" title="Stories of <% site.title %>" href="<% site.href stories.xml %>" />
<link rel="alternate" type="application/rss+xml" title="Comments of <% site.title %>" href="<% site.href comments.xml %>" />
<link rel="alternate" type="application/rss+xml" title="Site updates of <% root.title %>" href="<% root.href updates.xml %>" />
<!-- link rel="search" type="application/opensearchdescription+xml" href="<% site.href search.xml %>" title="Antville Search" -->
<!-- Testing ColourMod plugin for jQuery -->
<link href="<% file /ColourModStyle.css url %>" rel="stylesheet" type="text/css" />
<script src="<% file /StyleModScript.js url %>" type="text/javascript"></script>
<script src="<% file /ColourModScript.js url %>" type="text/javascript"></script>
</head>
<body>
<table class="main" cellspacing="0" cellpadding="0">
<tr>
<td class="header">
<% site.title | site.link title=<% site.tagline %> %>
</td>
</tr>
</table>
<table class="main">
<tr>
<td class="center">
<% response.message prefix='<div class="message">' suffix='</div><br />' %>
<% response.body %>
</td>
<td class="right">
<div class="box">
<% site.age prefix="Online for " suffix=" days<br />" %>
<% site.modified short prefix="Last modified: " %>
</div>
<div class="boxheader"><% gettext Status %></div>
<div class="box"><% membership.status %></div>
<% root.admin.skin Admin#navigation %>
<div class="boxheader"><% gettext Menu %></div>
<div class="box">
<% site.skin Site#navigation %>
</div>
<div class="boxheader"><% gettext Search %></div>
<div class="box"><% site.skin Site#search %></div>
<% site.calendar prefix=<% gettext Calendar prefix='<div class="boxheader">'
suffix='</div><div class="box">' %> suffix="</div>" %>
<div class="boxheader"><% gettext "Recent updates" %></div>
<div class="box"><% list postings skin=Story#history %></div>
<div class="boxline"></div><br />
<div class="box"><% image /rss.png | site.link rss.xml %><br />
<br />
<% image /smallchaos.gif | link http://antville.org %><br />
<% image /hop.gif | link http://helma.org %></div>
</td>
</tr>
</table>
</body>
</html>
<% #stylesheet %>
table.main {
width: 700px;
}
td.header {
height: 53px;
padding-left: 40px;
font-weight: bold;
}
td.center {
width: 70%;
padding: 25px 20px 10px 40px;
vertical-align: top;
}
td.right {
width: 30%;
padding: 0px 0px 10px 0px;
vertical-align: top;
border-left: 1px solid #dddddd;
}
body {
background-color: <% value "background color" %>;
font-family: <% value "base font" %>;
font-size: <% value "base font size" %>;
color: <% value "base font color" %>;
}
td {
font-size: <% value "base font size" %>;
line-height: 1.2em;
}
td.header {
background-image: url(<% image /webloghead.gif url %>);
font-size: 25px;
font-weight: bold;
}
div.boxheader {
color: <% value "small font color" %>;
overflow: hidden;
font-size: 10px;
padding-left: 6px;
border-top: 1px solid #dddddd;
}
div.boxline {
height:1px;
overflow:hidden;
border-bottom: 1px solid #dddddd;
}
div.box {
font-size: <% value "small font size" %>;
font-family: <% value "small font" %>;
color: <% value "small font color" %>;
line-height: 1.4em;
text-align: right;
padding: 0em 0em 0.4em 0.4em;
margin: 0em 0em 0.2em 0em;
}
div.ample { margin-bottom: 5px; }
small, .small {
font-family: <% value "small font" %>;
font-size: <% value "small font size" %>;
color: <% value "small font color" %>;
}
/* this is for mozilla to right-align tables in boxes */
div.box table {
margin-left: auto;
margin-right: 0px;
}
fieldset {
padding-left: 8px;
padding-top: 0px;
margin-top: 6px;
margin-bottom: 6px;
}
p {
margin-top: 6px;
margin-bottom: 10px;
}
form { margin: 0px; }
a {text-decoration: none;}
a:link {color: <% value "link color" %>;}
a:visited {color: <% value "visited link color" %>;}
a:active {color: <% value "active link color" %>;}
a:hover {text-decoration: underline;}
.message {
font-family: <% value "small font" %>;
font-size: <% value "small font size" %>;
font-weight: bold;
padding: 1px;
margin-top: 6px;
margin-bottom: 6px;
color: <% value "big font color" %>;
}
.message input {
font-size:9px;
padding:0px;
margin:0px;
}
.historyItem {
color: <% value "base font color" %>;
font-family: <% value "small font" %>;
font-size: <% value "small font size" %>;
padding-bottom: 0.3em;
width: 202px;
overflow: hidden;
}
.dayHeader {
font-family: <% value "small font size" %>;
font-size: <% value "small font size" %>;
color: <% value "small font color" %>;
font-weight: bold;
margin-bottom: 20px;
margin-top: 10px;
text-align: left;
}
.storyDate {
font-family: <% value "small font" %>;
font-size: <% value "small font size" %>;
color: <% value "small font color" %>;
margin-bottom: 6px;
}
.storyTitle {
font-family: <% value "big font" %>;
font-size: <% value "big font size" %>;
color: <% value "big font color" %>;
font-weight: bold;
}
.listSeparator {
width: 50px;
height: 1em;
border-bottom: 2px dotted #dddddd;
margin-top: 10px;
margin-bottom: 4px;
}
.title {
font-family: <% value "big font" %>;
font-size: <% value "big font size" %>;
color: <% value "base font color" %>;
font-weight: bold;
margin-bottom: 2px;
}
.reply { padding-left: 40px; }
.formTitle {
width: 380px;
font-family: <% value "base font size" %>;
font-size: <% value "big font size" %>;
font-weight: bold;
border: 1px solid <% value "base font color" %>;
}
.formText {
width: 380px;
font-family: <% value "base font size" %>;
font-size: <% value "base font size" %>;
font-weight: normal;
border: 1px solid <% value "base font color" %>;
}
.formWide {
width: 660px;
font-family: <% value "base font size" %>;
font-size: <% value "base font size" %>;
font-weight: normal;
}
.listFlag {
background-color: #cccccc;
padding: 1px;
font-family: <% value "small font" %>;
font-size: <% value "small font size" %>;
color: <% value "base font color" %>;
}
.pollResultsBar {
height: 5px;
overflow: hidden;
float:left;
margin-top: 7px;
margin-right: 10px;
background-color: <% value "link color" %>;
font-size: 0px;
}
.searchbox {
font-size: 11px;
margin-top: 3px;
}
.colorpickerWidget {
border: 1px solid #cccccc;
}
.pagelinkTop {
margin-bottom: 18px;
padding-bottom:3px;
border-bottom:1px solid #dddddd;
}
.pagelinkBottom {
margin-top: 18px;
padding-top:3px;
border-top:1px solid #dddddd;
text-align:right;
}
div.pageNav {
margin-top: 10px;
margin-bottom: 0px;
font-size: 11px;
}
div.pageNavSummary {
padding: 1px 5px;
background-color: #efefef;
border-bottom: 1px solid #cccccc;
text-align: left;
}
div.pageNavBar {
padding-top: 1px;
text-align: right;
}
span.pageNavItem {
padding-left: 2px;
padding-right: 2px;
}
span.pageNavSelItem {
padding-left: 2px;
padding-right: 2px;
font-weight: bold;
}
ul { list-style: url(<% image /bullet.gif url %>) circle; }
ul.skinmgrTree {
padding-left:15px;
margin:20px 0px;
}
ul.skinmgrTree ul {
padding-left:30px;
margin:0px;
}
ul.skinmgrTree li {
list-style:none;
margin:7px 0px;
padding:0px;
}
ul.skinmgrTree li.skinset {
list-style:square;
padding-left:0px;
}
ul.skinmgrTree a.selected {
font-weight:bold;
}
ul.skinmgrTree li div {
font-family:<% value "base font size" %>;
font-size:<% value "small font size" %>;
color:<% value "base font color" %>;
}
.membergroup {
font-weight:bold;
font-size:<% value "big font size" %>;
margin:10px 0px;
}
.member {
margin-left:20px;
margin-bottom:5px;
}
.calendar {
text-align: center;
color: <% value "small font color" %>;
font-family: <% value "small font" %>;
font-size: <% value "small font size" %>;
}
.calendar tbody td, .calendar tfoot td {
font-size: <% value "small font size" %>;
}
.calendar tbody th {
font-weight: normal;
}
.calendar .day {
width: 14.27%;
text-align: center;
}
.calendar .left {
text-align: center;
vertical-align: baseline;
}
.calendar .right {
border: 0;
text-align: center;
vertical-align: baseline;
}
.calendar .selected {
border: 1px solid <% value "link color" %>;
}
/* Admin styles */
.pageTitle {
font-family:<% value "big font" %>;
font-size:<% value "big font size" %>;
font-weight:bold;
color:<% value "big font color" %>;
padding-bottom:10pt;
}
.label {
font-family: <% value "small font" %>;
font-size: 7pt;
padding: 2px;
color: #ffffff;
text-transform: uppercase;
}
.regular {
display: none;
}
.blocked {
background-color: #000000;
}
.trusted, .User {
background-color: #0000cc;
}
.closed {
background-color: #cc0000;
}
.public, .Site {
background-color: #006600;
}
.Root, .privileged {
background-color: #ffcc00;
}
.flagLight {
font-family:<% value "small font" %>;
font-size:7pt;
padding:2px;
color:#333333;
}
.sysmgrListitem {
margin-top:15px;
border-top:1px solid #dddddd;
}
div.skin {
/*margin: 1px;
border: 1px solid gray;*/
}
div.skin div.title {
display: none;
padding: 2px;
color: gray;
font: normal 8px verdana, sans-serif;
}