mirror of
https://github.com/feathericons/feather.git
synced 2023-08-10 21:13:24 +03:00
Clear gh-pages branch
This commit is contained in:
parent
dbb4c1c80c
commit
e1ea1aada8
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"><circle cx="12" cy="12" r="10"/></svg>
|
Before Width: | Height: | Size: 210 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"><rect x="2" y="4" width="20" height="16" rx="2" ry="2"/></svg>
|
Before Width: | Height: | Size: 234 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"/></svg>
|
Before Width: | Height: | Size: 234 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/></svg>
|
Before Width: | Height: | Size: 234 B |
11
index.html
11
index.html
@ -1,11 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Feather</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
21
package.json
21
package.json
@ -1,21 +0,0 @@
|
||||
{
|
||||
"name": "feather",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"dev": "webpack-dev-server"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.22.1",
|
||||
"babel-loader": "^6.2.10",
|
||||
"babel-preset-es2015": "^6.22.0",
|
||||
"css-loader": "^0.26.1",
|
||||
"stylus": "^0.54.5",
|
||||
"stylus-loader": "^2.4.0",
|
||||
"vue": "^2.1.10",
|
||||
"vue-loader": "^10.1.2",
|
||||
"vue-template-compiler": "^2.1.10",
|
||||
"vuex": "^2.1.1",
|
||||
"webpack": "^2.2.0",
|
||||
"webpack-dev-server": "^1.16.2"
|
||||
}
|
||||
}
|
21
src/App.vue
21
src/App.vue
@ -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>
|
49
src/Icon.vue
49
src/Icon.vue
@ -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>
|
@ -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>
|
@ -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>
|
25
src/main.js
25
src/main.js
@ -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/>'
|
||||
});
|
@ -1,28 +0,0 @@
|
||||
var path = require('path');
|
||||
|
||||
module.exports = {
|
||||
entry: './src/main.js',
|
||||
output: {
|
||||
path: path.resolve(__dirname),
|
||||
filename: 'bundle.js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader'
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
exclude: /node_modules/
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['*', '.js', '.vue'],
|
||||
alias: {
|
||||
'vue$': 'vue/dist/vue.common.js'
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user