fix social script typos
This commit is contained in:
parent
1f51ef9668
commit
53ba5eb186
@ -74,11 +74,11 @@ Vue.component('social-list', {
|
|||||||
props: ['platforms'],
|
props: ['platforms'],
|
||||||
|
|
||||||
template: `
|
template: `
|
||||||
<ul class="social-list flex">
|
<ul class="social-list flex" v-if="this.platforms.length">
|
||||||
<span v-if="this.platforms.length" class="follow-label">Follow me: </span>
|
<span class="follow-label">Follow me: </span>
|
||||||
<user-social-icon
|
<user-social-icon
|
||||||
v-for="(item, index) in this.platforms"
|
v-for="(item, index) in this.platforms"
|
||||||
v-if="item.platform && item.handle"
|
v-if="item.platform && item.url"
|
||||||
v-bind:key="index"
|
v-bind:key="index"
|
||||||
v-bind:platform="item.platform"
|
v-bind:platform="item.platform"
|
||||||
v-bind:url="item.url"
|
v-bind:url="item.url"
|
||||||
@ -93,23 +93,21 @@ Vue.component('user-social-icon', {
|
|||||||
data: function() {
|
data: function() {
|
||||||
const platformInfo = SOCIAL_PLATFORMS[this.platform.toLowerCase()];
|
const platformInfo = SOCIAL_PLATFORMS[this.platform.toLowerCase()];
|
||||||
const inList = !!platformInfo;
|
const inList = !!platformInfo;
|
||||||
const imgRow = platformInfo.imgPos && platformInfo.imgPos[0] || 0;
|
const imgRow = inList ? platformInfo.imgPos[0] : 0;
|
||||||
const imgCol = platformInfo.imgPos && platformInfo.imgPos[1] || 0;
|
const imgCol = inList ? platformInfo.imgPos[1] : 0;
|
||||||
c
|
|
||||||
return {
|
return {
|
||||||
name: inList ? platformInfo.name : this.platform,
|
name: inList ? platformInfo.name : this.platform,
|
||||||
link: url,
|
link: this.url,
|
||||||
|
|
||||||
style: `--imgRow: -${imgRow}; --imgCol: -${imgCol};`,
|
style: `--imgRow: -${imgRow}; --imgCol: -${imgCol};`,
|
||||||
itemClass: {
|
itemClass: {
|
||||||
"user-social-item": true,
|
"user-social-item": true,
|
||||||
"flex": true,
|
"flex": true,
|
||||||
"rounded": inList,
|
"use-default": !inList,
|
||||||
"use-default": inList,
|
|
||||||
},
|
},
|
||||||
labelClass: {
|
labelClass: {
|
||||||
"platform-label": true,
|
"platform-label": true,
|
||||||
"visually-hidden": !inList,
|
"visually-hidden": inList,
|
||||||
"text-indigo-800": true,
|
"text-indigo-800": true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user