diff --git a/icons/code.svg b/icons/code.svg index e5d4ac6..350d4c2 100755 --- a/icons/code.svg +++ b/icons/code.svg @@ -1,3 +1,3 @@ - + diff --git a/icons/file-binary.svg b/icons/file-binary.svg index 4d62886..a2bab84 100755 --- a/icons/file-binary.svg +++ b/icons/file-binary.svg @@ -1,3 +1,3 @@ - + diff --git a/icons/file-code.svg b/icons/file-code.svg index 6e1e3ae..29cf94f 100755 --- a/icons/file-code.svg +++ b/icons/file-code.svg @@ -1,3 +1,3 @@ - + diff --git a/icons/file-directory.svg b/icons/file-directory.svg index 81acc32..1879ce7 100755 --- a/icons/file-directory.svg +++ b/icons/file-directory.svg @@ -1,3 +1,3 @@ - + diff --git a/icons/file-media.svg b/icons/file-media.svg index d56e8f7..ad2bf62 100755 --- a/icons/file-media.svg +++ b/icons/file-media.svg @@ -1,3 +1,3 @@ - + diff --git a/icons/file-pdf.svg b/icons/file-pdf.svg index ed85b64..ee47c71 100755 --- a/icons/file-pdf.svg +++ b/icons/file-pdf.svg @@ -1,3 +1,3 @@ - + diff --git a/icons/file-text.svg b/icons/file-text.svg index 1378eea..26e90a1 100755 --- a/icons/file-text.svg +++ b/icons/file-text.svg @@ -1,3 +1,3 @@ - + diff --git a/icons/file-zip.svg b/icons/file-zip.svg index 5efe503..3d2eb0f 100755 --- a/icons/file-zip.svg +++ b/icons/file-zip.svg @@ -1,3 +1,3 @@ - + diff --git a/icons/file_type_coffescript.png b/icons/file_type_coffescript.png deleted file mode 100755 index dd711bd..0000000 Binary files a/icons/file_type_coffescript.png and /dev/null differ diff --git a/icons/file_type_html.png b/icons/file_type_html.png deleted file mode 100755 index d9017fa..0000000 Binary files a/icons/file_type_html.png and /dev/null differ diff --git a/icons/gear.svg b/icons/gear.svg index 055aa13..59dead2 100755 --- a/icons/gear.svg +++ b/icons/gear.svg @@ -1,3 +1,3 @@ - + diff --git a/icons/html.svg b/icons/html.svg index acf3a8b..5f25ab6 100755 --- a/icons/html.svg +++ b/icons/html.svg @@ -1,3 +1,3 @@ - + diff --git a/icons/info.svg b/icons/info.svg deleted file mode 100755 index d4cecec..0000000 --- a/icons/info.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/icons/markdown.svg b/icons/markdown.svg index 3a3bddb..6806f21 100755 --- a/icons/markdown.svg +++ b/icons/markdown.svg @@ -1,3 +1,3 @@ - + diff --git a/icons/npm.svg b/icons/npm.svg index b5353b3..672c8f4 100755 --- a/icons/npm.svg +++ b/icons/npm.svg @@ -11,7 +11,7 @@ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="233" height="91" - id="svg2" + viewBox="0 0 233 91" version="1.1" inkscape:version="0.48.1 r9760" sodipodi:docname="npm.svg"> diff --git a/icons/ruby.svg b/icons/ruby.svg index e7afbad..a2a5202 100755 --- a/icons/ruby.svg +++ b/icons/ruby.svg @@ -1,3 +1,3 @@ - + diff --git a/icons/xml.svg b/icons/xml.svg index 7d929e3..85b9841 100755 --- a/icons/xml.svg +++ b/icons/xml.svg @@ -1,3 +1,3 @@ - + diff --git a/script.js b/script.js index 64ea609..ea7f648 100644 --- a/script.js +++ b/script.js @@ -24,11 +24,15 @@ void(function() { thead.appendChild(firstRow); table.insertBefore(thead, table.firstElementChild); + // Remove the first column and put the image in the next. var rows = toArray(table.querySelectorAll('tr')); rows.forEach(function(row) { + var div = document.createElement('div'); + div.className = 'img-wrap'; var first = row.removeChild(row.firstElementChild).firstElementChild; + div.appendChild(first); var filename = row.firstElementChild; - filename.insertBefore(first, filename.firstElementChild); + filename.insertBefore(div, filename.firstElementChild); }); // Swap special images. @@ -132,7 +136,17 @@ void(function() { var stamp = date.textContent.trim(); if (!stamp || i === 0) return; - var time = new Date(stamp); + // 2014-12-09 10:43 -> 2014, 11, 09, 10, 43, 0. + var parts = stamp.split(' '); + var day = parts[0].split('-'); + var timeOfDay = parts[1].split(':'); + var year = parseInt(day[0], 10); + var month = parseInt(day[1], 10) - 1; + var _day = parseInt(day[2], 10); + var hour = parseInt(timeOfDay[0], 10); + var minutes = parseInt(timeOfDay[1], 10); + + var time = new Date(year, month, _day, hour, minutes, 0); var difference = Math.round((now.getTime() - time.getTime()) / 1000); date.textContent = getTimeSince(difference) + ' ago'; }); diff --git a/style.css b/style.css index d4c216f..72bf0d1 100644 --- a/style.css +++ b/style.css @@ -61,16 +61,26 @@ a { text-decoration: none; color: #3498db; } + a:hover { text-decoration: underline; } + a:visited { color: #8e44ad; } -td img { + +.img-wrap { vertical-align: middle; + display: inline-block; margin-right: 8px; margin-bottom: 2px; + width: 16px; +} + +td img { + display: block; + width: 100%; height: auto; }