diff options
Diffstat (limited to 'juick-www/src/main/static/scripts.js')
-rw-r--r-- | juick-www/src/main/static/scripts.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js index b275e446..1fec803e 100644 --- a/juick-www/src/main/static/scripts.js +++ b/juick-www/src/main/static/scripts.js @@ -46,6 +46,9 @@ function autosize(el) { el.attachEvent('onkeyup', () => resize(el)); } } +function svgIconHtml(name) { + return `<div class="icon icon--ei-${name} icon--s "><svg class="icon__cnt"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#ei-${name}-icon"></use></svg></div>`; +} /* eslint-disable only-ascii/only-ascii */ const translations = { @@ -69,7 +72,7 @@ const translations = { 'loginDialog.registeredAlready': 'Registered already?', 'loginDialog.username': 'Username', 'loginDialog.password': 'Password', - 'loginDialog.vk': 'vk.com', + 'loginDialog.vk': 'Login with VK', 'error.error': 'Error' }, 'ru': { @@ -92,7 +95,7 @@ const translations = { 'loginDialog.registeredAlready': 'Уже зарегистрированы?', 'loginDialog.username': 'Имя пользователя', 'loginDialog.password': 'Пароль', - 'loginDialog.vk': 'ВКонтакте', + 'loginDialog.vk': 'Войти через ВКонтакте', 'error.error': 'Ошибка' } }; @@ -451,10 +454,9 @@ function showMessageLinksDialog(mid, rid) { ${i18n('shareDialog.messageNumber')}: <div onclick="this.selectText()" class="dialogl">${mlink}</div> ${i18n('shareDialog.share')}: <ul> - <li><a href="https://www.facebook.com/sharer/sharer.php?u=${hlinkenc}" onclick="return openSocialWindow(this)"></a></li> - <li><a href="https://twitter.com/intent/tweet?url=${hlinkenc}" onclick="return openSocialWindow(this)" style="background-position: -32px 0;"></a></li> - <li><a href="https://vk.com/share.php?url=${hlinkenc}" onclick="return openSocialWindow(this)" style="background-position: -64px 0;"></a></li> - <li><a href="https://plus.google.com/share?url=${hlinkenc}" onclick="return openSocialWindow(this)" style="background-position: -96px 0;"></a></li> + <li><a href="https://www.facebook.com/sharer/sharer.php?u=${hlinkenc}" onclick="return openSocialWindow(this)">${svgIconHtml('sc-facebook')}</a></li> + <li><a href="https://twitter.com/intent/tweet?url=${hlinkenc}" onclick="return openSocialWindow(this)">${svgIconHtml('sc-twitter')}</a></li> + <li><a href="https://vk.com/share.php?url=${hlinkenc}" onclick="return openSocialWindow(this)">${svgIconHtml('sc-vk')}</a></li> </ul> </div>`; @@ -541,10 +543,9 @@ function checkUsername() { function openDialogLogin() { let html = ` <div class="dialoglogin"> - <p>${i18n('loginDialog.pleaseIntroduceYourself')}: - <a href="/_fblogin" id="signfb">Facebook</a> - <a href="/_vklogin" id="signvk">${i18n('loginDialog.vk')}</a> - </p> + <p>${i18n('loginDialog.pleaseIntroduceYourself')}:</p> + <a href="/_fblogin" id="signfb">${svgIconHtml('sc-facebook')}Login with Facebook</a> + <a href="/_vklogin" id="signvk">${svgIconHtml('sc-vk')}${i18n('loginDialog.vk')}</a> <p>${i18n('loginDialog.registeredAlready')}</p> <form action="/login" method="POST"> <input class="signinput" type="text" name="username" placeholder="${i18n('loginDialog.username')}"/><br/> |