feat(widget): add follow.it widget support

This commit is contained in:
ppoffice 2021-08-01 04:24:41 +00:00
parent ffed56a9c0
commit 75973cc2dc
No known key found for this signature in database
GPG Key ID: D872802C1F2A16AA
17 changed files with 28 additions and 0 deletions

View File

@ -39,6 +39,9 @@
},
{
"$ref": "/widget/adsense.json"
},
{
"$ref": "/widget/followit.json"
}
],
"required": [

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: 'Abonnieren Sie Updates'
subscribe: 'Abonnieren'
adsense: 'Werbung'
followit: 'follow.it'
article:
created_at: 'Gepostet vor %s'
updated_at: 'Aktualisiert vor %s'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: 'Subscribe for updates'
subscribe: 'Subscribe'
adsense: 'Advertisement'
followit: 'follow.it'
article:
created_at: 'Posted %s'
updated_at: 'Updated %s'

View File

@ -25,6 +25,7 @@ widget:
subscribe_email: 'Suscríbete para recibir actualizaciones'
subscribe: 'Suscribir'
adsense: 'Anuncio'
followit: 'follow.it'
article:
created_at: 'Publicado hace %s'
updated_at: 'Actualizado hace %s'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: 'Abonnez-vous aux mises à jour'
subscribe: 'Abonnez-vous'
adsense: 'Annonce'
followit: 'follow.it'
article:
created_at: 'Publié il y a %s'
updated_at: 'Mis à jour il y a %s'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: 'Berlangganan untuk pembaruan'
subscribe: 'Berlangganan'
adsense: 'Iklan'
followit: 'follow.it'
article:
created_at: 'Diposting %s'
updated_at: 'Diperbarui %s'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: '更新を購読する'
subscribe: '購読する'
adsense: '広告'
followit: 'follow.it'
article:
created_at: '%sに投稿'
updated_at: '%sに更新'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: '업데이트 소식 받기'
subscribe: '구독'
adsense: '광고'
followit: 'follow.it'
article:
created_at: '%s 게시 됨'
updated_at: '%s 업데이트 됨'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: 'Zapisz się, aby otrzymywać aktualizacje'
subscribe: 'Subskrybuj'
adsense: 'Reklama'
followit: 'follow.it'
article:
created_at: 'Opublikowano %s'
updated_at: 'Zaktualizowano %s'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: 'Subscrição de atualizações'
subscribe: 'Se inscrever'
adsense: 'Anúncio'
followit: 'follow.it'
article:
created_at: 'Postado %s'
updated_at: 'Atualizado %s'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: 'Подпишитесь на обновления'
subscribe: 'Подписывайся'
adsense: 'Рекламное объявление'
followit: 'follow.it'
article:
created_at: 'Опубликовано %s'
updated_at: 'Обновлено %s'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: 'Täzelikler üçin ýazyl'
subscribe: 'Ýazyl'
adsense: 'Mahabat'
followit: 'follow.it'
article:
created_at: 'Paýlaşyldy %s'
updated_at: 'Üýtgedildi %s'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: 'Güncellemeler için abone olun'
subscribe: 'Abone ol'
adsense: 'İlan'
followit: 'follow.it'
article:
created_at: '%s yayınlandı'
updated_at: '%s güncellendi'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: 'Theo dõi các bản cập nhật'
subscribe: 'Theo dõi'
adsense: 'Quảng cáo'
followit: 'follow.it'
article:
created_at: 'Đã đăng %s'
updated_at: 'Đã cập nhật %s'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: '订阅更新'
subscribe: '订阅'
adsense: '广告'
followit: 'follow.it'
article:
created_at: '%s发表'
updated_at: '%s更新'

View File

@ -24,6 +24,7 @@ widget:
subscribe_email: '訂閱 Email'
subscribe: '訂閱'
adsense: '廣告'
followit: 'follow.it'
article:
created_at: '%s發表'
updated_at: '%s更新'

View File

@ -107,6 +107,14 @@ module.exports = class extends Component {
structuredImages = page.photos;
}
let followItVerificationCode = null;
if (Array.isArray(config.widgets)) {
const widget = config.widgets.find(widget => widget.type === 'followit');
if (widget) {
followItVerificationCode = widget.verification_code;
}
}
return <head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
@ -162,6 +170,8 @@ module.exports = class extends Component {
{adsenseClientId ? <script data-ad-client={adsenseClientId}
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" async></script> : null}
{followItVerificationCode ? <meta name="follow_it-verification-code" content={followItVerificationCode} /> : null}
</head>;
}
};