aboutsummaryrefslogtreecommitdiffstats
path: root/tmpl
diff options
context:
space:
mode:
authorArne Georg Gleditsch <argggh@lxr.linpro.no>2007-07-05 00:51:08 +0200
committerArne Georg Gleditsch <argggh@lxr.linpro.no>2007-07-05 00:51:08 +0200
commite9fa4c98bb5f084739d3418ade3f0c51e34a0aa1 (patch)
treefec1d635625e031cde7cba1b0a1d95ee92ac760b /tmpl
Rebase tree.
Diffstat (limited to 'tmpl')
-rw-r--r--tmpl/content_dir.tt211
-rw-r--r--tmpl/footer.tt23
-rw-r--r--tmpl/header.tt281
-rw-r--r--tmpl/line_reference.tt24
-rw-r--r--tmpl/main.tt29
-rw-r--r--tmpl/popup_main.tt228
-rw-r--r--tmpl/prefs.tt259
-rw-r--r--tmpl/prefs_set.tt210
-rw-r--r--tmpl/print_pdf.tt232
-rw-r--r--tmpl/release_select.tt28
-rw-r--r--tmpl/search_result.tt274
11 files changed, 319 insertions, 0 deletions
diff --git a/tmpl/content_dir.tt2 b/tmpl/content_dir.tt2
new file mode 100644
index 0000000..f5bab3f
--- /dev/null
+++ b/tmpl/content_dir.tt2
@@ -0,0 +1,11 @@
+<table class="directory">
+[% FOREACH link = dir_listing %]
+<tr class="node">
+<td class="name">
+ <a href="[% link.name %]" class="fref">[% link.node %]</a></td>
+<td class="size">[% link.size %]</td>
+<td class="time">[% link.time %]</td>
+<td class="desc">[% link.desc %]</td>
+</tr>
+[% END %]
+</table>
diff --git a/tmpl/footer.tt2 b/tmpl/footer.tt2
new file mode 100644
index 0000000..11a09ca
--- /dev/null
+++ b/tmpl/footer.tt2
@@ -0,0 +1,3 @@
+
+</body>
+</html>
diff --git a/tmpl/header.tt2 b/tmpl/header.tt2
new file mode 100644
index 0000000..0c5b6f6
--- /dev/null
+++ b/tmpl/header.tt2
@@ -0,0 +1,81 @@
+<!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" lang="en" xml:lang="en">
+ <head>
+ <base href="[% base_url %]" />
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <script type="text/javascript" src="../../js/lxrng-funcs.js"></script>
+ <link rel="stylesheet" href="../../css/lxrng.css" type="text/css" title="LXRng" />
+
+ [% javascript %]
+
+ <script type="text/javascript">
+ var use_ajax_navigation=[% IF is_ajax %]1[% ELSE %]0[% END %];
+ var use_popup_navigation=[% IF is_popup %]1[% ELSE %]0[% END %];
+ </script>
+
+ <title>LXR [% context.tree -%]/
+ [%- FOREACH elem = context.path_elements %][% elem.node %][% END %]
+ </title>
+ </head>
+
+ <body class="full"
+ [% IF is_ajax %]onload="load_content();"[% END %]
+ [% IF is_popup %]onload="popup_prepare([% popup_serial %]);"[% END %]>
+
+ <div class="heading">
+ <div class="headingtop"></div>
+
+ <span class="lxr_title">
+ <span class="lxr_l">l</span><span class="lxr_x">x</span><span class="lxr_r">r</span>
+ <span id="current_path">
+ <a href="../[% context.vtree %]/">[% context.tree %]/</a>[%
+ FOREACH elem = context.path_elements
+ %]<a href="[% elem.path %]">[% elem.node %]</a>[%
+ END %]
+ </span>
+ <img src="../../gfx/rolldown.png" />
+ [% IF node.name.match('[^/]$') %]
+ <form action="+print=[% node.name %]" method="post">
+ <button type="submit" class="print"><img src="../../gfx/print.png"></button>
+ </form>
+ [% END %]
+ </span>
+
+ <div class="lxr_menu">
+ <span class="lxr_version">
+ <img src="../../gfx/left.png" alt="&lt;&lt;"/>
+ <form action="[% node.name %]" method="get">
+ <span id="ver_select">
+ [% INCLUDE release_select.tt2, context = context %]
+ </span>
+ </form>
+ <img src="../../gfx/right.png" alt="&gt;&gt;"/>
+ </span>
+
+ <span class="lxr_search">
+ <form action="+search" method="post" onsubmit="return do_search(this);">
+ <input type="hidden" name="navtarget" value="" />
+ <input type="text" name="search" id="search" />
+ <button type="submit">Search</button>
+ </form>
+ </span>
+
+ <span class="lxr_prefs">
+ <a href="+prefs?return=[% node.name %]"
+ onclick="return ajax_prefs();">
+ Prefs
+ </a>
+ </span>
+ </div>
+ <form action="+ajax" method="post" onsubmit="return false;">
+ <input type="hidden" name="ajax_lookup" id="ajax_lookup" value="" />
+ </form>
+
+ <div class="headingbottom"></div>
+ </div>
+
+ <div id="search_results" class="search_results"
+ [% IF search_res %]style="display: block;"[% END %]>
+ [% IF search_res %][% search_res %][% END %]</div>
diff --git a/tmpl/line_reference.tt2 b/tmpl/line_reference.tt2
new file mode 100644
index 0000000..f68296c
--- /dev/null
+++ b/tmpl/line_reference.tt2
@@ -0,0 +1,4 @@
+<a href="[% file %]#L[% line %]" [% navtarget %]
+onclick="return load_file('[% context.tree %]', '[% file %][% context.args_url %]', '[% context.release %]', [% line %]);">
+ [% file %], line [% line %]
+</a>
diff --git a/tmpl/main.tt2 b/tmpl/main.tt2
new file mode 100644
index 0000000..0b7ca51
--- /dev/null
+++ b/tmpl/main.tt2
@@ -0,0 +1,9 @@
+[% INCLUDE header.tt2 %]
+<div id="content">
+[% IF is_dir %]
+[% INCLUDE content_dir.tt2 context = context, node = node %]
+[% ELSE %]
+[% file_content %]
+[% END %]
+</div>
+[% INCLUDE footer.tt2 %]
diff --git a/tmpl/popup_main.tt2 b/tmpl/popup_main.tt2
new file mode 100644
index 0000000..5fa87a4
--- /dev/null
+++ b/tmpl/popup_main.tt2
@@ -0,0 +1,28 @@
+<!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" lang="en" xml:lang="en">
+ <head>
+ <base href="[% base_url %]" />
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <script type="text/javascript" src="../../js/lxrng-funcs.js"></script>
+ <link rel="stylesheet" href="../../css/lxrng.css" type="text/css" title="LXRng" />
+
+ <script type="text/javascript">
+ var use_ajax_navigation=[% IF is_ajax %]1[% ELSE %]0[% END %];
+ var use_popup_navigation=[% IF is_popup %]1[% ELSE %]0[% END %];
+ </script>
+
+ <title>LXR Lookup</title>
+ </head>
+
+ <body class="popup" onload="window.focus();">
+ <div id="search_results" class="search_results" style="display: block;">
+ [% search_res %]
+ </div>
+ </body>
+</html>
+
+
+
+
diff --git a/tmpl/prefs.tt2 b/tmpl/prefs.tt2
new file mode 100644
index 0000000..c7f6a6d
--- /dev/null
+++ b/tmpl/prefs.tt2
@@ -0,0 +1,59 @@
+<!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" lang="en" xml:lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <script type="text/javascript" src="../../js/lxrng-funcs.js"></script>
+ <link rel="stylesheet" href="../../css/lxrng.css" type="text/css" title="LXRng" />
+
+ <title id="title">LXR Preferences</title>
+ </head>
+ <body>
+
+ <div class="heading">
+ <div class="headingtop"></div>
+
+ <span class="lxr_title">
+ <span class="lxr_l">l</span><span class="lxr_x">x</span><span class="lxr_r">r</span>
+ </span>
+
+ <div class="lxr_menu">
+ <span class="lxr_prefs"><a href="[% return || '.' %]">Back</a></span>
+ </div>
+ <div class="headingbottom"></div>
+ </div>
+
+ <div class="pref_heading">Personal preferences for this LXRng site</div>
+
+ <form method="post" action="+prefs">
+ <div>
+ <input type="hidden" name="return" value="[% return %]" />
+ Where do you want your search results to be displayed?
+ <ol>
+ <li><input type="radio" name="resultloc" value="replace" />
+ Replace the active source browsing window</li>
+
+ <li><input type="radio" name="resultloc" value="popup" />
+ Show them in a popup window (requires JavaScript enabled)<br>
+
+ <font size="-1"><em>If your browser limits the ability to
+ raise/lower windows from JavaScript (Firefox: Edit ->
+ Preferences -> Content -> Enable JavaScript -> Advanced ->
+ Allow scripts to: Raise or lower windows), make sure you
+ either close your search result windows or avoid hiding them
+ behing other windows after use.</em></font></li>
+
+ <li><input type="radio" name="resultloc" value="ajax" />
+ Show them inside the active source browsing window
+ (requires JavaScript enabled)
+ </li>
+ </ol>
+ <p>
+ (Cookies need to be enabled for LXR preferences to take effect.)
+ </p>
+ <button type="submit">Store preferences</button>
+ </div>
+ </form>
+
+ </body>
+</html>
diff --git a/tmpl/prefs_set.tt2 b/tmpl/prefs_set.tt2
new file mode 100644
index 0000000..735e700
--- /dev/null
+++ b/tmpl/prefs_set.tt2
@@ -0,0 +1,10 @@
+<!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" lang="en" xml:lang="en">
+ <head>
+ <meta http-equiv="refresh" content="0;url=[% return %]" />
+ </head>
+ <body onload="location.href='[% return %]';">
+ <small><a href="[% return %]">Return to the source...</a></small>
+ </body>
+</html>
diff --git a/tmpl/print_pdf.tt2 b/tmpl/print_pdf.tt2
new file mode 100644
index 0000000..0577159
--- /dev/null
+++ b/tmpl/print_pdf.tt2
@@ -0,0 +1,32 @@
+% -*- latex -*-
+\documentclass[a4paper,11pt]{book}
+\usepackage[top=1cm, bottom=2cm, left=1.5cm, right=1cm]{geometry}
+\usepackage[latin1]{inputenc}
+\usepackage[T1]{fontenc}
+%% Uncomment the following two lines to produce pdfs with a prettier
+%% alternative to the computer modern fonts.
+\usepackage{lmodern}
+\usepackage{textcomp}
+\usepackage{fancyhdr}
+\usepackage{bbding}
+\pagestyle{fancy}
+\begin{document}
+\setlength\baselineskip{7pt}
+\setlength\parskip{.3\baselineskip}
+\setlength\parindent{0pt}
+\renewcommand{\headrulewidth}{0pt}
+\fancyhead{}
+\fancyfoot{}
+\def\dash{\raise2.1pt\hbox{\rule{5pt}{0.3pt}}\hspace{1pt}}
+\newcommand\lxrln[1]{\tiny\hspace*{-4em}\makebox[4em][r]{#1\hspace{1.5ex}}\small}
+\sffamily\small
+%% I kinda like the proportional fonts, but expect they won't be
+%% everyone's cup of tea. Uncomment next line to use monospace font.
+% \tt
+\fancyfoot[RE,LO]{\textit{\sffamily [% pathdesc %]%
+}}
+\fancyfoot[LE,RO]{\textit{\sffamily \thepage}}
+[% lineno = 1 %][% FOREACH line = lines -%]
+\mbox{}[% line %][% lineno = lineno + 1 %]\\
+[% END %]
+\end{document}
diff --git a/tmpl/release_select.tt2 b/tmpl/release_select.tt2
new file mode 100644
index 0000000..fc51500
--- /dev/null
+++ b/tmpl/release_select.tt2
@@ -0,0 +1,8 @@
+<select name="v" id="ver_list"
+onchange="update_version(this, '[% context.base_url %]', '[% context.tree %]', '[% context.default_release %]', '[% context.path %]');">
+ [% FOREACH v = context.all_releases %]
+ <option value="[% v %]"
+ [% IF v == context.release %]selected="selected"[% END %]>
+ [% v %]</option>
+ [% END %]
+</select>
diff --git a/tmpl/search_result.tt2 b/tmpl/search_result.tt2
new file mode 100644
index 0000000..639e951
--- /dev/null
+++ b/tmpl/search_result.tt2
@@ -0,0 +1,74 @@
+<span class="close-button">
+<a href="#" onclick="return [% IF navtarget %]window.close();[% ELSE %]hide_search();[% END %]">
+<img border="0" src="../../gfx/close.png" alt="X"></a>
+</span>
+
+[% IF code_res and code_res.idents %]
+<div class="query_desc">Code search: [% code_res.query %]</div>
+<ul>
+[% FOREACH ident = code_res.idents %]
+<li><a class="iref"
+ href="+ident=[% ident.0 %][% IF navtarget %]?nav[% navtarget %][% END %]"
+ onclick="return ajax_lookup_anchor(null, this);">
+[% ident.1 %]</a> at [% INCLUDE line_reference.tt2, file = ident.2, line = ident.3 %]
+</li>
+[% END %]
+</ul>
+[% END %]
+
+[% IF ident_res %]
+<div class="query_desc">Identifier:
+[% ident_res.ident.1 %]
+<a class="sref"
+ href="+code=[% ident_res.query %][% IF navtarget %]?nav[% navtarget %][% END %]"
+ onclick="return ajax_lookup_anchor(null, this);">
+[% ident_res.query %]</a>, from
+[% INCLUDE line_reference.tt2,
+ file = ident_res.ident.2, line = ident_res.ident.3 %]
+</div>
+<em>References:</em>
+<ul>
+[% FOREACH file = ident_res.refs.keys %]
+[% FOREACH line = ident_res.refs.$file %]
+<li>
+[% INCLUDE line_reference.tt2,
+ file = file, line = line %]
+</li>
+[% END %]
+[% END %]
+</ul>
+[% END %]
+
+[% IF text_res %]
+<div class="query_desc">Freetext search: [% text_res.query %]
+([% text_res.total %] estimated hits)</div>
+<ul>
+[% FOREACH file = text_res.files %]
+<li>[% file.0 %]%
+at [% INCLUDE line_reference.tt2, file = file.1, line = file.2 %]
+</li>
+[% END %]
+</ul>
+[% END %]
+
+[% IF file_res %]
+<div class="query_desc">Filename search: [% file_res.query %]</div>
+<ul>
+[% FOREACH file = file_res.files %]
+<li><a href="[% file %]" onclick="return load_file('[% context.tree %]',
+ '[% file %][% context.args_url %]', '', '');" [% navtarget %]>[% file %]</a>
+</li>
+[% END %]
+</ul>
+[% END %]
+
+[% IF ambig_res %]
+<div class="query_desc">Ambiguous file reference, please choose one:</div>
+<ul>
+[% FOREACH file = ambig_res.files %]
+<li><a href="[% file %]" onclick="return load_file('[% context.tree %]',
+ '[% file %][% context.args_url %]', '', '');" [% navtarget %]>[% file %]</a>
+</li>
+[% END %]
+</ul>
+[% END %]