shlomi-fish-homepage / template.wml

# #use wml::des::navbar
#include '../std/logo.wml'

<:{
use MyNavData;
use Shlomif::NavMenu;

my $filename = "$(FILENAME)";
$filename =~ s!index\.html$!!;
$filename = "/$filename";

my $nav_bar = Shlomif::NavMenu->new(
    'path_info' => $filename,
    'current_host' => "$(SERVER)",
    MyNavData::get_params(),
    );

my $rendered_results = 
        $nav_bar->render(
            no_ie => 'true',
            styles => 
            {
                'bar' => 'nav',
                'level0' => 'navbarmain',
                'level1' => 'navbarnested',
                'level2' => "navbarnested",
                'level3' => "navbarnested",
                'level4' => "navbarnested",
                'list' => "navbarmain",
            },
            );

use vars qw($nav_links);

$nav_links = $rendered_results->{nav_links};

use vars qw($nav_html);

$nav_html = $rendered_results->{html};

}:>


# Utility Functions.

<define-tag software_patents>1</define-tag>

<define-tag mynot><if "%0" "" "1" /></define-tag>

<define-tag printable_style>
<style type="text/css">
table.cv { width : 100% ; border : none ; }
table.cv td { vertical-align : top }
</style>
</define-tag>

# The Definition of the page itself
<?xml version="1.0" encoding="utf-8"?>
<!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-US" lang="en-US">
<head>
<title>{#SUBJECT_LOC#}</title>
<link rel="StyleSheet" href="$(ROOT)/style.css" type="text/css" />
<:{
use CGI qw();

while (my ($key, $url) = each(%$nav_links))
{
    print "<link rel=\"$key\" href=\"" . CGI::escapeHTML($url) . "\" />\n"
}
}:>
<if "$(PRINTABLE)" "<printable_style />" "" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<define-tag rellink whitespace="delete">
<preserve url />
<preserve host />
<preserve title />
<set-var %attributes />
<set-var host=<if "<get-var host />" "<get-var host />" "t2" /> />
<if <match "<get-var url />" "^http://" action="report" />
    "<get-var url />" 
    <ifeq "$(SERVER)" "<get-var host />"
        "$(ROOT)/<get-var url />"
        <ifeq "<get-var host />" "t2"
            "http://shlomif.il.eu.org/<get-var url />"
            "http://vipe.technion.ac.il/~shlomif/<get-var url />"
            />
    />
/>
<restore title />
<restore host />
<restore url /></define-tag>

<define-tag vipe:url>http://vipe.technion.ac.il/~shlomif/%0</define-tag>

<define-tag validhtml>
<br /><br /><br /><br />
<p>
<a href="http://validator.w3.org/check/referer" title="Valid XHTML 1.0!"><img 
    class="highlight" style="border:0" 
    src="$(ROOT)/images/valid-xhtml10.png" 
    alt="Valid XHTML 1.0!" height="31" width="88" 
    /></a>
</p>
<p>
 <a href="http://jigsaw.w3.org/css-validator/" title="Valid CSS!"><img 
    class="highlight" style="border:0;width:88px;height:31px"
    src="$(ROOT)/images/valid-css.png" 
    alt="Valid CSS!" /></a>
</p>
<p>
<a href="http://thewml.org/" title="Website META Language"><img 
src="$(ROOT)/images/logo-wml.png" alt="Website Meta Language" style="border:0" 
width="100" height="50" /></a>
</p>
<p>
<a href="<rellink url="no-ie/" host="t2" />" title="Stop Using Internet Explorer!"><img src="$(ROOT)/images/noIE.png" 
class="highlight" style="border:0" 
alt="Stop Using Internet Explorer!" /><br />
Stop Using Internet Explorer!</a>
</p>
</define-tag>


<define-tag start_table>
<table summary="Layout Table: The first cell contains a navigation bar, the second the main page" border="0" width="99%">
<tr>
<td valign="top" class="navbar" style="width:20%">

<if "<software_patents />" 
    "<div class="center"><a href="http://swpat.ffii.org/" 
     title="Stop Software Patents!"><img 
     src="$(ROOT)/images/noepatents_liberty.png" 
     alt="Stop Software Patents" class="highlight" 
     style="border:0" /></a></div>"
    ""
    />
    
<:{ print join("\n", @$nav_html); }:>

<validhtml />

</td>
<td valign="top" class="main">
</define-tag>

# </define-tag>
<if "<mynot "$(PRINTABLE)" />" "<start_table />" "" />

<h1>{#SUBJECT_LOC#}</h1>
{#BODY#}

<define-tag end_table>
</td>
</tr>
</table>
<hr />



<define-tag hosted:at:tech>
<div class="rightalign">
<a href="http://www.technion.ac.il/"><img src="images/techlogo.gif" alt="Hosted at the Technion" class="highlight" style="border : 0" /></a>
</div>
</define-tag>

<define-tag backtomyhp>
<div>
<a href="<rellink url="" host="t2" />"><img src="$(ROOT)/images/bk2hp.png" class="highlight" style="border : 0" alt="Back to my Homepage" /></a>
</div>
</define-tag>
<p>
Designed and Maintained by Shlomi Fish, <a href="mailto:shlomif@iglu.org.il">shlomif@iglu.org.il</a>
</p>

;;; If it is the t2 index than display the hosted:at:tech macro
;;; Else - display the back to my homepage image
<if <ifeq "$(FILENAME)" "index.html" 
        <ifeq "$(SERVER)" "t2" "t2" "" /> "" /> 
    <hosted:at:tech />
    <backtomyhp />
    />
</define-tag>

<if <mynot "$(PRINTABLE)" /> "<end_table />" "" />

</body>
</html>



<define-tag subject>
{#SUBJECT_LOC#:%0:##}
</define-tag>

<define-tag longblank>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
</define-tag>

<define-tag email:link>
<a href="mailto:%0">%0</a>
</define-tag>

#   per default we are in body
{#BODY#:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.