Mercurial > hg > nginx-site
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 +++ b/dtd/content.dtd @@ -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 +++ b/xml/en/donation.xml @@ -30,6 +30,28 @@ Thank you! <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 @@ DistroWatch.com </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 @@ Johnny Streeter </listitem> <listitem> -PSW GROUP, http://www.psw.net -</listitem> - -<listitem> -Michel Machado -</listitem> - -<listitem> Sergey Yarkin </listitem> @@ -77,10 +141,6 @@ Phost.nl </listitem> <listitem> -Sergey Korowkin -</listitem> - -<listitem> Valentin Sushkov </listitem> @@ -97,18 +157,10 @@ Alexander Irenkov </listitem> <listitem> -Jose Goncalo Peres -</listitem> - -<listitem> Will Mitayai Keeso Rowe </listitem> <listitem> -Vladimir Manov -</listitem> - -<listitem> Dmitry Zhitomirskiy </listitem> @@ -141,10 +193,6 @@ Grisha Kostyuk </listitem> <listitem> -Kirill Filchenkov -</listitem> - -<listitem> Dmitry Paskal </listitem> @@ -153,18 +201,10 @@ Vladimir Chernyshev </listitem> <listitem> -RedAccenir PortalProgramas -</listitem> - -<listitem> Konstantin Kondakov </listitem> <listitem> -Dmitriy Zimin -</listitem> - -<listitem> Igor Gusarov </listitem> @@ -184,6 +224,17 @@ Luc Suryo Svyatoslav Lempert </listitem> +</list> +</td> + +<td> + +<b>2004 - 2011</b> +<br/> +<br/> + +<list type="bullet"> + <listitem> MaxTorg.RU </listitem> @@ -855,8 +906,13 @@ Oleg S. Larin <listitem> Andrei Nigmatulin </listitem> +</list> -</list> +</td> + +</tr> + +</table> </section>
--- a/xsls/content.xsls +++ b/xsls/content.xsls @@ -122,7 +122,15 @@ X:stylesheet { 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 +++ b/xsls/style.xsls @@ -15,6 +15,8 @@ X:template style (lang) { 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 +++ b/xslt/content.xslt @@ -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 +++ b/xslt/style.xslt @@ -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'">