-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
export default { | ||
data: { | ||
file: { | ||
name: '/', | ||
type: 'folder', | ||
children: [ | ||
{ | ||
name: 'foo.jpg', | ||
type: 'image' | ||
}, | ||
{ | ||
name: 'bar.jpg', | ||
type: 'image' | ||
}, | ||
{ | ||
name: 'baz', | ||
type: 'folder', | ||
children: [ | ||
{ | ||
name: '.DS_Store', | ||
type: 'junk' | ||
}, | ||
{ | ||
name: 'README.md', | ||
type: 'markdown' | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
|
||
html: ` | ||
<article class='file folder'> | ||
<span class='name'>/</span> | ||
<ul> | ||
<li> | ||
<article class='file image'> | ||
<span class='name'>foo.jpg</span> | ||
</article> | ||
</li><li> | ||
<article class='file image'> | ||
<span class='name'>bar.jpg</span> | ||
</article> | ||
</li><li> | ||
<article class='file folder'> | ||
<span class='name'>baz</span> | ||
<ul> | ||
<li> | ||
<article class='file junk'> | ||
<span class='name'>.DS_Store</span> | ||
</article> | ||
</li><li> | ||
<article class='file markdown'> | ||
<span class='name'>README.md</span> | ||
</article> | ||
</li> | ||
</ul> | ||
</article> | ||
</li> | ||
</ul> | ||
</article> | ||
` | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<article class='file {{file.type}}'> | ||
<span class='name'>{{file.name}}</span> | ||
|
||
{{#if file.type === 'folder'}} | ||
<ul> | ||
{{#each file.children as child}} | ||
<li><:Self file='{{child}}'/></li> | ||
{{/each}} | ||
</ul> | ||
{{/if}} | ||
</article> |