From 4d0d08112f023a5779178399bb589988c2bcb939 Mon Sep 17 00:00:00 2001 From: Michele Bini Date: Sun, 28 Sep 2014 12:37:19 +0200 Subject: Mix work diff --git a/game.html b/game.html index 6beb722..f34a393 100644 Binary files a/game.html and b/game.html differ diff --git a/game.html.coffee b/game.html.coffee index bfb197b..548d797 100644 --- a/game.html.coffee +++ b/game.html.coffee @@ -16,16 +16,19 @@ htmlcup[x] = htmlcup.compileTag x for x in [ "svg", "rect", "g", "ellipse", "polygon", "line", "image", "defs", "linearGradient", "stop", "use" ] -title = "V the Vaquita" +title = "Vilma the Vaquita" fs = require 'fs' -datauri = (t, x)-> "data:#{x};base64,#{new Buffer(x).toString("base64")}" +datauri = (t, x)-> "data:#{t};base64,#{new Buffer(fs.readFileSync(x)).toString("base64")}" +datauripng = (x)-> datauri "image/png", x +datauriicon = (x)-> datauri "image/x-icon", x -icon = "vaquita.ico" -icon = datauri("image/x-icon", fs.readFileSync(icon)) -pixyvaquita = "pixyvaquita.png" -pixyvaquita = "data:image/png;base64," + (new Buffer(fs.readFileSync(pixyvaquita))).toString("base64") +icon = datauriicon "vaquita.ico" +pixyvaquita = datauripng "pixyvaquita_v2.png" +frames = + _: pixyvaquita + twistleft: datauripng "pixyvaquita_v2_twistleft.png" useSvg = true @@ -164,13 +167,14 @@ genPage = -> @stop offset:"50%", style:"stop-color:rgb(0,80,240);stop-opacity:1" @stop offset:"75%", style:"stop-color:rgb(0,0,180);stop-opacity:1" @stop offset:"100%", style:"stop-color:rgb(0,0,0);stop-opacity:1" - @g id:"vaquita", -> + for k,v of frames + @g id:k, -> @g transform:"translate(-18,-15)", -> - @image width:"50", height:"30", "xlink:href":pixyvaquita + @image width:"50", height:"30", "xlink:href":v @rect x:"0", y:"0", width:"960", height:"720", fill:"url(#grad1)" @g transform:"scale(2)", -> @g id:"sea", transform:"translate(240,180)", -> - @use "xlink:href":"#vaquita" + @use "xlink:href":"#_" else @canvas width:"960", height:"720", -> @div -> @a class:"support-vaquitas", target:"_blank", href:"index.html", "Learn about Vaquitas" diff --git a/index.html b/index.html index df7a922..7094f6e 100644 --- a/index.html +++ b/index.html @@ -77,6 +77,9 @@ a:hover { vertical-align:middle; max-width:100%; } +.dynamic-section.dynsec-vertical { + display: block; +} .flip-lr { -moz-transform: scaleX(-1); -o-transform: scaleX(-1); @@ -94,4 +97,4 @@ a:hover { image-rendering:crisp-edges; /* CSS4 Proposed */ image-rendering:pixelated; /* CSS4 Proposed */ -ms-interpolation-mode:nearest-neighbor; /* IE8+ */ -}

Please don't kill this baby!

Vaquitas are the smallest and rarest marine cetacean, they are mammalians like us.

Their population has decreased from an estimated 576 in 1997 to 97 individuals in 2014, which means that could be extinct as early as 2017

A really protected marine sanctuary is Vaquitas' only chance of survival; each year literally tens of them die in fishing nets; according to recent research, this is because of the illegal fishing of Totoaba

Vaquitas only live in a small area of the Gulf of California and share their habitat with the Totoaba

Petition you can sign: Ocean Conservancy .org: Save the vaquita from extinction!

Commemorative video of a baby Vaquita

\ No newline at end of file +}

Please don't kill this baby!

Vaquitas are the smallest and rarest marine cetacean, they are mammalians like us.

