shlomi-fish-homepage / template.wml

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

use MyNavData;
use HTML::Widgets::NavMenu;

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

use vars qw($nav_bar);

$nav_bar = HTML::Widgets::NavMenu->new(
    'path_info' => $filename,
    'current_host' => "$(SERVER)",
    'ul_classes' => [ "navbarmain", ("navbarnested") x 10 ],

my $rendered_results = $nav_bar->render();

use vars qw($nav_links);

$nav_links = $rendered_results->{nav_links};

use vars qw($nav_html);

$nav_html = $rendered_results->{html};

my $leading_path = $rendered_results->{leading_path};

my $render_leading_path_component = sub {
    my $component = shift;
    my $title = $component->title();
    my $title_attr = defined($title) ? " title=\"$title\"" : "";
    return "<a href=\"" . CGI::escapeHTML($component->direct_url()) .
        "\"$title_attr>" .
        $component->label() . "</a>";

use vars qw($leading_path_string);

$leading_path_string =
    join(" &rarr; ",
        { $render_leading_path_component->($_) }


# 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"> { width : 100% ; border : none ; } td { vertical-align : top }

# The Definition of the page itself
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="" xml:lang="en-US" lang="en-US">
<link rel="StyleSheet" href="$(ROOT)/style.css" type="text/css" />
<link rel="shortcut icon" href="$(ROOT)/favicon.ico" type="image/x-icon" />
use CGI qw();

my @keys = (sort { $a cmp $b } keys(%$nav_links));
foreach my $key (@keys)
    my $url = $nav_links->{$key};
    print "<link rel=\"$key\" href=\"" . CGI::escapeHTML($url) . "\" />\n"
<if "$(PRINTABLE)" "<printable_style />" "" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<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"
            "<get-var url />"
            "<get-var url />"
<restore title />
<restore host />
<restore url /></define-tag>

<define-tag vipe:url></define-tag>

<define-tag validhtml>
<a href=";id=0&amp;t=70"><img 
   style="margin-top:1em; border:0;" alt="Get Firefox!" 
   title="Get Firefox! A safer, faster, better web-browser." 
   src="$(ROOT)/images/get-firefox.gif" /></a>
<a href="" title="Valid XHTML 1.0!"><img 
    class="highlight" style="border:0;" 
    alt="Valid XHTML 1.0!" height="31" width="88" 
 <a href="" title="Valid CSS!"><img 
    class="highlight" style="border:0;"
    alt="Valid CSS!" /></a>
<a href="" title="Website META Language"><img 
src="$(ROOT)/images/logo-wml.png" alt="Website Meta Language" style="border:0" 
width="100" height="50" /></a>
<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>

<define-tag start_table>
<table summary="Layout Table: The first cell contains a navigation bar, the second the main page" border="0" width="99%">
<td colspan="2" class="leading_path">
    print +($leading_path_string || 
        ("<a href=\"<rellink url="" host="t2" title="Home" />\" " . 
         "title=\"Shlomi Fish' Homepage\">Shlomi Fish</a>")
<td valign="top" class="navbar" style="width:20%">

<if "<software_patents />" 
    "<div class="center"><a href="" 
     title="Stop Software Patents!"><img 
     alt="Stop Software Patents" class="highlight" 
     style="border:0;margin-bottom:0.5em;" /></a></div>"
    my $nav_buttons_html = "";
    foreach my $button 
                'dir' => "prev", 
                'button' => "left", 
                'title' => "Previous Page",
                'dir' => "up", 
                'button' => "up", 
                'title' => "Up in the Site",
                'dir' => "next", 
                'button' => "right", 
                'title' => "Next Page",
        my $dir = $button->{dir};
        my $key = substr($dir, 0, 1);
        my $key_uc = uc($key);
        $nav_buttons_html .= "<a href=\"" . CGI::escapeHTML($nav_links->{$button->{dir}}) . 
            "\" title=\"$button->{title} (Alt+$key_uc)\" accesskey=\"$key\"><img src=\"$(ROOT)/images/arrow-$button->{button}.png\" alt=\"$button->{title}\" style=\"border:0\" /></a>\n";
   print "<div class=\"center\">\n$nav_buttons_html\n</div>";
<:{ print join("\n", @$nav_html); }:>
<a href="<rellink host="t2" url="site-map/" />"><b>Site Map</b></a>

<validhtml />

<td valign="top" class="main">

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


<define-tag end_table>
<hr />

<define-tag hosted:at:tech>
<div class="rightalign">
<a href=""><img src="images/actcom-50-2.gif" 
   alt="Hosted at Actcom" class="highlight" style="border : 0" 
   title="Hosted at Actcom" /></a>

<define-tag backtomyhp>
<a href="<rellink url="" host="t2" />"><img src="$(ROOT)/images/bk2hp.png" class="highlight" style="border : 0" alt="Back to my Homepage" /></a>
Written, designed and maintained by Shlomi Fish, <a href=""></a>

;;; 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 />

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


<define-tag subject>

<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 email:link>
<a href="mailto:%0">%0</a>

#   per default we are in 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
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.