summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-11-26 02:33:35 +0000
committerLennart Poettering <lennart@poettering.net>2005-11-26 02:33:35 +0000
commit3c058fbf131d664506af52209dd8eee678dfcade (patch)
treef9b49df924a8e10285d2845c6d1ec4972d150fc4
parentb3a4bdb55aa433564a2b717ae8e672506154fb69 (diff)
some xslt/css work
git-svn-id: file:///home/lennart/svn/public/sse/trunk@66 5fbabb74-0606-0410-a5e4-b5cc6a42724e
-rw-r--r--www/style.css51
-rw-r--r--www/style.xsl40
2 files changed, 86 insertions, 5 deletions
diff --git a/www/style.css b/www/style.css
index c2002d9..ff8ce97 100644
--- a/www/style.css
+++ b/www/style.css
@@ -4,12 +4,59 @@ max-width: 20em;
min-width: 15em;
padding: 5px;
position: relative;
-margin: auto;
+margin-left: auto;
+margin-right: auto;
+margin-bottom: 3em;
border: 1px solid #FFCF75;
text-align: center;
}
-
input[type=text] {
font-family: monospace
}
+
+div.statistics {
+font-size: 8px;
+color: lightgray;
+text-align: center;
+margin-top: 3em;
+}
+
+div.authors {
+font-size: 8px;
+color: lightgray;
+text-align: center;
+}
+
+div.hit {
+margin-left: 3em;
+margin-right: 3em;
+margin-top: 1em;
+margin-bottom: 1em;
+}
+
+div.hit div.hit_package span.name {
+font-weight: bold;
+}
+
+div.hit div.hit_statistics {
+font-style: italic;
+}
+
+body {
+margin: 2em;
+font-family: sans-serif;
+}
+
+div.n_hits {
+margin-bottom: 2em;
+}
+
+div.linkbox {
+margin-left: 40%;
+margin-right: auto;
+}
+
+ul.links li {
+display:inline;
+}
diff --git a/www/style.xsl b/www/style.xsl
index ab52a65..32798be 100644
--- a/www/style.xsl
+++ b/www/style.xsl
@@ -1,16 +1,50 @@
<?xml version="1.0" encoding="iso-8859-15"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:html="http://www.w3.org/1999/xhtml">
<xsl:output method="xml" version="1.0" encoding="iso-8859-15" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes"/>
-
<xsl:template match="/">
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
- <p>cool</p>
+
+ <h1>Source Search Engine</h1>
+
+ <xsl:copy-of select="//html:div[@class=&quot;formbox&quot;]"/>
+
+ <xsl:if test="number(id(&quot;results_total&quot;)) = 0">
+ <div>Your search yielded no results.</div>
+ </xsl:if>
+
+ <xsl:if test="number(id(&quot;results_total&quot;)) > 0">
+
+ <div class="n_hits"><xsl:value-of select="id(&quot;results_total&quot;)"/> hits.</div>
+
+ <xsl:for-each select="id(&quot;result_list&quot;)/html:li">
+ <div class="hit">
+ <div class="hit_package">Project: <span class="name"><xsl:value-of select="html:span[@class=&quot;package_name&quot;]"/></span></div>
+ <div class="hit_file">File: <a class="file">
+ <xsl:attribute name="href"><xsl:value-of select="html:a[@class=&quot;file_link&quot;]/@href"/></xsl:attribute> <xsl:value-of select="html:a[@class=&quot;file_link&quot;]"/></a></div>
+ <div class="hit_statistics"><xsl:value-of select="html:span[@class=&quot;hits&quot;]"/> hits in <xsl:value-of select="html:span[@class=&quot;words&quot;]"/> different words.</div>
+ </div>
+ </xsl:for-each>
+ </xsl:if>
+
+ <div class="linkbox">
+ <xsl:for-each select="//html:ul[@class=&quot;links&quot;]">
+ <xsl:copy-of select="."/>
+ </xsl:for-each>
+ </div>
+
+ <div class="statistics">
+ <xsl:value-of select="id(&quot;n_word&quot;) "/> words,
+ <xsl:value-of select="id(&quot;n_file&quot;) "/> files,
+ <xsl:value-of select="id(&quot;n_package&quot;) "/> packages in database.
+ </div>
+
+ <div class="authors"><xsl:text>Brought to you by Lennart Poettering, Stephan Pöhlsen and Sebastien Estienne, 2005</xsl:text></div>
</body>
</html>
</xsl:template>