From b96db555050690f8517f7caf58c13fb512d4c5b0 Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Fri, 22 Mar 2013 17:37:34 -0700 Subject: [PATCH] Stuff. --- README | 0 README.md | 0 convert_gifs_to_static.py | 3 +- package.json | 4 +- public/script.js | 58 ++++++++++++++++++- public/style.css | 25 +++++++++ server_gifs.js | 115 +++++++++++++++++++++++--------------- 7 files changed, 153 insertions(+), 52 deletions(-) create mode 100644 README create mode 100644 README.md diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/convert_gifs_to_static.py b/convert_gifs_to_static.py index 7172b96..af52297 100644 --- a/convert_gifs_to_static.py +++ b/convert_gifs_to_static.py @@ -12,7 +12,6 @@ # os.system('cd gifs/prelinger/; curl -O ' + thumb) # json_data.close() - # convert gifs/prelinger/0540_1935_Pontiac_Advertising_R2_13_38_44_00_3mb.gif[3] -coalesce out.gif # convert gifs/prelinger/0540_Spain_in_Revolt_R3_13_00_52_20_3mb.gif -format "%[scenes]" info: | tail -n 1 @@ -49,7 +48,6 @@ def main(): # print 'Oh dear.' - class GIFError(Exception): pass def get_gif_num_frames(filename): frames = 0 @@ -82,3 +80,4 @@ def get_gif_num_frames(filename): if __name__ == "__main__": main() + diff --git a/package.json b/package.json index 2e03029..9af02a2 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,8 @@ "description": "archive-browser", "version": "0.0.1", "dependencies": { - "express": "3.x" + "express" : "3.x", + "request" : "x.x", + "jsdom" : "x.x" } } diff --git a/public/script.js b/public/script.js index dd58657..e177204 100644 --- a/public/script.js +++ b/public/script.js @@ -1,20 +1,72 @@ + $(document).ready(function() { + + $(document.body).append('
'); + $(document.body).append('
'); + $('#scrim').click(function() { + $('#subcontent').fadeOut(100, function() { + scrim(0); + }); + }); + $.each( $('.thumbs li'), function( key, elem ) { var id = $(elem).attr('id') var thumb_static = $(elem).find('img').attr('src'); var thumb_name = thumb_static.split("/"); thumb_name = thumb_name[thumb_name.length-1]; - var img = $(elem).find('img'); - $(elem).find('a').hover(function() { + var link = $(elem).find('a'); + var img = $(link).find('img'); + var thumbs_url = $(elem).attr('data-thumbs-url'); + + link.click(function() { + scrim(1, function() { + $('#subcontent .container').empty(); + $('#subcontent').fadeIn(100); + + //console.log(thumbs_url); + + $.getJSON('/proxy/?url=' + thumbs_url, function(data) { + + console.log(data); + // var items = []; + + // $.each(data, function(key, val) { + // items.push('
  • ' + val + '
  • '); + // }); + + // $('