cciollaro / github-grid

draw a github commit frequency chart (the blocky chart in shades of green on your homepage) in this UI, and it will produce git commits in a fake repo for you to push to github
http://cciollaro.github.io/github-grid/
1 stars 1 forks source link

Custom image selection and add dragging controls #1

Closed vgmoose closed 10 years ago

vgmoose commented 10 years ago

This pull request does three things, despite the title only mentioning two:

  1. allow the user to drag along the grid to draw; drawing over an already filled tile darkens it
  2. allow the user to select their own image to be converted into grid form
  3. move the javascript and css code around into separate files because more files mean business

Sample image that can be used (this is 50x7 pixels): untitled-2

The output from that small image: screen shot 2014-07-19 at 1 45 04 am

Sample output from a larger (regular sized) image: screen shot 2014-07-19 at 1 24 49 am

vgmoose commented 10 years ago

I've filled in the export button to generate a .sh script download that will generate the commands to create the git project. It still does not perfectly, however.

beefdad_big becomes screen shot 2014-07-20 at 9 58 52 am in the preview.

The function generates an sh script based off the grid in memory, and then creates a downloadable datauri of the script. Here is the result of the script from the above images being run and the project being uploaded to a new github:

screen shot 2014-07-20 at 10 16 38 am