Improved boards display; modern.js implemented

main
Inga 🏳‍🌈 14 years ago
parent 70d1ca4368
commit 936f076f5f
  1. 2
      Builder/IISMainHandler/build.txt
  2. 45
      static/css/modern/global.css
  3. 6
      static/css/modern/iefixes.css
  4. 17
      static/css/modern/penartur.css
  5. 15
      static/js/modern.js
  6. 11
      templates/Modern/Board.xslt
  7. 30
      templates/Modern/Boards.xslt
  8. 130
      templates/Modern/elems/BoardInfo.xslt
  9. 8
      templates/Modern/elems/Main.xslt
  10. 4
      templates/Modern/elems/UserInfoBar.xslt

@ -18,9 +18,8 @@ pre
font-size:10px;
}
[pseudolink] {
[pseudolink], .pseudolink {
cursor:hand;
text-decoration:underline;
}
[spoiler] [inner] {
display:none;
@ -121,3 +120,45 @@ BLOCKQUOTE BR {FONT-SIZE:1px}
.header .header {
font-size:0.8em;
}
ul.categoriescontainer {
padding:0px;
}
li.categorycontainer {
display:inline-block;
vertical-align:top;
margin:5pt;
}
.categorycontainer_title {
display:inline;
font-size:1.2em;
margin:0px;
margin-left:1em;
padding:0.3em;
}
ul.boardscontainer {
padding:0px;
}
li.boardcontainer {
display:inline-block;
width:13em;
vertical-align:top;
font-size:1.25em;
margin:5pt;
}
.boardcontainer_name {
font-size:1.2em;
margin:0px;
}
.board_additionalcontainer {
width:0px;
max-width:0px;
height:0px;
max-height:0px;
overflow:visible;
}
.board_additional {
position:absolute;
padding:5pt;
font-size:0.8em;
width:16.25em;
}

@ -0,0 +1,6 @@
li.categorycontainer {
display:inline;
}
li.boardcontainer {
display:inline;
}

@ -1,5 +1,5 @@
A:link {text-decoration:none;color:#aaaaaa}
A:link, a[pseudolink], a.pseudolink {text-decoration:none;color:#aaaaaa}
A:visited{text-decoration:none;color:#666666}
A:active{text-decoration:none;color:#999999}
A:hover{COLOR:white;text-decoration:none}
@ -25,6 +25,21 @@ blockquote {
.userbar_additional {
background-color:#202020;
}
.categorycontainer_title {
background-color:#101010;
}
.boardscontainer {
background-color:#101010;
}
.boardcontainer {
background-color:#202020;
}
.boardcontainer.updated {
background-color:#208020;
}
.board_additional {
background-color:#302010;
}
.tablesurround{BACKGROUND:#191919;margin-top:-0.1em;margin-bottom:-0.1em}
.tableborders{BACKGROUND:#191919}

@ -0,0 +1,15 @@
function showChildren(elem) {
for(var i=0; i<elem.childNodes.length; i++) {
if(elem.childNodes[i].nodeName == "DIV") {
elem.childNodes[i].style.display="block";
}
}
}
function hideChildren(elem) {
for(var i=0; i<elem.childNodes.length; i++) {
if(elem.childNodes[i].nodeName == "DIV" && elem.childNodes[i].getAttribute("default") != "default") {
elem.childNodes[i].style.display="none";
}
}
}

@ -10,16 +10,9 @@
<xsl:template name="isRssEnabled">true</xsl:template>
<xsl:template name="specific">
<xsl:if test="boards/board">
<table width="95%" align="center" class="tableborders" border="1">
<tr>
<td class="tdheader" colspan="2" width="61%">Ïîäðàçäåëû</td>
<td class="tdheader" align="center" width="7%">Òåìû</td>
<td class="tdheader" align="center" width="7%">Ñîîáùåíèé</td>
<td class="tdheader" align="center" width="15%">Ïîñëåäíåå</td>
<td class="tdheader" align="center" width="10%">Ìîäåðàòîð</td>
</tr>
<ul class="boardscontainer">
<xsl:apply-templates select="boards/board"/>
</table>
</ul>
<br/>
</xsl:if>
<table width="95%" align="center" class="tablesurround">

@ -5,13 +5,9 @@
<xsl:template name="specificTitle">Đŕçäĺëű</xsl:template>
<xsl:template name="isLiteEnabled">true</xsl:template>
<xsl:template name="specific">
<table width="95%" align="center" class="tablesurround" cellspacing="1" cellpadding="1">
<tr>
<td>
<xsl:apply-templates select="categories/category"/>
</td>
</tr>
</table>
<ul class="categoriescontainer">
<xsl:apply-templates select="categories/category"/>
</ul>
<br />
<table width="95%" align="center" class="tablesurround" cellpadding="1" cellspacing="1">
<tr>
@ -95,16 +91,16 @@
</xsl:template>
<xsl:template match="category">
<table width="100%" align="center" class="tableborders" cellpadding="3" cellspacing="1">
<tr>
<td class="tdheader" colspan="2" width="61%"><xsl:value-of select="name"/></td>
<td class="tdheader" align="center" width="7%">Òåìû</td>
<td class="tdheader" align="center" width="7%">Ñîîáùåíèé</td>
<td class="tdheader" align="center" width="15%">Ïîñëåäíåå</td>
<td class="tdheader" align="center" width="10%">Ìîäåðàòîð</td>
</tr>
<xsl:apply-templates select="boards/board"/>
</table>
<li class="categorycontainer">
<h2 class="categorycontainer_title"><xsl:value-of select="name"/></h2>
<ul class="boardscontainer">
<xsl:apply-templates select="boards/board">
<xsl:with-param name="maxPerLine">
<xsl:value-of select="ceiling(count(boards/board) div 2)"/>
</xsl:with-param>
</xsl:apply-templates>
</ul>
</li>
</xsl:template>
</xsl:stylesheet>

@ -2,73 +2,93 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:template match="board">
<tr>
<td width="4%" class="darktable" align="center" valign="middle">
<a>
<xsl:attribute name="onClick">if(!confirm('Ïîìåòèòü âñå ñîîáùåíèÿ êàê ïðî÷èòàííûå?')) {event.returnValue=false; return false;} else { alert("Not implemented yet"); }</xsl:attribute>
<xsl:choose>
<xsl:when test="(hasNewPosts='true') and not(lastPostInfo/post/poster/user/id = /root/session/user/id)">
<img border="0" width="17" height="21" src="/static/images/newposts.gif" alt=""/>
</xsl:when>
<xsl:otherwise>
<img border="0" width="17" height="21" src="/static/images/nonewposts.gif" alt=""/>
</xsl:otherwise>
</xsl:choose>
</a>
</td>
<td width="57%" class="darktable">
<font class="forumtitle">
<a>
<xsl:attribute name="href">/Board/<xsl:value-of select="id"/>/</xsl:attribute>
<xsl:value-of select="name"/>
</a>
</font>
<br />
<xsl:if test="(description != '') or (subBoards/board)">
<table cellpadding="0" cellspacing="0">
<xsl:if test="description != ''">
<tr>
<td class="forumdescript"><xsl:value-of select="description"/></td>
</tr>
</xsl:if>
<xsl:if test="subBoards/board">
<tr>
<td class="forumdescript" style="padding-top:0.3em">
<xsl:apply-templates select="subBoards/board"/>
</td>
</tr>
</xsl:if>
</table>
<xsl:param name="maxPerLine">100</xsl:param>
<xsl:if test="((position() mod $maxPerLine) = 1) and (position() != 1)">
<br/>
</xsl:if>
<li>
<xsl:attribute name="class">
<xsl:text>boardcontainer</xsl:text>
<xsl:if test="(hasNewPosts='true') and not(lastPostInfo/post/poster/user/id = /root/session/user/id)">
<xsl:text> updated</xsl:text>
</xsl:if>
</td>
<td width="7%" align="center" class="threadtotal" nowrap="nowrap"><xsl:value-of select="totalThreads"/></td>
<td width="7%" align="center" class="posttotal" nowrap="nowrap"><xsl:value-of select="totalPosts"/></td>
<td width="15%" nowrap="nowrap" class="posttime">
<xsl:apply-templates select="lastPostInfo"/>
</td>
<td width="10%" class="modcolumn" align="center">
<xsl:apply-templates select="administrator/user | moderators/user" mode="userLink"/>
</td>
</tr>
</xsl:attribute>
<a>
<xsl:attribute name="href">/Forum/Board/<xsl:value-of select="id"/>/Threads/</xsl:attribute>
<h3 class="boardcontainer_name">
<xsl:value-of select="name"/>
</h3>
<xsl:if test="description != ''">
<p class="boardcontainer_description">
<xsl:attribute name="href">/Forum/Board/<xsl:value-of select="id"/>/Threads/</xsl:attribute>
<xsl:value-of select="description"/>
</p>
</xsl:if>
</a>
<p>Òåì: <xsl:value-of select="totalThreads"/></p>
<p>Ñîîáùåíèé: <xsl:value-of select="totalPosts"/></p>
<xsl:if test="subBoards/board">
<div style="float:left">
<xsl:attribute name="onMouseOver">showChildren(this);</xsl:attribute>
<xsl:attribute name="onMouseOut">hideChildren(this);</xsl:attribute>
<div default="default">
<a class="pseudolink">Ïîäðàçäåëû</a>
</div>
<div class="board_additionalcontainer" style="display:none">
<div class="board_additional">
<p>
<xsl:apply-templates select="subBoards/board"/>
</p>
</div>
</div>
</div>
</xsl:if>
<div style="float:right;">
<xsl:attribute name="onMouseOver">showChildren(this);</xsl:attribute>
<xsl:attribute name="onMouseOut">hideChildren(this);</xsl:attribute>
<div default="default">
<a class="pseudolink">Èíôîðìàöèÿ</a>
</div>
<div class="board_additionalcontainer" style="display:none;">
<div class="board_additional">
<xsl:apply-templates select="lastPostInfo"/>
<p>
<xsl:text>Ìîäåðàòîðû:</xsl:text>
<br/>
<xsl:apply-templates select="administrator/user | moderators/user" mode="userLink"/>
</p>
</div>
</div>
</div>
</li>
</xsl:template>
<xsl:template match="lastPostInfo">
<xsl:if test="post">
<xsl:apply-templates select="post/postDate/date" mode="dateTime"/><br />
<a>
<xsl:attribute name="href">/Thread/<xsl:value-of select="post/threadId"/>/p<xsl:value-of select="post/id"/>/</xsl:attribute>
<xsl:text>îò </xsl:text>
<xsl:value-of select="post/poster/user/name"/>
</a>
<p>
<xsl:text>Ïîñëåäíåå ñîîáùåíèå:</xsl:text>
<br/>
<a>
<xsl:attribute name="href">/Thread/<xsl:value-of select="post/threadId"/>/p<xsl:value-of select="post/id"/>/</xsl:attribute>
<xsl:apply-templates select="post/postDate/date" mode="dateTime"/>
<xsl:text> îò </xsl:text>
<xsl:value-of select="post/poster/user/name"/>
</a>
</p>
</xsl:if>
</xsl:template>
<xsl:template match="subBoards/board">
<xsl:text> [</xsl:text>
<xsl:if test="position() &gt; 1">
<hr/>
</xsl:if>
<a>
<xsl:attribute name="href">/Board/<xsl:value-of select="id"/>/</xsl:attribute>
<xsl:value-of select="name"/>
<xsl:if test="description != ''">
<br/>
<xsl:value-of select="description"/>
</xsl:if>
</a>
<xsl:text>]</xsl:text>
</xsl:template>
</xsl:stylesheet>

@ -5,12 +5,16 @@
<xsl:template match="/root">
<html>
<head>
<link rel="stylesheet" href="/static/css/modern/global.css?v1" type="text/css" />
<link rel="stylesheet" href="/static/css/modern/global.css?v3" type="text/css" />
<xsl:comment>[if lte IE 7]&gt;<![CDATA[
<link rel="stylesheet" href="/static/css/modern/iefixes.css?v3" type="text/css" />
]]>&lt;![endif]</xsl:comment>
<link rel="stylesheet" type="text/css" skin="skin">
<xsl:attribute name="href">/static/css/modern/penartur.css?v1</xsl:attribute>
<xsl:attribute name="href">/static/css/modern/penartur.css?v3</xsl:attribute>
</link>
<link rel="shortcut icon" href="/static/favicons/smirk.ico" type="image/x-icon" />
<script language="Javascript" type="text/javascript" src="/static/js/common.js"><xsl:text> </xsl:text></script>
<script language="Javascript" type="text/javascript" src="/static/js/modern.js"><xsl:text> </xsl:text></script>
<script language="Javascript" type="text/javascript" src="/static/js/machichara/complex.js?v1"><xsl:text> </xsl:text></script>
<script language="Javascript" type="text/javascript" src="/static/js/machichara/simple.js?v1"><xsl:text> </xsl:text></script>
<script language="Javascript" type="text/javascript" src="/static/js/machichara/simple.js?v1">

@ -3,8 +3,8 @@
<xsl:template match="user" mode="userInfoBar">
<div class="userbar">
<xsl:attribute name="onMouseOver">for(var i=0;i&lt;this.childNodes.length;i++) if(this.childNodes[i].nodeName == "DIV") this.childNodes[i].style.display="block";</xsl:attribute>
<xsl:attribute name="onMouseOut">for(var i=0;i&lt;this.childNodes.length;i++) if(this.childNodes[i].nodeName == "DIV" &amp;&amp; this.childNodes[i].getAttribute("default") != "default") this.childNodes[i].style.display="none";</xsl:attribute>
<xsl:attribute name="onMouseOver">showChildren(this);</xsl:attribute>
<xsl:attribute name="onMouseOut">hideChildren(this);</xsl:attribute>
<div class="userbar_avatar" default="default">
<a>
<xsl:attribute name="href">/Users/User/<xsl:value-of select="id"/>/Info/</xsl:attribute>

Loading…
Cancel
Save