From 055a254c428d80d5a7e31731d52983b50e7f81c2 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Thu, 19 Nov 2020 20:28:28 +0300 Subject: [PATCH] [DE mobile] Add icons into toolbar --- .../common/mobile/resources/less/_mixins.less | 5 +++ .../mobile/src/css/app-ios.less | 5 +++ .../mobile/src/css/app-material.less | 13 ++++++++ apps/documenteditor/mobile/src/css/app.less | 4 ++- .../mobile/src/css/icons-ios.less | 29 +++++++++++++++++ .../mobile/src/css/icons-material.less | 31 +++++++++++++++++++ apps/documenteditor/mobile/src/pages/home.jsx | 12 +++---- 7 files changed, 92 insertions(+), 7 deletions(-) create mode 100644 apps/documenteditor/mobile/src/css/icons-ios.less create mode 100644 apps/documenteditor/mobile/src/css/icons-material.less diff --git a/apps/common/mobile/resources/less/_mixins.less b/apps/common/mobile/resources/less/_mixins.less index 9e206f133..bc4541de0 100644 --- a/apps/common/mobile/resources/less/_mixins.less +++ b/apps/common/mobile/resources/less/_mixins.less @@ -3,4 +3,9 @@ @url: `encodeURIComponent(@{svg})`; background-color: @themeColor; -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,@{url}"); +} + +.encoded-svg-background(@svg) { + @url: `encodeURIComponent(@{svg})`; + background-image: url("data:image/svg+xml;charset=utf-8,@{url}"); } \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/css/app-ios.less b/apps/documenteditor/mobile/src/css/app-ios.less index a6daf5e24..3b5a73f0c 100644 --- a/apps/documenteditor/mobile/src/css/app-ios.less +++ b/apps/documenteditor/mobile/src/css/app-ios.less @@ -1,3 +1,8 @@ .device-ios { + // Main Toolbar + #editor-navbar.navbar .right a + a, + #editor-navbar.navbar .left a + a { + margin-left: 0; + } } diff --git a/apps/documenteditor/mobile/src/css/app-material.less b/apps/documenteditor/mobile/src/css/app-material.less index f83168105..f59ccad18 100644 --- a/apps/documenteditor/mobile/src/css/app-material.less +++ b/apps/documenteditor/mobile/src/css/app-material.less @@ -9,4 +9,17 @@ --f7-navbar-bg-color: @themeColor; --f7-navbar-link-color: @navBarIconColor; --f7-navbar-text-color: @navBarIconColor; + + // Main Toolbar + #editor-navbar.navbar .right { + padding-right: 4px; + } + #editor-navbar.navbar .right a.link, + #editor-navbar.navbar .left a.link { + padding: 0 13px; + justify-content: space-between; + box-sizing: border-box; + align-items: center; + width: auto; + } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/css/app.less b/apps/documenteditor/mobile/src/css/app.less index 611fb780d..bbcd5ba29 100644 --- a/apps/documenteditor/mobile/src/css/app.less +++ b/apps/documenteditor/mobile/src/css/app.less @@ -1,10 +1,12 @@ - +@import '../../../../common/mobile/resources/less/_mixins.less'; @import '../../../../common/mobile/resources/less/collaboration.less'; @import '../../../../common/mobile/resources/less/common.less'; @import '../../../../common/mobile/resources/less/common-ios.less'; @import '../../../../common/mobile/resources/less/common-material.less'; @import './app-material.less'; @import './app-ios.less'; +@import './icons-ios.less'; +@import './icons-material.less'; /* Left Panel right border when it is visible by breakpoint */ .panel-left.panel-in-breakpoint:before { diff --git a/apps/documenteditor/mobile/src/css/icons-ios.less b/apps/documenteditor/mobile/src/css/icons-ios.less new file mode 100644 index 000000000..0895afc9e --- /dev/null +++ b/apps/documenteditor/mobile/src/css/icons-ios.less @@ -0,0 +1,29 @@ +.device-ios { + i.icon { + &.icon-undo { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + &.icon-redo { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + &.icon-edit-settings { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + &.icon-collaboration { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + &.icon-settings { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + } +} \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/css/icons-material.less b/apps/documenteditor/mobile/src/css/icons-material.less new file mode 100644 index 000000000..ae440cdba --- /dev/null +++ b/apps/documenteditor/mobile/src/css/icons-material.less @@ -0,0 +1,31 @@ +.device-android { + .navbar { + i.icon { + &.icon-undo { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + &.icon-redo { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + &.icon-edit-settings { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + &.icon-settings { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + &.icon-collaboration { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + } + } +} \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/pages/home.jsx b/apps/documenteditor/mobile/src/pages/home.jsx index 25354a717..a786f385a 100644 --- a/apps/documenteditor/mobile/src/pages/home.jsx +++ b/apps/documenteditor/mobile/src/pages/home.jsx @@ -48,16 +48,16 @@ export default class Home extends Component { return ( {/* Top Navbar */} - +
- Undo - Redo + + - this.handleClickToOpenOptions('coauth')}>Users - this.handleClickToOpenOptions('edit')} id='btn-edit'>Edit - this.handleClickToOpenOptions('settings')} id='btn-settings'>Settings + this.handleClickToOpenOptions('edit')}> + this.handleClickToOpenOptions('coauth')}> + this.handleClickToOpenOptions('settings')}>
{/* Page content */}