--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/striper.js Sat Oct 22 11:54:03 2011 +0100
@@ -0,0 +1,43 @@
+// Splintered striper 1.3
+// reworking of Zebra Tables and similar methods which works not only for tables and even/odd rows,
+// but as a general DOM means of assigning any number of classes to children of a parent element.
+// Patrick H. Lauke aka redux / www.splintered.co.uk
+// Distributed under the Creative Commons Attribution-ShareAlike license - http://creativecommons.org/licenses/by-sa/2.0/
+
+
+/*
+ * Summary: Core experiment function that applies any number of classes to all child elements
+ * contained in all occurences of a parent element (either with or without a specific class)
+ * Parameters: parentElementTag - parent tag name
+ * parentElementClass - class assigned to the parent; if null, all parentElementTag elements will be affected
+ * childElementTag - tag name of the child elements to apply the styles to
+ * styleClasses - comma separated list of any number of style classes (using 2 classes gives the classic "zebra" effect)
+ * Return: none
+ */
+function striper(parentElementTag, parentElementClass, childElementTag, styleClasses)
+{
+ var i=0,currentParent,currentChild;
+ // capability and sanity check
+ if ((document.getElementsByTagName)&&(parentElementTag)&&(childElementTag)&&(styleClasses)) {
+ // turn the comma separate list of classes into an array
+ var styles = styleClasses.split(',');
+ // get an array of all parent tags
+ var parentItems = document.getElementsByTagName(parentElementTag);
+ // loop through all parent elements
+ while (currentParent = parentItems[i++]) {
+ // if parentElementClass was null, or if the current parent's class matches the specified class
+ if ((parentElementClass == null)||(currentParent.className == parentElementClass)) {
+ var j=0,k=0;
+ // get all child elements in the current parent element
+ var childItems = currentParent.getElementsByTagName(childElementTag);
+ // loop through all child elements
+ while (currentChild = childItems[j++]) {
+ // based on the current element and the number of styles in the array, work out which class to apply
+ k = (j+(styles.length-1)) % styles.length;
+ // add the class to the child element - if any other classes were already present, they're kept intact
+ currentChild.className = currentChild.className+" "+styles[k];
+ }
+ }
+ }
+ }
+}
--- a/travelling.html Sat Oct 22 11:49:14 2011 +0100
+++ b/travelling.html Sat Oct 22 11:54:03 2011 +0100
@@ -2,6 +2,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HEAD>
<TITLE> Christian Urban </TITLE>
+<script type="text/javascript" src="striper.js"></script>
<BASE HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/">
</HEAD>
@@ -9,7 +10,8 @@
BGCOLOR="#4169E1"
LINK="#0000EF"
VLINK="#51188E"
- ALINK="#FF0000">
+ ALINK="#FF0000"
+ ONLOAD="striper('ul','striped','li','first,second')">
<TABLE WIDTH="100%"
BGCOLOR="#4169E1"
@@ -50,7 +52,7 @@
<!-- right column -->
<TD BGCOLOR="#FFFFFF" WIDTH="75%">
<H2>Talks and Travel Plans</H2>
-<UL>
+<UL class="striped">
<li> Talk at Dyckhoff Fest (18 - 19 November)
</UL>
</TD>
@@ -62,7 +64,7 @@
<H5>2011</H5>
-<UL>
+<UL class="striped">
<li> Talk at ITP'11 (22 - 25 August, Nijmegen)
<li> Talk at ITU, Copenhagen (15 August, host: Prof. Lars Birkedal)
<li> Talk at Tsinghua (28 April - 8 May, host: Prof. Jean-Pierre Jouannaud)
@@ -76,7 +78,7 @@
<H5>2010</H5>
-<UL>
+<UL class="striped">
<li> Isabelle/Isar tutorial at University Paris Sud (22 - 23 November, host: Dr Markus Wenzel)
<li> Talk about regular expressions and Myhill-Nerode in Cambridge (9 November)
<li> Talk at the University of Sussex (3 November, host: Dr Martin Berger)
@@ -94,7 +96,7 @@
</UL>
<H5>2009</H5>
-<UL>
+<UL class="striped">
<li> Schloss Dagstuhl Seminar (4th - 9th October)
<li> visit to Dr James Cheney and ICFP & WMM (Edinburgh, 26th August - 5th September)
<li> Talk at Tsinghua University (22 May, host: Prof. Jean-Pierre Jouannaud)
@@ -107,7 +109,7 @@
<H5>2008</H5>
-<UL>
+<UL class="striped">
<LI> Research visit to Princeton University (15th September - 13th December, host: Prof. Andrew Appel)
<LI> <A HREF="http://www.csail.mit.edu/events/eventcalendar/calendar.php?show=event&id=2053">Talk</A>
at MIT (21th November, hosts Prof. Martin Rinard and Dr Cameron Freer)
@@ -142,7 +144,7 @@
</UL>
<H5>2007</H5>
-<UL>
+<UL class="striped">
<LI> Talks at the Saarbrücken University (13 - 14 December, host: Prof. Gerd Smolka)
<LI> Thesis examination of Dragisa Zunic (21. December, Lyon)
<LI> Talk at Workshop on Mechanizing Metatheory (Freiburg, 1 - 4 October)
@@ -158,7 +160,7 @@
</UL>
<H5>2006</H5>
-<UL>
+<UL class="striped">
<LI> Talk at the CANS-workshop (26th October, host: Prof. Andrew Pitts)
<LI> Talk in London (1st November, host: Prof. Edmund Robinson)
<LI> Talk in Amsterdam (15th Setptember, hosts: Prof. Jan Klop and Dr Femke van Raamsdonk)
@@ -175,7 +177,7 @@
</UL>
<H5>2005</H5>
-<UL>
+<UL class="striped">
<LI> Talk in Edinburgh (25 January, host: Ian Stark)
<LI> Talk in Leicester (28 January, host: Neil Ghani)
<LI> Talk at King's College London (2 February, host: Maribel Fernandez)
@@ -197,7 +199,7 @@
</UL>
<H5>2004</H5>
-<UL>
+<UL class="striped">
<LI> Talk on Binding in Isabelle/HOL (Nijmegen, The Netherlands, 1 - 2 November, host: Henk Barendregt)
<LI> visit to Prof. Dale Miller in Paris (France, 28 September)
<LI> Talk (with Jeney) at ICLP in St Malo (France, 5 - 10 September)
@@ -216,7 +218,7 @@
<LI> visit to Dr Claudia Faggian in Padova (Italy, 24 March)
</UL>
<H5>2003</H5>
-<UL>
+<UL class="striped">
<LI> Talk in Oxford (24 November, host: Luke Ong)
<LI> Talk in the theory seminar at the University of Kent (13 October, host: Stefan Kahrs)
<LI> Talk at CSL & KGC 2003 Colloquium (Vienna, Austria, 22 - 30 August)
@@ -231,7 +233,7 @@
<LI> Talk at LMU (Munich, 20 January, host: Helmut Schwichtenberg)
</UL>
<H5>2002</H5>
-<UL>
+<UL class="striped">
<LI> Talk at <A HREF="http://www.cs.bham.ac.uk/~blc02/">BLC</A>
(Birmingham, 12-14 September)
<LI> <A HREF="http://www.cee.hw.ac.uk/~fairouz/automath2002/">Automath Workshop</A>
@@ -240,7 +242,7 @@
(Marseille, 10 - 23 February)
</UL>
<H5>2001</H5>
-<UL>
+<UL class="striped">
<LI> Linear Meeting in Bertinoro, Italy (22 - 25 April)
<LI> Talk at the <A HREF="http://www.ii.uj.edu.pl/zpi/tlca2001/">TLCA 2001</A>
(Krakow, 2 - 5 May)
@@ -252,7 +254,7 @@
</UL>
<H5>2000</H5>
-<UL>
+<UL class="striped">
<LI> Talk in the
<A HREF="http://www.pps.jussieu.fr/">Preuves, Programmes et Systèmes Seminar</A>
in Paris (13 January, host: Pierre-Louis Curien)
@@ -269,7 +271,7 @@
</UL>
<H5>1999</H5>
-<UL>
+<UL class="striped">
<LI> Talk in the Joint Theory Seminar of Imperial and QMW (London, 20 January, host: David Pym)
<LI> Proof and Computation Workshop in Leeds (12 - 13 February)
<LI> Talk at the <A HREF ="http://w3.dm.univaq.it/tlca99/">
@@ -282,7 +284,7 @@
</UL>
<H5>1998</H5>
-<UL>
+<UL class="striped">
<LI> Talk at the <A HREF ="http://iml.univ-mrs.fr/~ehrhard/ll-hcm-1998.html">
Linear Logic and Typed Lambda-Calculus Workshop</A> in Marseille (6 - 10 April)
<LI> Talk at the TABLEAUX'98 Conference in Tilburg, the Netherlands (5 - 8 May)
@@ -294,7 +296,7 @@
</UL>
<H5>1997</H5>
-<UL>
+<UL class="striped">
<LI> Talk at the
<A HREF="http://orchid.inf.tu-dresden.de/gk-spezifikation/index.html">
Graduate College</A> Meeting held by the University in Dresden
@@ -306,7 +308,7 @@
</UL>
<H5>1996</H5>
-<UL>
+<UL class="striped">
<LI> ELP'96 in Leipzig (Germany, 28 - 30 March)
<LI> BCTCS 12 in Canterbury (1 - 4 April)
<LI> Research visit to the UPenn (Philadelphia, 9 May - 3 June)
@@ -317,7 +319,7 @@
</UL>
<H5>1995</H5>
-<UL>
+<UL class="striped">
<LI> Linear Logic and Applications Meeting in Cambridge (16 - 18 October)
</UL>
</TD>
@@ -327,7 +329,7 @@
</TABLE>
<P><!-- Created: Tue Mar 4 00:23:25 GMT 1997 -->
<!-- hhmts start -->
-Last modified: Sat Oct 22 11:49:00 BST 2011
+Last modified: Sat Oct 22 11:53:32 BST 2011
<!-- hhmts end -->
<a href="http://validator.w3.org/check/referer">[Validate this page.]</a>
</BODY>