library-web r377 - in trunk: . data data/xslt src



Author: fpeters
Date: Sat Feb 16 21:21:33 2008
New Revision: 377
URL: http://svn.gnome.org/viewvc/library-web?rev=377&view=rev

Log:
* data/gnome-library-search.xml, data/xslt/db2html.xsl,
data/xslt/gtk-doc.xsl, data/xslt/heading.xsl, data/xslt/html2html.xsl,
data/xslt/indexes.xsl,j src/lgo.py: added OpenSearch plugin.
(closes: #516894)



Added:
   trunk/data/gnome-library-search.xml
Modified:
   trunk/ChangeLog
   trunk/data/xslt/db2html.xsl
   trunk/data/xslt/gtk-doc.xsl
   trunk/data/xslt/heading.xsl
   trunk/data/xslt/html2html.xsl
   trunk/data/xslt/indexes.xsl
   trunk/src/lgo.py

Added: trunk/data/gnome-library-search.xml
==============================================================================
--- (empty file)
+++ trunk/data/gnome-library-search.xml	Sat Feb 16 21:21:33 2008
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- GNOME Library Search -->
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/";>
+  <ShortName>GNOME Library</ShortName>
+  <Description>Search GNOME Documentation Library</Description>
+  <InputEncoding>UTF-8</InputEncoding>
+  <Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEAAACxABrSO9dQAAAcBJREFUOE9jYKAV4OXjY+Lh5fUCYlGQHTw8PBHc3NyngPiIi6urOE57hUVE5YRERBUEhITDBQSF/oeGha0RFBaxA7L/gvhCwiL/z5w5U4fTAFEJyVOm5ha3FZVV0oDs/9NnzDgNpPtBbBAuKCz6DwQ2GAZIyykEyiurBkvKyq/1Cwz6v2XbNpv0rOwnnz59qgKKNUrJyv/Pys37/+3bt1astsspqy01s7L9tnzlKr0TJ0/uraytF4yIiQ9W1tAJ1zUyDT546PAyoM1ROJ1uYmWrXlFd9+XQkaPBSpq68xU1dL4B8X8k/NonKFQVb6S19/QbaxqZv1LRNfqPDc9fvHQeXgPUjCzmAvF/bDgpK///9x8/0vEaoG5mdxaI/yNjXWvn/5Nmzv377dt33FEHM1Xd0nkFEP+H4aDEjP9Xbtw6Dww8U3VrV2GCiVbN1t1VzdbjPwjrufj9f//h45K8ujYBIP8uSCwsvWAhQUP0PULmqtr7/gdhU7/oPlUHvwwYf8veg2cJGnDr/kPumKLaParOwf9VnILguHPmwr9Ar/gQNACkAKiQefO+I4Wds5fcnrRo9f+Dp85fA4r5E6WZVEUAwP7UJzhr+SEAAAAASUVORK5CYII=</Image>
+  <Url type="text/html" method="GET" template="http://www.google.com/custom?domains=library.gnome.org&amp;sitesearch=library.gnome.org&amp;q={searchTerms}"/>
+</OpenSearchDescription>

Modified: trunk/data/xslt/db2html.xsl
==============================================================================
--- trunk/data/xslt/db2html.xsl	(original)
+++ trunk/data/xslt/db2html.xsl	Sat Feb 16 21:21:33 2008
@@ -188,9 +188,7 @@
 <!-- FIXME: when we override db2html.css, do this there -->
 <xsl:template name="db2html.division.head.extra">
   <xsl:if test="not($libgo.tarball)">
-    <link rel="stylesheet" type="text/css" href="/skin/lgo.css"/>
-    <link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
-    <link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
+    <xsl:call-template name="libgo.head"/>
   </xsl:if>
 </xsl:template>
 

Modified: trunk/data/xslt/gtk-doc.xsl
==============================================================================
--- trunk/data/xslt/gtk-doc.xsl	(original)
+++ trunk/data/xslt/gtk-doc.xsl	Sat Feb 16 21:21:33 2008
@@ -58,9 +58,9 @@
       <meta name="generator"
             content="GTK-Doc V{$gtkdoc.version} (XML mode)"/>
     </xsl:if>
-    <link rel="stylesheet" href="/skin/lgo.css" type="text/css"/>
-    <link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
-    <link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
+
+    <xsl:call-template name="libgo.head"/>
+
 
       <!-- copied from the html.head template in the docbook stylesheets
            we don't want links for all refentrys, thats just too much

Modified: trunk/data/xslt/heading.xsl
==============================================================================
--- trunk/data/xslt/heading.xsl	(original)
+++ trunk/data/xslt/heading.xsl	Sat Feb 16 21:21:33 2008
@@ -131,5 +131,12 @@
   </div>
 </xsl:template>
 
+<xsl:template name="libgo.head">
+  <link rel="stylesheet" type="text/css" href="/skin/lgo.css"/>
+  <link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
+  <link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
+  <link rel="search" type="application/opensearchdescription+xml"
+    href="/gnome-library-search.xml" title="GNOME Library Search" />
+</xsl:template>
 
 </xsl:stylesheet>

Modified: trunk/data/xslt/html2html.xsl
==============================================================================
--- trunk/data/xslt/html2html.xsl	(original)
+++ trunk/data/xslt/html2html.xsl	Sat Feb 16 21:21:33 2008
@@ -113,14 +113,12 @@
       <xsl:if test="$libgo.h2hmode = 'gtkmm'">
         <xsl:apply-templates select="html:head/html:link[ rel = 'stylesheet']"/>
       </xsl:if>
-      <link rel="stylesheet" href="/skin/lgo.css" type="text/css" />
+      <xsl:call-template name="libgo.head"/>
       <xsl:if test="$libgo.extracss">
         <link rel="stylesheet" href="/skin/{$libgo.extracss}" type="text/css" />
       </xsl:if>
       <xsl:apply-templates select="html:head/html:title"/>
       <xsl:apply-templates select="html:head/html:link[ rel != 'stylesheet']"/>
-      <link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
-      <link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
      </head>
      <body>
       <xsl:call-template name="libgo.header" />

Modified: trunk/data/xslt/indexes.xsl
==============================================================================
--- trunk/data/xslt/indexes.xsl	(original)
+++ trunk/data/xslt/indexes.xsl	Sat Feb 16 21:21:33 2008
@@ -225,9 +225,7 @@
       <html lang="{$lang}">
 	<head>
 	  <title><xsl:value-of select="title" /> - GNOME Library</title>
-	  <link rel="stylesheet" type="text/css" href="/skin/lgo.css"/>
-          <link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
-          <link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
+	  <xsl:call-template name="libgo.head"/>
           <script type="text/javascript" src="/js/strings.js" />
 	</head>
 	<body class="with-star">
@@ -464,9 +462,7 @@
 	      </xsl:otherwise>
 	    </xsl:choose>
 	  </title>
-	  <link rel="stylesheet" type="text/css" href="/skin/lgo.css"/>
-          <link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
-          <link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
+	  <xsl:call-template name="libgo.head"/>
           <script type="text/javascript" src="/js/strings.js" />
 	  <xsl:if test="$filename = 'references'">
             <xsl:if test="$libgo.dbm_support">
@@ -598,15 +594,13 @@
       <html lang="{ lang}">
 	<head>
 	  <title>GNOME Library</title>
-	  <link rel="stylesheet" type="text/css" href="/skin/lgo.css"/>
+	  <xsl:call-template name="libgo.head"/>
 	  <xsl:comment>[if IE]&gt;
 &lt;style&gt;
 div.body-sidebar { width: 100%; }
 &lt;/style&gt;
 &lt;![endif]</xsl:comment><xsl:text>
 </xsl:text>
-          <link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
-          <link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
           <script type="text/javascript" src="/js/strings.js" />
 	</head>
 	<body class="with-star">

Modified: trunk/src/lgo.py
==============================================================================
--- trunk/src/lgo.py	(original)
+++ trunk/src/lgo.py	Sat Feb 16 21:21:33 2008
@@ -1387,6 +1387,12 @@
         if not os.path.exists(os.path.join(self.config.output_dir, 'skin/icons')):
             os.makedirs(os.path.join(self.config.output_dir, 'skin/icons'))
 
+        src = os.path.join(data_dir, 'gnome-library-search.xml')
+        dst = os.path.join(self.config.output_dir, 'gnome-library-search.xml')
+        if not os.path.exists(dst) or \
+                os.stat(src)[stat.ST_MTIME] > os.stat(dst)[stat.ST_MTIME]:
+            open(dst, 'w').write(open(src, 'r').read())
+        
         for src in glob.glob('%s/*.js' % self.javascript_dir):
             dst = os.path.join(self.config.output_dir, 'js', os.path.basename(src))
             if not os.path.exists(dst) or \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]