Skip to content

Instantly share code, notes, and snippets.

@dheaney
Created May 9, 2013 01:25
Show Gist options
  • Select an option

  • Save dheaney/5544917 to your computer and use it in GitHub Desktop.

Select an option

Save dheaney/5544917 to your computer and use it in GitHub Desktop.
<style type="text/css">
body {
background-color: rgb(255, 45, 45);
}
table {
margin-top: 50px;
border-width: 0;
border-style: none;
border-color: #0000ff;
border-collapse: collapse;
}
td {
border-width: 0;
border-style: none;
border-color: #0000ff;
border-collapse: collapse;
padding: 0;
margin: 0;
width: 6px;
height: 6px;
}
td.black { background-color: #000; }
td.white { background-color: transparent; }
</style>
<center>
<div class="tag">
<table>
<% @qr.modules.each_index do |x| %>
<tr>
<% @qr.modules.each_index do |y| %>
<% if @qr.dark?(x,y) %>
<td class="black"/>
<% else %>
<td class="white"/>
<% end %>
<% end %>
</tr>
<% end %>
</table>
</div>
</center>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment