Adding the rest of the CSS features
This commit is contained in:
parent
7f3597b888
commit
03e971872f
|
@ -1,4 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
yarn build
|
yarn watch
|
||||||
yarn dev
|
|
|
@ -8,6 +8,7 @@
|
||||||
"build": {
|
"build": {
|
||||||
"patterns": [
|
"patterns": [
|
||||||
"src/**/*.js",
|
"src/**/*.js",
|
||||||
|
"src/**/*.vue",
|
||||||
"../../index.js"
|
"../../index.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,9 @@ import Vue from 'vue'
|
||||||
import App from './library/App.vue'
|
import App from './library/App.vue'
|
||||||
import fontawesome from '@fortawesome/fontawesome'
|
import fontawesome from '@fortawesome/fontawesome'
|
||||||
import brands from '@fortawesome/fontawesome-brands'
|
import brands from '@fortawesome/fontawesome-brands'
|
||||||
import { faCoffee, faCog } from '@fortawesome/fontawesome-solid'
|
import { faCoffee, faCog, faSpinner, faQuoteLeft, faSquare, faCheckSquare } from '@fortawesome/fontawesome-solid'
|
||||||
|
|
||||||
fontawesome.library.add(brands, faCoffee, faCog)
|
fontawesome.library.add(brands, faCoffee, faCog, faSpinner, faQuoteLeft, faSquare, faCheckSquare)
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
|
|
|
@ -4,7 +4,28 @@
|
||||||
<font-awesome-icon pack="fab" name="font-awesome" />
|
<font-awesome-icon pack="fab" name="font-awesome" />
|
||||||
<font-awesome-icon pack="fas" name="coffee" />
|
<font-awesome-icon pack="fas" name="coffee" />
|
||||||
<font-awesome-icon pack="fas" name="cog" :spin="true" :fixed-width="false" />
|
<font-awesome-icon pack="fas" name="cog" :spin="true" :fixed-width="false" />
|
||||||
|
<font-awesome-icon pack="fab" name="fort-awesome" size="4x" />
|
||||||
|
<font-awesome-icon pack="fas" name="spinner" :pulse="true" :fixed-width="true" />
|
||||||
|
<font-awesome-icon pack="fab" name="fort-awesome" :rotation="90" />
|
||||||
|
<font-awesome-icon pack="fab" name="internet-explorer" flip="both" />
|
||||||
</h1>
|
</h1>
|
||||||
|
<div>
|
||||||
|
<p>
|
||||||
|
<font-awesome-icon pack="fas" name="quote-left" size="2x" :border="true" pull="left" />...tomorrow we
|
||||||
|
will run faster, stretch out our arms farther...And then one fine morning— So we beat on, boats
|
||||||
|
against the current, borne back ceaselessly into the past.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p>
|
||||||
|
<ul class="fa-ul">
|
||||||
|
<li><font-awesome-icon pack="fas" name="check-square" :list-item="true" />List icons</li>
|
||||||
|
<li><font-awesome-icon pack="fas" name="check-square" :list-item="true" />can be used</li>
|
||||||
|
<li><font-awesome-icon pack="fas" name="square" :list-item="true" />as bullets</li>
|
||||||
|
<li><font-awesome-icon pack="fas" name="square" :list-item="true" />in lists</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -24,8 +45,14 @@ export default {
|
||||||
#app {
|
#app {
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
text-align: center;
|
|
||||||
color: #2c3e50;
|
color: #2c3e50;
|
||||||
margin-top: 60px;
|
margin-top: 60px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
display: inline-block;
|
||||||
|
width: 250px;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@fortawesome/vue-fontawesome",
|
"name": "@fortawesome/vue-fontawesome",
|
||||||
"version": "0.0.3",
|
"version": "0.0.4",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "robmadole <robmadole@gmail.com>",
|
"author": "robmadole <robmadole@gmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -5,23 +5,55 @@ export default {
|
||||||
name: 'FontAwesomeIcon',
|
name: 'FontAwesomeIcon',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
name: {
|
border: {
|
||||||
type: String,
|
type: Boolean,
|
||||||
default: ''
|
default: false
|
||||||
},
|
},
|
||||||
pack: {
|
fixedWidth: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
flip: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'fa'
|
default: null,
|
||||||
|
validator: (value) => ['horizontal', 'vertical', 'both'].indexOf(value) > -1
|
||||||
},
|
},
|
||||||
iconDefinition: {
|
iconDefinition: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
spin: {
|
listItem: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
fixedWidth: {
|
pack: {
|
||||||
|
type: String,
|
||||||
|
default: 'fa'
|
||||||
|
},
|
||||||
|
pull: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
validator: (value) => ['right', 'left'].indexOf(value) > -1
|
||||||
|
},
|
||||||
|
pulse: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
rotation: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
validator: (value) => [90, 180, 270].indexOf(value) > -1
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
validator: (value) => ['lg', 'xs', 'sm', '1x', '2x', '3x', '4x', '5x', '6x', '7x', '8x', '9x', '10x'].indexOf(value) > -1
|
||||||
|
},
|
||||||
|
spin: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
|
@ -50,7 +82,15 @@ export default {
|
||||||
classList () {
|
classList () {
|
||||||
let classes = {
|
let classes = {
|
||||||
'fa-spin': this.spin,
|
'fa-spin': this.spin,
|
||||||
'fa-fw': this.fixedWidth
|
'fa-pulse': this.pulse,
|
||||||
|
'fa-fw': this.fixedWidth,
|
||||||
|
'fa-border': this.border,
|
||||||
|
'fa-li': this.listItem,
|
||||||
|
'fa-flip-horizontal': this.flip === 'horizontal' || this.flip === 'both',
|
||||||
|
'fa-flip-vertical': this.flip === 'vertical' || this.flip === 'both',
|
||||||
|
[`fa-${this.size}`]: this.size !== null,
|
||||||
|
[`fa-rotate-${this.rotation}`]: this.rotation !== null,
|
||||||
|
[`fa-pull-${this.pull}`]: this.pull !== null
|
||||||
}
|
}
|
||||||
|
|
||||||
return Object.keys(classes)
|
return Object.keys(classes)
|
||||||
|
|
Loading…
Reference in New Issue