{"action":"created","issue":{"url":"https://api.github.com/repos/jfhbrook/node-ecstatic/issues/147","labels_url":"https://api.github.com/repos/jfhbrook/node-ecstatic/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/jfhbrook/node-ecstatic/issues/147/comments","events_url":"https://api.github.com/repos/jfhbrook/node-ecstatic/issues/147/events","html_url":"https://github.com/jfhbrook/node-ecstatic/pull/147","id":101139168,"number":147,"title":"Icons and CSS","user":{"login":"fenwick67","id":8461973,"avatar_url":"https://avatars.githubusercontent.com/u/8461973?v=3","gravatar_id":"","url":"https://api.github.com/users/fenwick67","html_url":"https://github.com/fenwick67","followers_url":"https://api.github.com/users/fenwick67/followers","following_url":"https://api.github.com/users/fenwick67/following{/other_user}","gists_url":"https://api.github.com/users/fenwick67/gists{/gist_id}","starred_url":"https://api.github.com/users/fenwick67/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fenwick67/subscriptions","organizations_url":"https://api.github.com/users/fenwick67/orgs","repos_url":"https://api.github.com/users/fenwick67/repos","events_url":"https://api.github.com/users/fenwick67/events{/privacy}","received_events_url":"https://api.github.com/users/fenwick67/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-15T04:25:54Z","updated_at":"2015-08-21T03:17:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jfhbrook/node-ecstatic/pulls/147","html_url":"https://github.com/jfhbrook/node-ecstatic/pull/147","diff_url":"https://github.com/jfhbrook/node-ecstatic/pull/147.diff","patch_url":"https://github.com/jfhbrook/node-ecstatic/pull/147.patch"},"body":"Added icons and CSS to the directory listing, with some corresponding tests.  This is what it looks like:\r\n![image](https://cloud.githubusercontent.com/assets/8461973/9287459/7af01e62-42db-11e5-8c4f-a3a3fe88ae04.png)\r\n\r\nIf the option `icons` is set to `true`, it will add some `<i>` elements with a class attribute based on the file extension.  The icons are set with CSS based on this class.  `icons` is `false` by default.\r\n\r\nThis involved adding a directory to `/lib` called `_ecstatic-assets` and serving files out of it if `showDir` is true.  Note this folder and its assets aren't shown in the directory listing.  Also this is not indexed off of `baseDir`, it is always off of the root (but I can change this).\r\n\r\nI also removed the inline styles on the table elements on the directory listing, opting for CSS instead.  This also opens the lib up for more styling, if somebody wanted to do that.  You could also theoretically put some js or other assets into `_ecstatic-assets`.\r\n\r\nOne outstanding issue, it returns a 500 error if you visit `/_ecstatic-assets` or the `/_ecstatic-assets/icons` subdirectory (the folders themselves).  I figured it makes sense not to serve the directory listing in these cases, but I'm not sure how to get it to show a 404 instead of 500."},"comment":{"url":"https://api.github.com/repos/jfhbrook/node-ecstatic/issues/comments/133263976","html_url":"https://github.com/jfhbrook/node-ecstatic/pull/147#issuecomment-133263976","issue_url":"https://api.github.com/repos/jfhbrook/node-ecstatic/issues/147","id":133263976,"user":{"login":"jfhbrook","id":57536,"avatar_url":"https://avatars.githubusercontent.com/u/57536?v=3","gravatar_id":"","url":"https://api.github.com/users/jfhbrook","html_url":"https://github.com/jfhbrook","followers_url":"https://api.github.com/users/jfhbrook/followers","following_url":"https://api.github.com/users/jfhbrook/following{/other_user}","gists_url":"https://api.github.com/users/jfhbrook/gists{/gist_id}","starred_url":"https://api.github.com/users/jfhbrook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfhbrook/subscriptions","organizations_url":"https://api.github.com/users/jfhbrook/orgs","repos_url":"https://api.github.com/users/jfhbrook/repos","events_url":"https://api.github.com/users/jfhbrook/events{/privacy}","received_events_url":"https://api.github.com/users/jfhbrook/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T03:17:43Z","updated_at":"2015-08-21T03:17:43Z","body":"uhhh what's the licensing on these icons?"}}