r286 - templates/trunk

jhuntwork at linuxfromscratch.org jhuntwork at linuxfromscratch.org
Tue Jun 14 13:09:14 PDT 2005


Author: jhuntwork
Date: 2005-06-14 14:09:14 -0600 (Tue, 14 Jun 2005)
New Revision: 286

Added:
   templates/trunk/swish.tmpl
Log:
Added swish.tmpl to templates

Added: templates/trunk/swish.tmpl
===================================================================
--- templates/trunk/swish.tmpl	2005-06-14 20:07:48 UTC (rev 285)
+++ templates/trunk/swish.tmpl	2005-06-14 20:09:14 UTC (rev 286)
@@ -0,0 +1,158 @@
+[%# Search engine template. All URLs should be absolute here %]
+
+[% WRAPPER page %]
+
+    [% IF ! search.results %]
+        [% PROCESS show_message %]
+        [% PROCESS search_form %]
+    [% ELSE %]
+        [% PROCESS search_form %]
+        [% PROCESS nav_bar %]
+        [% PROCESS results_list %]
+    [% END %]
+
+    [% PROCESS nav_bar_pages %]
+
+[% END %]
+
+
+[% BLOCK page %]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+<head>
+	<title>Search Linux From Scratch</title>
+	<meta name="description" content="Linux From Scratch - build your own Linux distribution from scratch" />
+	<meta name="keywords" content="Linux, LinuxFromScratch, Linux From Scratch, build your own Linux, DIY Linux, do-it-yourself Linux, create your own Linux" />
+	<meta name="MSSmartTagsPreventParsing" content="true" />
+	<link rel="alternate stylesheet" type="text/css" href="http://www.linuxfromscratch.org/style/3columns.css" media="screen" title="ThreeColumn" />
+	<link rel="stylesheet" type="text/css" href="http://www.linuxfromscratch.org/style/2columns.css" media="screen" title="TwoColumn" />
+	<link rel="alternate stylesheet" type="text/css" href="http://www.linuxfromscratch.org/style/2columns-menu.css" media="screen" title="TwoColumnMenu" />
+	<link rel="stylesheet" type="text/css" href="http://www.linuxfromscratch.org/style/print.css" media="print" />
+	<link rel="icon" href="http://www.linuxfromscratch.org/images/favicon.ico" type="image/x-icon" />
+	<script type="text/javascript" src="http://www.linuxfromscratch.org/scripts/styleswitcher.js"></script>
+</head>
+
+<body class="search">
+
+<div id="header">
+	<ul id="sectionnav">
+		<li><a href="#index" class="hidden" accesskey="2">Skip to content</a></li>
+		<li><a href="http://www.linuxfromscratch.org/lfs/news.html" accesskey="l"><span class="accesskey">L</span>FS</a></li>
+		<li><a href="http://www.linuxfromscratch.org/blfs/news.html" accesskey="b"><span class="accesskey">B</span>eyond LFS</a></li>
+		<li><a href="http://www.linuxfromscratch.org/alfs/news.html" accesskey="a"><span class="accesskey">A</span>utomated LFS</a></li>
+		<li><a href="http://www.linuxfromscratch.org/hints/list.html" accesskey="h"><span class="accesskey">H</span>ints</a></li>
+		<li><a href="http://www.linuxfromscratch.org/patches/news.html" accesskey="p"><span class="accesskey">P</span>atches</a></li>
+	</ul>
+	<h1><a href="http://www.linuxfromscratch.org/lfs/news.html" accesskey="l" title="LFS News page">Linux From Scratch</a></h1>
+	<ul id="styleselect">
+		<li>Select layout:</li>
+		<li><a href="#" onclick="setActiveStyleSheet('TwoColumn'); return false;" title="Content (2 columns) | Navigation">Two columns</a></li>
+		<li><a href="#" onclick="setActiveStyleSheet('TwoColumnMenu'); return false;" title="Content (2 columns) | Navigation, general navigation as menu">Two columns, Menu</a></li>
+		<li><a href="#" onclick="setActiveStyleSheet('ThreeColumn'); return false;" title="Navigation|Content|Navigation">Three columns</a></li>
+	</ul>
+</div>
+
+<div id="index">
+
+[% content %]
+
+</div>
+
+<div id="footer">
+	<ul>
+		<li><a href="#header">Back to the top.</a></li>
+		<li>© 1998-2003  Gerard Beekmans.</li>
+		<li>Site design by <a href="http://www.jeroencoumans.nl">Jeroen Coumans</a>.</li>
+	</ul>
+	<ul>
+		<li><a href="http://validator.w3.org/check/referer"><img src="http://www.linuxfromscratch.org/images/xhtml-1.1.png" alt="Valid XHTML 1.1!"
+height="15" width="80" /></a></li>
+		<li><a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="http://www.linuxfromscratch.org/images/css.png" alt="Valid CSS!" height="15"
+width="80" /></a></li>
+	</ul>
+</div>
+</body>
+</html>
+[% END %]
+
+
+[% BLOCK show_message %]
+    [% IF search.errstr %]
+        <!-- FIXME: The style should be specified in the proper stylesheet file -->
+        <span style="color: red; font-size: large;">[% search.errstr | html %]</span>
+    [% END %]
+[% END %]
+
+
+[% BLOCK search_form %]
+    [% CGI.start_form( '-action' => CGI.script_name, '-method' => 'GET' ) %]
+    <div>
+        [% CGI.textfield( {
+            name    => 'query',
+            size    => 32,
+            maxlength => 255,
+            } ) %]
+
+        [% CGI.submit('submit','Search!') %]<br />
+        [% search.get_meta_name_limits %]
+        [% search.get_sort_select_list %]
+        [% search.get_index_select_list %]
+        [% search.get_limit_select %]
+        [% search.get_date_ranges %]
+    </div>
+    [% CGI.end_form.join('') %]
+[% END %]
+
+
+[% BLOCK nav_bar %]
+    [% search.stopwords_removed %]
+    <h3>
+        Results for <strong>[% search.query_simple | html %]</strong>
+        [% search.navigation('from') %] to [% search.navigation('to') %] of [% search.navigation('hits') %] results.
+        <small>Run time: [% search.navigation('run_time') %] |
+            Search time: [% search.navigation('search_time') %]</small>
+    </h3>
+
+    [% PROCESS nav_bar_pages %]
+[% END %]
+
+
+[% BLOCK nav_bar_pages %]
+    [% IF search.navigation('pages') %]
+    <div class="pagenav"><ul><li><strong>Page:</strong></li><li>
+    [% search.navigation('pages') %]
+
+    [% IF search.navigation('prev_count') %]
+        <a href="[% search.query_href %]&start=[% search.navigation('prev') %]">
+        Previous [% search.navigation('prev_count') %]</a>
+    [% END %]
+
+    [% IF search.navigation('next_count') %]
+        <a href="[% search.query_href %]&start=[% search.navigation('next') %]">
+        Next [% search.navigation('next_count') %]</a>
+    [% END %]
+    </li></ul></div>
+    [% END %]
+[% END %]
+
+
+[% BLOCK results_list %]
+    [% FOREACH item = search.results %]
+    <ul class="results">
+        <li><strong>[% item.swishreccount %]</strong>
+            <a href="[% item.swishdocpath_href %]">
+                [% ( item.swishtitle || item.swishdocpath ) %]
+            </a>
+            <small>(rank: <strong>[% item.swishrank %]</strong>)</small></li>
+
+        <li>
+            [% item.swishdescription %]
+            <dl>
+                <dt>Last Modified Date:</dt> <dd>[% item.swishlastmodified %]</dd>
+                <dt>Document Size:</dt> <dd>[% item.swishdocsize %]</dd>
+                <dt>Document Path:</dt> <dd>[% item.swishdocpath %]</dd>
+            </dl>
+        </li>
+    </ul>
+    [% END %]
+[% END %]




More information about the website mailing list