diff --git a/components/OneEditLink.vue b/components/OneEditLink.vue index 18f9e3a..9383795 100644 --- a/components/OneEditLink.vue +++ b/components/OneEditLink.vue @@ -13,7 +13,8 @@ rel="noopener" > - {{ t("editOnGitHub") }} + {{ t('editOnGitHub') }} + {{ t('edit') }} .one-edit-link + display inline-flex + align-items center text-decoration none transition background 0.2s, color 0.2s, border-color 0.2s + .icon + margin-left 4px + &-default display inline-flex align-items center @@ -75,9 +81,6 @@ export default { color #000 border-color #d3d9e6 - .icon - margin-left 4px - &-quiet color #282c33 @@ -87,4 +90,16 @@ export default { &:active color #000 + + &.full + display inline + &.short + display none + +@media (max-width 480px) + .one-edit-link-quiet + .full + display none + .short + display inline diff --git a/plugins/l10n.js b/plugins/l10n.js index 54a1cb1..dfd1110 100644 --- a/plugins/l10n.js +++ b/plugins/l10n.js @@ -49,7 +49,8 @@ i18n.register( i18n.register( 'zh-Hans', { - editOnGitHub: '在 GitHub 上编辑此页' + editOnGitHub: '在 GitHub 上编辑此页', + edit: '编辑' }, { ns: 'oneeditlink' @@ -59,7 +60,8 @@ i18n.register( i18n.register( 'en-US', { - editOnGitHub: 'Edit this page on GitHub' + editOnGitHub: 'Edit this page on GitHub', + edit: 'Edit' }, { ns: 'oneeditlink'