aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/static/scripts.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-10-26 01:20:44 +0300
committerGravatar Vitaly Takmazov2017-10-26 01:20:44 +0300
commitd9474528d8045da9decaf1ad0361f6dd90194672 (patch)
treee90e0775b3f77d52d9091498c14d1e6c9334d316 /juick-www/src/main/static/scripts.js
parenta99cee4ce10ebb60ce82c395a179fcb7183e382c (diff)
www: drop social bitmaps
Diffstat (limited to 'juick-www/src/main/static/scripts.js')
-rw-r--r--juick-www/src/main/static/scripts.js21
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/>