Skip to content

Akmal / feat: update footer layout and styles #1162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/images/pages/footer/ic-account-limits.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/images/pages/footer/ic-responsible-trading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/images/pages/footer/ic-security.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/images/pages/footer/ic-verification.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/javascript/app/base/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,14 @@ const Header = (() => {
el.src = Url.urlForStatic(`${header_icon_base_path}ic-livechat.svg?${process.env.BUILD_HASH}`);
});

applyToAllElements('.security-icon', (el) => {
el.src = Url.urlForStatic(`${header_icon_base_path}ic-security.svg?${process.env.BUILD_HASH}`);
});

applyToAllElements('.speed-icon', (el) => {
el.src = Url.urlForStatic(`${header_icon_base_path}ic-verification.svg?${process.env.BUILD_HASH}`);
});

applyToAllElements('.btn__close', (el) => {
el.src = Url.urlForStatic(`${header_icon_base_path}ic-close.svg?${process.env.BUILD_HASH}`);
});
Expand Down Expand Up @@ -936,6 +944,14 @@ const Header = (() => {
const topbar_whatsapp = getElementById('topbar-whatsapp');
topbar_whatsapp.addEventListener('click', () => window.open('https://wa.me/35699578341', '_blank'));

// Responsible Trading.
const topbar_responsible_trading = getElementById('topbar-responsible-trading');
topbar_responsible_trading.addEventListener('click', () => window.open('https://deriv.com/responsible', '_blank'));

// Account Limits.
const topbar_account_limits = getElementById('topbar-account-limits');
topbar_account_limits.addEventListener('click', () => window.open('https://app.deriv.com/account/account-limits', '_blank'));

// Topbar fullscreen events.
const topbar_fullscreen = getElementById('topbar-fullscreen');
topbar_fullscreen.addEventListener('click', toggleFullscreen);
Expand Down
52 changes: 44 additions & 8 deletions src/sass/_common/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ body .topbar {
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 36px;
padding: 0;
color: $COLOR_BLACK;
Expand All @@ -30,7 +33,7 @@ body .topbar {
display: flex;
align-items: center;
height: 36px;
margin: 0 0.8em;
padding: 0 10px;

div, span {
display: inline-flex;
Expand All @@ -40,9 +43,10 @@ body .topbar {
width: 42px;
cursor: default;
}
#topbar-help-centre, #topbar-fullscreen {
#topbar-help-centre, #topbar-fullscreen, #topbar-responsible-trading, #topbar-account-limits, #topbar-whatsapp {
height: inherit;
cursor: pointer;
padding: 0 8px;

&:hover {
background-color: var(--general-hover);
Expand All @@ -51,7 +55,6 @@ body .topbar {
width: 16px;
height: 16px;
align-self: center;
padding: 0 0.8rem;
}
}
#topbar-help-centre {
Expand All @@ -62,6 +65,27 @@ body .topbar {
border-left-color: var(--general-hover);
}
}
#language-select {
display: flex;
align-items: center;
cursor: pointer;
height: inherit;
padding: 0 8px;

&:hover {
background-color: var(--general-hover);
}
img {
width: 16px;
height: 12px;
margin-right: 4px;
}
#language-select__text {
font-size: 12px;
font-weight: bold;
color: $COLOR_BLACK;
}
}
}
[data-balloon] {
&:before {
Expand Down Expand Up @@ -102,8 +126,11 @@ body .topbar {
.gmt-clock {
font-size: 0.75rem;
font-weight: 100;
padding: 0 0.8em;
padding: 0 12px;
margin-right: 12px;
width: 147px;
height: 16px;
border-left: 1px solid var(--general-section-1);
cursor: default;
}
#contact-us, .upgrademessage {
Expand Down Expand Up @@ -144,7 +171,6 @@ body .topbar {
height: inherit;

img {
padding: 0 0.8rem;
width: 24px;
height: 16px;
border-left: 1px solid var(--general-section-1);
Expand All @@ -161,17 +187,27 @@ body .topbar {
height: inherit;

img {
padding: 0 0.4rem;
width: 16px;
height: 16px;
border-left: 1px solid var(--general-section-1);
border-right: 1px solid var(--general-section-1);
}
&:hover {
background-color: var(--general-hover);
}
}

#deriv_livechat {
padding: 0 8px;
}

#topbar-help-centre, #topbar-whatsapp {
padding-left: 0 !important;

img {
padding-left: 8px;
border-left: 1px solid var(--general-section-1);
}
}

body .header, .wallet__header {
position: fixed;
background-color: var(--general-main-1);
Expand Down
23 changes: 16 additions & 7 deletions src/templates/_common/_layout/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,28 @@ const InnerContent = () => (
const Topbar = () => (
<div className='no-print primary-bg-color-dark topbar mobile-hide'>
<div id='topbar-info'>
<div id='network_status_wrapper' className='no-underline' data-balloon-pos='up'>
<div id='network_status_wrapper' className='no-underline' data-balloon='Connection Status' data-balloon-pos='up'>
<div className='network_status' />
</div>
<div id='language-select'><img id='language-select__logo' /></div>
<span className='no-underline nowrap gmt-clock' data-balloon-pos='up' />
<div id='topbar-whatsapp'>
<span className='no-underline nowrap gmt-clock' data-balloon='Server Time' data-balloon-pos='up' />
<div id='topbar-whatsapp' data-balloon='WhatsApp' data-balloon-pos='up'>
<img src={it.url_for('images/pages/footer/ic-whatsapp.svg')} />
</div>
<div id='deriv_livechat' />
<div id='topbar-help-centre'>
<div id='deriv_livechat' data-balloon='Live chat' data-balloon-pos='up' />
<div id='topbar-responsible-trading' data-balloon='Responsible trading' data-balloon-pos='up'>
<img src={it.url_for('images/pages/footer/ic-responsible-trading.svg')} />
</div>
<div id='topbar-account-limits' data-balloon='Account limits' data-balloon-pos='up'>
<img src={it.url_for('images/pages/footer/ic-account-limits.svg')} />
</div>
<div id='topbar-help-centre' data-balloon='Help centre' data-balloon-pos='up'>
<img src={it.url_for('images/pages/footer/ic-help-centre.svg')} />
</div>
<div id='topbar-fullscreen'>
<div id='language-select' data-balloon='Language' data-balloon-pos='up'>
<img id='language-select__logo' />
<span id='language-select__text'>EN</span>
</div>
<div id='topbar-fullscreen' data-balloon='Fullscreen' data-balloon-pos='up'>
<img src={it.url_for('images/pages/footer/ic-fullscreen.svg')} />
</div>
</div>
Expand Down
Loading