senchalabs/connect — pull request #968 by simov (2013-12-02 22:52:44+00:00)
Title: Directory Middleware Improvements:

More information about this pull request: https://github.com/senchalabs/connect/pull/734

#### Features
- details and mobile views
- include icon images only once from css

#### Details
- The new option is called `view` and defaults to `tiles`

```js
.use(connect.directory('/root', {icons:true, view:'details'))
```
- The `iconStyle` function means `css styles for the icons` and is responsible for embedding the icons inside the document only once. Right now each image is pushed 3 times for each view respectively because the initial idea was to have dynamic view change and icon size.
- The icons in the mobile view need to be 32x32 px, that's why they are looking too small at the moment, if the 16x16 images is stretched to 32px they look blurred. Other than that the css is just copy/pasted. I haven't changed anything in the default styles, just a little bit cleanup here and there, the bottom of the file contains the new styles.
- The `html` function is responsible only for generating the html, the images are added inside `iconStyle`. The changes are just a bunch of html tags + classes for styling.