changeset 778:cd73f6e9aaf3

Donation page refactored: multi-column layout, donated sums ranges.
author Maxim Konovalov <maxim@nginx.com>
date Mon, 10 Dec 2012 10:45:23 +0000
parents 284dc43b13d3
children 32b8498cfb40
files dtd/content.dtd xml/en/donation.xml xsls/content.xsls xsls/style.xsls xslt/content.xslt xslt/style.xslt
diffstat 6 files changed, 115 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/dtd/content.dtd	Thu Dec 06 16:06:47 2012 +0000
+++ b/dtd/content.dtd	Mon Dec 10 10:45:23 2012 +0000
@@ -4,7 +4,7 @@
   -->
 
 <!ELEMENT  section      (para | list | book | download | security | note |
-                         programlisting | section)* >
+                         programlisting | table | section)* >
 <!ATTLIST  section
            id           ID #IMPLIED
            name         CDATA #IMPLIED
@@ -67,9 +67,10 @@
 <!ATTLIST  table
            note         CDATA #IMPLIED
            width        CDATA #IMPLIED
+           class        CDATA #IMPLIED
 >
 <!ELEMENT  tr           (td+) >
-<!ELEMENT  td           (#PCDATA | literal | i | link)* >
+<!ELEMENT  td           (#PCDATA | br | literal | b | i | link | list)* >
 <!ATTLIST  td
            width        CDATA #IMPLIED
 >
--- a/xml/en/donation.xml	Thu Dec 06 16:06:47 2012 +0000
+++ b/xml/en/donation.xml	Mon Dec 10 10:45:23 2012 +0000
@@ -30,6 +30,28 @@
 
 <section name="Donors list">
 
+<table class="donors">
+
+<tr>
+
+<td width="50%">
+
+<b>2012</b>
+<br/>
+<br/>
+
+<b>$1000+</b>
+
+<list type="bullet">
+
+<listitem>
+Sergey Korowkin
+</listitem>
+
+</list>
+
+<b>$500-999</b>
+
 <list type="bullet">
 
 <listitem>
@@ -37,6 +59,56 @@
 </listitem>
 
 <listitem>
+RedAccenir PortalProgramas
+</listitem>
+
+</list>
+
+<b>$100-499</b>
+
+<list type="bullet">
+
+<listitem>
+Kirill Filchenkov
+</listitem>
+
+<listitem>
+Jose Goncalo Peres
+</listitem>
+
+<listitem>
+Michel Machado
+</listitem>
+
+<listitem>
+PSW GROUP, http://www.psw.net
+</listitem>
+
+</list>
+
+<b>$50-99</b>
+
+<list type="bullet">
+
+<listitem>
+Dmitriy Zimin
+</listitem>
+
+<listitem>
+Vladimir Manov
+</listitem>
+
+<listitem>
+Nikita Kuznetsov
+</listitem>
+
+</list>
+
+<b>$0.01-49</b>
+
+<list type="bullet">
+
+<listitem>
 Rudy Rogers
 </listitem>
 
@@ -61,14 +133,6 @@
 </listitem>
 
 <listitem>
-PSW GROUP, http://www.psw.net
-</listitem>
-
-<listitem>
-Michel Machado
-</listitem>
-
-<listitem>
 Sergey Yarkin
 </listitem>
 
@@ -77,10 +141,6 @@
 </listitem>
 
 <listitem>
-Sergey Korowkin
-</listitem>
-
-<listitem>
 Valentin Sushkov
 </listitem>
 
@@ -97,18 +157,10 @@
 </listitem>
 
 <listitem>
-Jose Goncalo Peres
-</listitem>
-
-<listitem>
 Will Mitayai Keeso Rowe
 </listitem>
 
 <listitem>
-Vladimir Manov
-</listitem>
-
-<listitem>
 Dmitry Zhitomirskiy
 </listitem>
 
@@ -141,10 +193,6 @@
 </listitem>
 
 <listitem>
-Kirill Filchenkov
-</listitem>
-
-<listitem>
 Dmitry Paskal
 </listitem>
 
@@ -153,18 +201,10 @@
 </listitem>
 
 <listitem>
-RedAccenir PortalProgramas
-</listitem>
-
-<listitem>
 Konstantin Kondakov
 </listitem>
 
 <listitem>
-Dmitriy Zimin
-</listitem>
-
-<listitem>
 Igor Gusarov
 </listitem>
 
@@ -184,6 +224,17 @@
 Svyatoslav Lempert
 </listitem>
 
+</list>
+</td>
+
+<td>
+
+<b>2004 - 2011</b>
+<br/>
+<br/>
+
+<list type="bullet">
+
 <listitem>
 MaxTorg.RU
 </listitem>
@@ -855,8 +906,13 @@
 <listitem>
 Andrei Nigmatulin
 </listitem>
+</list>
 
-</list>
+</td>
+
+</tr>
+
+</table>
 
 </section>
 
--- a/xsls/content.xsls	Thu Dec 06 16:06:47 2012 +0000
+++ b/xsls/content.xsls	Mon Dec 10 10:45:23 2012 +0000
@@ -122,7 +122,15 @@
     X:template = "table[not(@note) and @width]" {
         <table width="{@width}"> !!; </table>
     }
-    X:template = "table" { <table width="100%"> !!; </table> }
+    X:template = "table" {
+        <table width="100%">
+        X:if "@class" {
+            X:attribute "class" { !{@class} }
+        }
+        !!;
+        </table>
+    }
+
     X:template = "tr" { <tr> !!; </tr> }
     X:template = "td[@width]" { <td width="{@width}"> !!; </td> }
     X:template = "td" { <td> !!; </td> }
--- a/xsls/style.xsls	Thu Dec 06 16:06:47 2012 +0000
+++ b/xsls/style.xsls	Mon Dec 10 10:45:23 2012 +0000
@@ -15,6 +15,8 @@
         table.news .date  { text-align:     right;
                             padding-right:  0.5em;
                             white-space:    nowrap; }
+        table.donors td   { vertical-align: baseline; }
+        table.donors li   { text-align:     left; }
         div.directive     { background:     #EEEEEE;
                             padding:        10pt 10pt 10pt 0; }
         div.directive td  { vertical-align: baseline; }
--- a/xslt/content.xslt	Thu Dec 06 16:06:47 2012 +0000
+++ b/xslt/content.xslt	Mon Dec 10 10:45:23 2012 +0000
@@ -293,9 +293,19 @@
       </table>
    </xsl:template>
 
-   <xsl:template match="table"> 
+   <xsl:template match="table">
+
       <table width="100%">
+
+         <xsl:if test="@class">
+
+            <xsl:attribute name="class">
+               <xsl:value-of select="@class"/>
+            </xsl:attribute>
+         </xsl:if>
+
          <xsl:apply-templates/>
+
       </table>
    </xsl:template>
 
--- a/xslt/style.xslt	Thu Dec 06 16:06:47 2012 +0000
+++ b/xslt/style.xslt	Mon Dec 10 10:45:23 2012 +0000
@@ -5,7 +5,7 @@
       <xsl:param name="lang"/>
 
       <style type="text/css">
-         <xsl:value-of select=" normalize-space('         body              { font-family:    Georgia, serif; }         p                 { text-align:     justify; }         table.news p      { margin-top:     0; }         table.news td     { vertical-align: baseline; }         table.news .date  { text-align:     right;                             padding-right:  0.5em;                             white-space:    nowrap; }         div.directive     { background:     #EEEEEE;                             padding:        10pt 10pt 10pt 0; }         div.directive td  { vertical-align: baseline; }         div.directive pre { padding:        0;                             margin:         0; }         div.directive p   { margin:         5pt 0 0 0;                             font-size:      80%; }         div#banner        { background:     #EEEEEE;                             padding:        10pt 10pt 10pt 0; }         a.notrans         { color:          gray;                             text-decoration:none; }         span.initial      { font-size:      200%;                             float:          left;                             padding-right:  10pt;}         li                { text-align:     justify;                             padding-top:    0.5em; }         .compact li       { padding-top:    0; }         dt                { padding-top:    0.5em; }         .compact dt       { padding-top:    0; }         dd                { text-align:     justify; }         td.list           { background:     #EEEEEE; }         blockquote.note   { text-align:     justify;                             background:     #EEEEEE;                             border:         none;                             margin:         1em;                             padding:        0.5em; }         blockquote.example {                             background:     transparent;                             border:         none;                             margin:         1em;                             padding:        0.5em; }         blockquote.example pre {                             padding:        0;                             margin:         0; }         sup               { font-size:      50%; }         ')"/>
+         <xsl:value-of select=" normalize-space('         body              { font-family:    Georgia, serif; }         p                 { text-align:     justify; }         table.news p      { margin-top:     0; }         table.news td     { vertical-align: baseline; }         table.news .date  { text-align:     right;                             padding-right:  0.5em;                             white-space:    nowrap; }         table.donors td   { vertical-align: baseline; }         table.donors li   { text-align:     left; }         div.directive     { background:     #EEEEEE;                             padding:        10pt 10pt 10pt 0; }         div.directive td  { vertical-align: baseline; }         div.directive pre { padding:        0;                             margin:         0; }         div.directive p   { margin:         5pt 0 0 0;                             font-size:      80%; }         div#banner        { background:     #EEEEEE;                             padding:        10pt 10pt 10pt 0; }         a.notrans         { color:          gray;                             text-decoration:none; }         span.initial      { font-size:      200%;                             float:          left;                             padding-right:  10pt;}         li                { text-align:     justify;                             padding-top:    0.5em; }         .compact li       { padding-top:    0; }         dt                { padding-top:    0.5em; }         .compact dt       { padding-top:    0; }         dd                { text-align:     justify; }         td.list           { background:     #EEEEEE; }         blockquote.note   { text-align:     justify;                             background:     #EEEEEE;                             border:         none;                             margin:         1em;                             padding:        0.5em; }         blockquote.example {                             background:     transparent;                             border:         none;                             margin:         1em;                             padding:        0.5em; }         blockquote.example pre {                             padding:        0;                             margin:         0; }         sup               { font-size:      50%; }         ')"/>
 
          <xsl:if test="$lang = 'he'">