nice demo ; it would be nice to make it more efficient.
I see that you are generating images with a size that is adapted to the user's screen.
If you do this, hundreds of thumbnails of all possible sizes will be generated at commons
for each page. To avoid this, you should quantize the size : use a width that is a
multiple of 100 pixels, as ProofreadPage does (Tim asked me to do this). In addition, if
you use this restricted set of widths, then thumbnails will be more likely to already
exist and will load faster.
To gain some speed, you could also preload pages p+1 and p-1, as google books does.
Also, in on_body_scroll, you could avoid the for loop : divide
$('#body').position()['scrollTop'] by the height of an image
Thomas
-------- Original-Nachricht --------
Datum: Sat, 14 Aug 2010 19:15:47 +0100
Von: Magnus Manske <magnusmanske(a)googlemail.com>
An: wikisource-l(a)lists.wikimedia.org
Betreff: [Wikisource-l] Back to the Scroll
Hi all,
after some discussion on wikitech-l, I made a Google Books-like
display demo for wikisource content. It should work on any multipage
djvu or PDF. To link to it, you'll need:
* The file name for the original (needs to be on commons)
* The total number of pages (couldn't find a way to get that
automatically anywhere...)
* The page to start on
Thus armed, you can construct a URL like this:
http://toolserver.org/~magnus/book2scroll/index.html?file=Transactions_of_t…
The default parameter-less URL will fall back on the DNB vol. 11:
http://toolserver.org/~magnus/book2scroll/index.html
Note that this is HTML/CSS/JS only; no toolserver backend
script/database is involved.
Awaiting onslaught of critique,
Magnus
_______________________________________________
Wikisource-l mailing list
Wikisource-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikisource-l
--
GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 fÌr nur 19,99 ¿/mtl.!*
http://portal.gmx.net/de/go/dsl