node-ecstatic icon indicating copy to clipboard operation
node-ecstatic copied to clipboard

[Suggestion] What about template page for directory view?

Open mmmm1998 opened this issue 6 years ago • 0 comments

@jfhbrook Now, view directory page generate by concatenation strings, so code for openDir a bit complicated for perception. Maybe better use template page? For example, concept of part of "handlebars" template page (.hbs) for generation table for directory files.

<table>
  {{#each files}}
    <tr>
      <td>
        <i class="icon {{iconType}}"></i>
      </td>
      <td class="perms">
        <code>{{permissions}}</code>
      </td>
      <td class="file-size">
        <code>{{size}}</code>
      </td>
      <td class="display-name">
        <a href={{href}}>{{name}}</a>
      </td>
    </tr>
  {{/each}}
</table>

In your opinion, whether or not to carry out such a change? P.S. Adding handlebars requires only 23 additional packages.

mmmm1998 avatar Feb 07 '18 15:02 mmmm1998