Ignore:
Timestamp:
Feb 7, 2010, 4:08:30 PM (10 years ago)
Author:
Nick Burch
Message:

Turn the by-decade bits largely into shtml includes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/static/tiles/1920s/allmaps.html

    r715 r716  
    1 
    2 <html>
    3 <head>
     1<!--#include virtual="../../inc/by-decade/allmaps-header.shtml" -->
    42  <title>England and Wales maps from the 1920s</title>
    5 </head>
    6 <script src="../yahoo.js"></script>
    7 <script src="../dom.js"></script>
    8 <script src="../event.js"></script>
    9 
    10 <body>
     3<!--#include virtual="../../inc/by-decade/allmaps-mid.shtml" -->
    114<p>
    125Click on the map to zoom in on our 1920s maps.
    136</p>
    14 <p>
    15 For more information, or to view our latest maps, please
    16  <a href="/">visit the site homepage</a>.
    17 </p>
    18 
    19 <a href="#" id="link">
    20 <img src="thumbnail.jpg" style="border: none" />
    21 </a>
    22 </body>
    23 
    24 <script type="text/javascript">
    25 // The X offset
    26 // (The number of pixels that were trimmed from the left of the thumbnail
    27 //   image, when it was created to start at 0,0)
    28 var xOffset = 77;
    29 
    30 function click(e) {
    31        
    32   e = YAHOO.util.Event.getEvent(e);
    33   var img = YAHOO.util.Event.getTarget(e);
    34   var imgPos = YAHOO.util.Dom.getXY(img);
    35         var x = xOffset + YAHOO.util.Event.getPageX(e) - imgPos[0];
    36         var y = img.height-(YAHOO.util.Event.getPageY(e) - imgPos[1]);
    37 
    38         var s6x = Math.round(x/6);
    39         var s6y = Math.round(y/6);
    40 
    41         window.location=("map.html#" + s6x + "," + s6y + ",3");
    42 
    43         YAHOO.util.Event.stopEvent(e);
    44 }
    45 
    46   YAHOO.util.Event.addListener("link", "click", click);
    47 
    48 </script>
    49 
    50 </html>
     7<!--#include virtual="../../inc/by-decade/allmaps-footer.shtml" -->
Note: See TracChangeset for help on using the changeset viewer.