Clear gh-pages branch

This commit is contained in:
Cole Bemis
2017-02-21 22:45:06 -08:00
parent dbb4c1c80c
commit e1ea1aada8
14 changed files with 0 additions and 9251 deletions

View File

@ -1,21 +0,0 @@
<template>
<div>
<icon-grid :icons="icons"></icon-grid>
</div>
</template>
<script>
import {mapState} from 'vuex';
import IconGrid from './IconGrid';
export default {
name: 'App',
components: {IconGrid},
computed: mapState(['icons'])
}
</script>
<style lang="stylus">
body
margin 0
</style>

View File

@ -1,49 +0,0 @@
<template>
<div class="icon"></div>
</template>
<script>
export default {
name: 'Icon',
props: {
name: {
type: String,
required: true
},
size: {
type: String,
default: '24'
}
},
mounted() {
fetch(`./icons/${this.name}.svg`)
.then(response => {
if (response.ok) {
return response.text();
}
throw new Error(`Cannot find ${this.name}.svg`);
})
.then(svgText => {
const svgDocument = new DOMParser().parseFromString(svgText, 'image/svg+xml');
const svgIcon = svgDocument.querySelector('svg').cloneNode(true);
svgIcon.setAttribute('width', this.size);
svgIcon.setAttribute('height', this.size);
this.$el.appendChild(svgIcon);
})
.catch(error => {
console.error(error);
});
}
}
</script>
<style lang="stylus">
.icon
display inline-block
line-height 0
.icon > svg
stroke currentColor
</style>

View File

@ -1,22 +0,0 @@
<template>
<div class="icon-container">
<a :href="`icons/${name}.svg`" download>
<icon :name="name" size="48"></icon>
</a>
</div>
</template>
<script>
import Icon from './Icon';
export default {
name: 'IconContainer',
components: {Icon},
props: {
name: {
type: String,
required: true
}
}
}
</script>

View File

@ -1,20 +0,0 @@
<template>
<div>
<icon-container v-for="icon in icons" :name="icon"></icon-container>
</div>
</template>
<script>
import IconContainer from './IconContainer';
export default {
name: 'IconGrid',
components: {IconContainer},
props: {
icons: {
type: Array,
required: true
}
}
}
</script>

View File

@ -1,25 +0,0 @@
import Vue from 'vue';
import Vuex from 'vuex';
import App from './App';
const icons = [
'square',
'circle',
'rectangle-vertical',
'rectangle-horizontal'
];
Vue.use(Vuex);
const store = new Vuex.Store({
state: {
icons
}
});
new Vue({
el: '#app',
store,
components: {App},
template: '<app/>'
});