Giter Site home page Giter Site logo

londonlayout's Introduction

London Layout

Alternative tube map for london

Priorities

  1. minimise HTML
  2. Splash screen
  3. Click off splash screen event (start time change to time zero)
  4. Send load time and click off time to keen as datapoints
  5. minimise JS
  6. minimise CSS
  7. Page speed index as build step
  8. About page
  9. 404 page
  10. log level from query params
  11. back button works to update app state
  12. error tracking
  13. inline actual map
  14. click and drag map
  15. search for station
  16. comparison to existing tube map

Technology

Page Analytics

Uses Google Analytics to track interactions on the page. Look at piwik for similar analytics in the future. Or look at Keen when moving to an app and needed to better record page events.

Loading duration

The very first rendering of the page will set the start time within the times object which can then be used as reference for later events.

<!DOCTYPE html>
<html lang="en">
<head>
  <script>window.times = {start: Date.now()};</script>
  <!-- other headers -->
</head>

code from Ampersand tool, loading stats

For IE 9+ there are no cross browser issues with checking for DOMContentLoaded. This is dom setup before the loading of included resources is completed. To check that an individual item is loaded can be done by setting an onload function. This works on the window object and element objects.

function time() {
  console.log(Date.now() - window.times.start);
}

function ready(fn) {
  if (document.readyState != 'loading'){
    fn();
  } else {
    document.addEventListener('DOMContentLoaded', fn);
  }
}

$img = document.querySelector('img');
$img.onload = time
ready(time);

londonlayout's People

Contributors

crowdhailer avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.