home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / AIMP2 / aimp_2.61.583.exe / $TEMP / YandexPackSetup.msi / filE57BBF321F07B368647934F23B85F253 < prev    next >
Extensible Markup Language  |  2010-07-12  |  6KB  |  165 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE stylesheet [
  3.   <!ENTITY % yasearchDTD SYSTEM "chrome://yasearch/locale/yasearch.dtd">
  4.   %yasearchDTD;
  5.   <!ENTITY % yasearchFTabDTD SYSTEM "chrome://yasearch/locale/ftab/ftab.dtd" >
  6.   %yasearchFTabDTD;
  7. ]>
  8.  
  9. <xsl:stylesheet version="1.0"
  10.   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  11.   xmlns="http://www.w3.org/1999/xhtml">
  12.  
  13. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  14.  
  15. <xsl:param name="secURLParam" select="3"/>
  16. <xsl:param name="thumbsInRow" select="3"/>
  17. <xsl:param name="thumbsInCol"/>
  18. <xsl:param name="thumbsNmb" select="$thumbsInRow * $thumbsInCol"/>
  19. <xsl:param name="thumbsTdWidth" select="100 div $thumbsInRow"/>
  20. <xsl:param name="showNumbers" select="boolean($thumbsNmb <= 9)"/>
  21.  
  22. <xsl:template match="pages">
  23.   <table flex="1">
  24.     <xsl:call-template name="forCol"/>
  25.   </table>
  26. </xsl:template>
  27.  
  28. <xsl:template name="forCol">
  29.   <xsl:param name="i" select="1"/>
  30.   
  31.   <xsl:if test="$i <= $thumbsInCol">
  32.     
  33.     <tr>
  34.       <xsl:call-template name="forRow">
  35.         <xsl:with-param name="j" select="1"/>
  36.         <xsl:with-param name="indx" select="$i"/>
  37.       </xsl:call-template>
  38.     </tr>
  39.     
  40.     <xsl:call-template name="forCol">
  41.       <xsl:with-param name="i" select="$i + 1"/>
  42.     </xsl:call-template>
  43.     
  44.   </xsl:if>
  45. </xsl:template>
  46.  
  47. <xsl:template name="forRow">
  48.   <xsl:param name="j" select="1"/>
  49.   <xsl:param name="indx"/>
  50.   
  51.   <xsl:if test="$j <= $thumbsInRow">
  52.     
  53.     <xsl:call-template name="page">
  54.       <xsl:with-param name="indx" select="($j + ($indx - 1) * $thumbsInRow)"/>
  55.     </xsl:call-template>
  56.     
  57.     <xsl:call-template name="forRow">
  58.       <xsl:with-param name="j" select="$j + 1"/>
  59.       <xsl:with-param name="indx" select="$indx"/>
  60.     </xsl:call-template>
  61.     
  62.   </xsl:if>
  63. </xsl:template>
  64.  
  65. <xsl:template name="page">
  66.   <xsl:param name="indx"/>
  67.   <xsl:param name="pg" select="page[@index = $indx]"/>
  68.   
  69.   <td class="thumb" width="{$thumbsTdWidth}%">
  70.     <a class="thumb-holder"
  71.        yaThumbIndex="{$indx}"
  72.        yaThumbState="{$pg/@state}">
  73.       <xsl:if test="boolean($pg/@url)">
  74.         <xsl:attribute name="href">
  75.           <xsl:value-of select="$pg/@url"/>
  76.         </xsl:attribute>
  77.       </xsl:if>
  78.       
  79.       <div class="thumb-shadow"/>
  80.       
  81.       <div class="thumb-container">
  82.         <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 450">
  83.           <defs>
  84.               <linearGradient id="bg-gradient" gradientUnits="userSpaceOnUse"
  85.                               x1="0" x2="0" y1="0" y2="100%">
  86.               <stop offset="0" stop-color="rgb(246,246,246)"/>
  87.               <stop offset="8%" stop-color="rgb(240,240,240)"/>
  88.               <stop offset="15%" stop-color="rgb(232,232,232)"/>
  89.               <stop offset="35%" stop-color="rgb(225,225,225)"/>
  90.               <stop offset="40%" stop-color="rgb(230,230,230)"/>
  91.               <stop offset="60%" stop-color="rgb(243,243,243)"/>
  92.               <stop offset="100%" stop-color="rgb(246,246,246)"/>
  93.               </linearGradient>
  94.  
  95.               <linearGradient id="bg-gradient-hover" gradientUnits="userSpaceOnUse"
  96.                               x1="0" x2="0" y1="0" y2="100%">
  97.               <stop offset="0" stop-color="rgb(248,248,249)"/>
  98.               <stop offset="30%" stop-color="rgb(243,243,243)"/>
  99.               <stop offset="60%" stop-color="rgb(243,243,243)"/>
  100.               <stop offset="100%" stop-color="rgb(248,248,249)"/>
  101.               </linearGradient>
  102.             </defs>
  103.             
  104.             <rect x="0" y="0" width="100%" height="100%" style="fill:rgb(240,240,240);"/>
  105.             <rect x="0" y="0" width="100%" height="100%" style="fill: url(#bg-gradient-hover)"/>
  106.             <rect class="hover-off" x="0" y="0" width="100%" height="100%" style="fill: url(#bg-gradient)"/>
  107.             
  108.             <image xmlns:xlink="http://www.w3.org/1999/xlink"
  109.                    class="thumb-img"
  110.                    xlink:href="about:yandex-tabs?sec={$secURLParam}&image={$pg/@url}"
  111.                  x="0" y="0"
  112.                  width="100%" height="100%"/>
  113.             
  114.             <g class="error" style="display: none;">
  115.               <rect x="0" y="0" width="100%" height="100%" fill="rgb(246,246,248)"/>
  116.               
  117.               <g transform="translate(300,200),rotate(45)">
  118.                 <circle cx="0" cy="0" r="120" fill="#ccc"/>
  119.                 <rect x="-90" y="-18" width="180" height="36" fill="rgb(248,248,248)"/>
  120.                 <rect x="-18" y="-90" width="36" height="180" fill="rgb(248,248,248)"/>
  121.               </g>
  122.             </g>
  123.           </svg>
  124.         
  125.         <div class="text-holder">
  126.           <div class="thumb-empty">
  127.             <p>&yaftab.thumb.add.1.label;</p>
  128.             <p>&yaftab.thumb.add.2.label;</p>
  129.             <p>&yaftab.thumb.add.3.label;</p>
  130.           </div>
  131.           <div class="thumb-title"><p>
  132.             <xsl:choose>
  133.               <xsl:when test="string($pg/@custom_title) != ''">
  134.                 <xsl:value-of select="$pg/@custom_title"/>
  135.               </xsl:when>
  136.               <xsl:when test="string($pg/@title) != ''">
  137.                 <xsl:value-of select="$pg/@title"/>
  138.               </xsl:when>
  139.               <xsl:otherwise>
  140.                 <xsl:value-of select="$pg/@url"/>
  141.               </xsl:otherwise>
  142.             </xsl:choose>
  143.             </p>
  144.             <div class="shade"/>
  145.           </div>
  146.           <xsl:if test="$showNumbers">
  147.             <div class="thumb-number">
  148.               <div class="thumb-number-value" style="background-position: -{number(-1+$indx) * 40}px 0;"/>
  149.             </div>
  150.           </xsl:if>
  151.         </div>
  152.         
  153.           <div class="throbber"/>
  154.           
  155.           <div class="control-holder">
  156.             <a class="control-prefs" tooltiptext="&yaftab.thumb.edit.label;"/>
  157.             <a class="control-remove" tooltiptext="&yaftab.thumb.remove.label;"/>
  158.           </div>
  159.       
  160.       </div>
  161.     </a>
  162.   </td>
  163. </xsl:template>
  164.  
  165. </xsl:stylesheet>