Skip to content

Commit

Permalink
Add UI for sidebar buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
joerick committed Aug 12, 2016
1 parent 3d98b46 commit 7bd7461
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 3 deletions.
57 changes: 54 additions & 3 deletions app/src/components/Sidebar.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,62 @@
<template>
<div class="left" id="sidebar" v-on:drop="fileDropped">
<template v-for="file in root.sortedFiles">
<file :file="file"></file>
</template>
<div class="sidebar-files">
<template v-for="file in root.sortedFiles">
<file :file="file"></file>
</template>
</div>
<div class="sidebar-button-bar">
<a class="sidebar-button" title="New file">
<i class="fa fa-file-code-o" style="transform: translateY(0px)"></i>
</a>
<a class="sidebar-button" title="New folder">
<i class="fa fa-folder-o" style="transform: translateY(1px)"></i>
</a>
<a class="sidebar-button import" title="Import…">
<img class="import-icon" style="transform: translateY(2px)"/>
</a>
</div>
</div>
</template>

<style>
.sidebar-files {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 26px;
}
.sidebar-button-bar {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 26px;
background-color: #252525;
font-size: 0;
padding: 0 5px;
}
.sidebar-button {
box-sizing: border-box;
width: 21px;
height: 26px;
display: inline-block;
color: rgba(255,255,255,0.3);
font-size: 12px;
padding: 5px;
}
.sidebar-button:hover {
color: white;
}
.import-icon {
-webkit-mask-box-image: url(../../static/img/import.png);
background-color: currentColor;
width: 15px;
height: 14px;
}
</style>

<script>
import File from './File.vue'
Expand Down
Binary file added app/static/img/import.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ module.exports = {
}, {
test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: "file-loader"
}, {
test: /\.(png|jpg|gif)$/,
loader: "file-loader"
}, {
test: /\.node$/,
loader: "node-loader"
Expand Down

0 comments on commit 7bd7461

Please sign in to comment.