common keyboard javascript include
[sheet.git] / vim.plp
diff --git a/vim.plp b/vim.plp
index e8ed73ce65cd1e34c821d5b41eb5a258df124615..183a04a7b081f0c4ea9fdf38387f5c27dca16216 100644 (file)
--- a/vim.plp
+++ b/vim.plp
@@ -31,7 +31,7 @@ $header{content_type} = $ctype;
 <link rel="stylesheet" type="text/css" media="all" href="base.css">
 <!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
 <!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
-       my %styles = map {$_ => $_} qw(dark circus mono terse);
+       my %styles = map {$_ => $_} qw(dark circus mono red terse);
        our $style = exists $get{style} && $styles{$get{style}} || 'light';
        printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
                $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
@@ -42,35 +42,10 @@ $header{content_type} = $ctype;
        print "\n<style> .no, .alias {opacity:.5} </style>"
                if $showkeys and $get{keys} eq 'ghost';
 :>
+<link rel="vcs" type="git" href="git://dev.shiar.nl/sheet">
+<script type="text/javascript" src="/keys.js"></script>
 
-<script><!--
-function setmode(classname) {
-       // set style for each #rows>li>ul>li to display:none unless it matches classname
-       var showclass = classname ? ' '+classname+'(?!\\w)' : '^$';
-       var parentskip = /^keys/;
-       var row = document.getElementById('rows').firstChild;
-       do {
-               if (row.tagName == 'LI' && row.firstChild.tagName == 'UL'
-               && !row.firstChild.className.match(parentskip)) {
-                       var el = row.firstChild.firstChild;
-                       if (el) do {
-                               if (el.tagName == 'LI') {
-                                       el.style.display = el.className.match(showclass) ? 'block' : 'none';
-                               }
-                       } while (el = el.nextSibling);
-               }
-       } while (row = row.nextSibling);
-
-       // update H2 to reflect the first part of a currently active (but hidden) H3
-       var h3s = document.getElementsByTagName('H3');
-       for (var i = 0; i < h3s.length; i++) {
-               if (h3s[i].parentNode.style.display != 'block') continue;
-               document.getElementsByTagName('H2')[0].innerHTML = h3s[i].firstChild.data;
-       }
-} // setmode
-//--></script>
-
-<body>
+<body id="vim">
 
 <h1>vi/vim cheat sheet</h1>
 
@@ -160,7 +135,7 @@ $keys->print_rows($get{static});
 
 <p class="footer">
        <a href="http://sheet.shiar.nl/vim">sheet.shiar.nl<strong>/vim</strong></a>
-       <a href="git://dev.shiar.net/vi-cheat"><:= "v$VERSION" :></a>
+       <a href="git://dev.shiar.nl/sheet"><:= "v$VERSION" :></a>
        created by Shiar <:= $sign{sep} :>
        <a title="Licensed under the GNU Affero General Public License, version 3"
           href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPLv3</a> <:= $sign{sep} :>