1. 11 Dec, 2016 6 commits
  2. 19 Nov, 2016 4 commits
  3. 13 Nov, 2016 7 commits
    • Unbreak non-SVG image rendering. Oops. · dc8d9e53
      Commit 8c7f780c optimistically stated
      that all other content gets correctly typed. Well, the arrows and
      other decorative stuff from images/ directory is because they got
      normal suffixes, the ones we care about (from image/ directory) do
      not. So we need to handle both image types manually.
      
      Unbreaks non-SVG image rendering broken in commit
      8c7f780c.
      Panu Matilainen committed
    • Implement eLearn-like path tracing · f76df0ae
      Backtrace the menu path to current element, create nice clickable
      links along the way.
      Panu Matilainen committed
    • Make svg zoom/move buttons really work, doh · 854cb29f
      Forgot in the previous commit and then lost and then rewritten,
      ultimately for the better I hope. Also let the svg image use all
      available area instead of limiting it to a 90'ish postage stamp space.
      Panu Matilainen committed
    • Add a setup hack to fix SVG move/zoom on Firefox · 8e3ee890
      Better write the whole thing from scratch eventually but for now
      just make it work like the original.
      Panu Matilainen committed
    • Render options (aka codep in elearn jargon) in titles/links, more or less · 4a3ddfa0
      Optional features like alarm, sw/sedan, xenon lights etc are handled
      with "CODEP" in eLearn: where ALL_CODEP=0 there's a related CODEP
      entry to be found via ELEMENT_CODEP relation. Fish the codeps
      in content menus and for the path view too, show in parentheses
      after the main title.
      
      This seems awfully clumsy, but I dont see a way to perform this
      magic in a nice and elegant sql query (maybe there is one, maybe
      there is not) so we patch it in as needed. To make matters uglier,
      sqlite.Row does not support assignment so we'll convert to dicts
      where codep handling is needed.
      Panu Matilainen committed
    • Render SVG images too · 8c7f780c
      The SVG images are compressed but do not indicate that by file extension,
      so mime type guessing by file extension is no good, so do_GET() from
      SimpleHTTPServer is not enough.  The SVG images also contain some Adobe
      Illustrator specific gunk which at least Firefox refuses to handle at all,
      so we need to massage that a bit while serving it.
      
      Luckily all other content seems to be nicely typed so we can just
      assume octet-stream to mean compressed SVG. Use gzip module to read,
      and parse with entity resolving off to filter out the bad apples,
      and feed the result to the now happy browser.
      
      Refactor do_page() to handle different content types and take advantage
      of that in all serving of our own.
      Panu Matilainen committed
  4. 10 Nov, 2016 1 commit
  5. 09 Nov, 2016 4 commits
  6. 06 Nov, 2016 3 commits
  7. 05 Nov, 2016 8 commits