Their population has decreased from an estimated 576 in 1997 to 97 individuals in 2014, which means that could be extinct as early as 2017

A really protected marine sanctuary is Vaquitas' only chance of survival; each year literally tens of them die in fishing nets; according to recent research, this is because of the illegal fishing of Totoaba

Vaquitas only live in a small area of the Gulf of California and share their habitat with the Totoaba

Petition you can sign: Ocean Conservancy .org: Save the vaquita from extinction!

Commemorative video of a baby Vaquita

Vilma the Vaquita - demo game
\ No newline at end of file diff --git a/index.html.coffee b/index.html.coffee index 0fab89f..b76bb1a 100644 --- a/index.html.coffee +++ b/index.html.coffee @@ -18,10 +18,13 @@ title = "Vaquitas need you!" fs = require 'fs' -icon = "vaquita.ico" -icon = "data:image/x-icon;base64," + (new Buffer(fs.readFileSync(icon))).toString("base64") -pixyvaquita = "pixyvaquita.png" -pixyvaquita = "data:image/png;base64," + (new Buffer(fs.readFileSync(pixyvaquita))).toString("base64") +datauri = (t, x)-> "data:#{t};base64,#{new Buffer(fs.readFileSync(x)).toString("base64")}" +datauripng = (x)-> datauri "image/png", x +datauriicon = (x)-> datauri "image/x-icon", x + +icon = datauriicon "vaquita.ico" +pixyvaquita = datauripng "pixyvaquita_v2.png" +pixyvaquita2 = datauripng "pixyvaquita_v105_v.png" htmlcup.html5Page -> @head -> @@ -108,6 +111,9 @@ htmlcup.html5Page -> vertical-align:middle; max-width:100%; } + .dynamic-section.dynsec-vertical { + display: block; + } .flip-lr { -moz-transform: scaleX(-1); -o-transform: scaleX(-1); @@ -132,8 +138,6 @@ htmlcup.html5Page -> @section class:"centered", -> @section class:"dynamic-section", -> @img class:"banner", src:"vaquita1.jpg", title:"This vaquita was set free by a mysterious artist who prefers to stay anonymous ☺" - @br() - @img src:pixyvaquita, title:"Please be our friend!", width:"150", height:"90", class:"flip-lr pixelart" @section class:"dynamic-section", -> @p "Please don't kill this baby!" @p -> @@ -145,9 +149,14 @@ htmlcup.html5Page -> @p class:"petition", -> @span 'Petition you can sign: ' @a + target:"_blank" # href: 'http://www.thepetitionsite.com/569/482/287/extend-protections-for-critically-endangered-vaquita-porpoises/', "Extend Protections for Critically Endangered Vaquita Porpoises" href:'http://act.oceanconservancy.org/site/MessageViewer?dlv_id=41469&em_id=30824.0&', "Ocean Conservancy .org: Save the vaquita from extinction!" @p -> @a href: 'http://www.youtube.com/watch?v=27pJ2S5RT8g', "Commemorative video of a baby Vaquita" + @section class:"dynamic-section dynsec-vertical", -> + @img src:pixyvaquita, title:"Please be our friend!", width:"150", height:"90", class:"flip-lr pixelart" + @a href:"game.html", "Vilma the Vaquita - demo game" + @img src:pixyvaquita2, title:"Play with us!", width:"150", height:"90", class:"pixelart" diff --git a/pixyvaquita_v105_v.png b/pixyvaquita_v105_v.png new file mode 100644 index 0000000..b20fb0d Binary files /dev/null and b/pixyvaquita_v105_v.png differ diff --git a/pixyvaquita_v2.png b/pixyvaquita_v2.png new file mode 100644 index 0000000..6fcb5d8 Binary files /dev/null and b/pixyvaquita_v2.png differ diff --git a/pixyvaquita_v2_twistleft.png b/pixyvaquita_v2_twistleft.png new file mode 100644 index 0000000..c02b719 Binary files /dev/null and b/pixyvaquita_v2_twistleft.png differ -- cgit v0.10.2