Add file type icons

This commit is contained in:
2017-11-09 00:48:59 +01:00
parent 939dce2b1f
commit ff2f44df18
9 changed files with 47 additions and 3 deletions

View File

@@ -8,6 +8,7 @@
<tbody>
{{#each items as |item|}}
<tr>
<td class="icon">{{item-icon type=item.type}}</td>
<td class="name">{{item.name}}</td>
<td class="type">{{item.type}}</td>
</tr>

View File

@@ -0,0 +1,9 @@
import Component from '@ember/component';
export default Component.extend({
classNames: ['item-icon'],
type: null,
});

View File

@@ -0,0 +1 @@
<img src="/img/file-icons/{{type}}.svg">

View File

@@ -11,4 +11,5 @@ body {
padding: 0;
}
@import "components/directory_listing";
@import "components/directory-listing";
@import "components/item-icon";

View File

@@ -18,6 +18,10 @@
td {
padding: 1rem 1.5rem;
&.icon {
width: 1rem;
padding-right: 0;
}
&.type {
color: #aaa;
}

View File

@@ -0,0 +1,8 @@
.item-icon {
img {
height: 1.2rem;
vertical-align: middle;
}
}