[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

PATCH: svnindex.css & svnindex.xsl

From: Ævar Arnfjörð Bjarmason <jeedo_at_users.sourceforge.net>
Date: 2004-02-01 03:02:10 CET

Ignore the previus ones, these two have some goodies:

*.xsl : better XHTML (valid,) in relation to <ul>'s then,
*.css : display:block; makes the whole list a <a> nost just the text (Yippie)

And yes, this is a dupe because the mailing lists hates me (wont reply my
requests for subscription)

Anyway, enjoy, im 99.9% this is 100% corrrect, unlike the ones below;)

Dont bother about the CC: hell, i'll just read the archive.

--- /home/share/software/src/subversion/tools/xslt/svnindex.css 2004-01-24 17:10:06.000000000 +0000
+++ svnindex.css 2004-02-01 01:58:31.000000000 +0000
@@ -1,12 +1,18 @@
-body{
+body {
   margin: 0;
   padding: 0;
 }
 
-a {
+a:link, a:hover, a:visited, a:hover:visited {
   color: navy;
 }
 
+ul {
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+}
+
 .footer {
   margin-top: 8em;
   padding: 0.5em 1em 0.5em;
@@ -16,6 +22,7 @@
   border-color: rgb(30%,30%,50%) navy rgb(75%,80%,85%) navy;
   background: rgb(88%,90%,92%);
   font-size: 80%;
+ font-style: italic;
 }
 
 .svn {
@@ -24,17 +31,26 @@
 
 .rev {
   margin-right: 3px;
+ margin-bottom: 3px;
   padding-left: 3px;
   text-align: left;
   font-size: 120%;
+ font-weight: normal;
+}
+
+#list {
+ margin-top: 0;
+ padding: 0;
 }
 
 .dir a {
+ display: block;
   text-decoration: none;
   color: black;
 }
 
 .file a {
+ display: block;
   text-decoration: none;
   color: black;
 }
@@ -42,43 +58,78 @@
 .path {
   margin: 3px;
   padding: 3px;
- background: #FFCC66;
   font-size: 120%;
 }
 
+.pathname {
+ padding-left:3px;
+ margin: 3px;
+ background: #fc6;
+ font-size: 120%;
+}
+
+.updir:before {
+ content: "[ ";
+}
+
+.updir:after {
+ content: " ]";
+}
+
 .updir {
   margin: 3px;
   padding: 3px;
   margin-left: 3em;
- background: #FFEEAA;
+ background: #fea;
 }
 
 .file {
   margin: 3px;
   padding: 3px;
- margin-left: 3em;
+ margin-left:3em;
+
   background: rgb(95%,95%,95%);
+ border-left: 2px rgb(95%,95%,95%) solid;
+}
+
+.file ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ border: none;
 }
 
 .file:hover {
   margin: 3px;
   padding: 3px;
   margin-left: 3em;
+
   background: rgb(100%,100%,90%);
-/* border: 1px black solid; */
+ border-left: 2px rgb(95%,95%,95%) solid;
 }
 
 .dir {
   margin: 3px;
   padding: 3px;
   margin-left: 3em;
+
   background: rgb(90%,90%,90%);
+ border-left: 2px rgb(90%,90%,90%) solid;
 }
 
+.dir ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ border: none;
+}
+
+
 .dir:hover {
   margin: 3px;
   padding: 3px;
- margin-left: 3em;
+ margin-left:3em;
+
   background: rgb(100%,100%,80%);
-/* border: 1px black solid; */
+ border-left: 2px rgb(90%,90%,90%) solid;
 }

--- /home/share/software/src/subversion/tools/xslt/svnindex.xsl 2004-01-24 17:10:06.000000000 +0000
+++ svnindex.xsl 2004-02-01 01:50:57.000000000 +0000
@@ -15,13 +15,13 @@
           </xsl:if>
           <xsl:value-of select="index/@path"/>
         </title>
- <link rel="stylesheet" type="text/css" href="/svnindex.css"/>
+ <link rel="stylesheet" type="text/css" href="/svn_style/svnindex.css"/>
       </head>
       <body>
         <div class="svn">
           <xsl:apply-templates/>
         </div>
- <div class="footer">
+ <address class="footer">
           <xsl:text>Powered by </xsl:text>
           <xsl:element name="a">
             <xsl:attribute name="href">
@@ -31,13 +31,13 @@
           </xsl:element>
           <xsl:text> </xsl:text>
           <xsl:value-of select="@version"/>
- </div>
+ </address>
       </body>
     </html>
   </xsl:template>
 
   <xsl:template match="index">
- <div class="rev">
+ <h1 class="rev">
       <xsl:if test="string-length(@name) != 0">
         <xsl:value-of select="@name"/>
         <xsl:if test="string-length(@rev) != 0">
@@ -48,29 +48,30 @@
         <xsl:text>Revision </xsl:text>
         <xsl:value-of select="@rev"/>
       </xsl:if>
- </div>
- <div class="path">
- <xsl:value-of select="@path"/>
- </div>
+ </h1>
+ <ul id="list">
+ <li class="path">
+ <div class="pathname"><xsl:value-of select="@path"/></div>
+ <ul>
     <xsl:apply-templates select="updir"/>
     <xsl:apply-templates select="dir"/>
     <xsl:apply-templates select="file"/>
+ </ul>
+ </li>
+ </ul>
   </xsl:template>
 
   <xsl:template match="updir">
- <div class="updir">
- <xsl:text>[</xsl:text>
+ <li class="updir">
       <xsl:element name="a">
         <xsl:attribute name="href">..</xsl:attribute>
         <xsl:text>Parent Directory</xsl:text>
       </xsl:element>
- <xsl:text>]</xsl:text>
- </div>
- <!-- xsl:apply-templates/ -->
+ </li>
   </xsl:template>
 
   <xsl:template match="dir">
- <div class="dir">
+ <li class="dir">
       <xsl:element name="a">
         <xsl:attribute name="href">
           <xsl:value-of select="@href"/>
@@ -78,20 +79,18 @@
         <xsl:value-of select="@name"/>
         <xsl:text>/</xsl:text>
       </xsl:element>
- </div>
- <!-- <xsl:apply-templates/ -->
+ </li>
   </xsl:template>
 
   <xsl:template match="file">
- <div class="file">
+ <li class="file">
       <xsl:element name="a">
         <xsl:attribute name="href">
           <xsl:value-of select="@href"/>
         </xsl:attribute>
         <xsl:value-of select="@name"/>
       </xsl:element>
- </div>
- <!-- xsl:apply-templates/ -->
+ </li>
   </xsl:template>
 
 </xsl:stylesheet>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Feb 1 07:37:49 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.