loleaflet: add a document type logo

Change-Id: Id02191e5070c10affb9157fdafa1a6fe8905517c
This commit is contained in:
Henry Castro 2018-09-06 12:15:03 -04:00 committed by Jan Holesovsky
parent 4924d6d837
commit 21fafe1e58
6 changed files with 30 additions and 2 deletions

View file

@ -20,7 +20,7 @@
position: relative;
}
.document-logo {
#document-logo {
position: absolute;
width: 50px;
height: 69px;
@ -281,3 +281,24 @@
.lo-menu-item-checked:hover::before {
color: #fff;
}
.writer-icon-img {
background-image: url('images/x-office-document.svg');
background-size: 50px 50px;
background-repeat: no-repeat;
background-position: bottom;
}
.calc-icon-img {
background-image: url('images/x-office-spreadsheet.svg');
background-size: 50px 50px;
background-repeat: no-repeat;
background-position: bottom;
}
.impress-icon-img {
background-image: url('images/x-office-presentation.svg');
background-size: 50px 50px;
background-repeat: no-repeat;
background-position: bottom;
}

View file

@ -81,7 +81,7 @@ ifelse(MOBILEAPP,[true],
<div class="header-wrapper">
<div id="document-header">
<div class="document-logo"></div>
<div id="document-logo"></div>
<div id="document-titlebar">
<div id="logo" class="logo"></div>
<div class="document-title">

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" version="1.1" height="16"><path fill="#49abea" d="m2.5 1c-0.28 0-0.5 0.22-0.5 0.5v13c0 0.28 0.22 0.5 0.5 0.5h11c0.28 0 0.5-0.22 0.5-0.5v-10.5l-3-3h-8.5zm1.5 2h6v1h-6v-1zm0 3h5v1h-5v-1zm0 3h8v1h-8v-1zm0 3h4v1h-4v-1z"/></svg>

After

Width:  |  Height:  |  Size: 295 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="16" width="16" version="1.1"><path fill="#f0965f" d="m1.5 2c-0.25 0-0.5 0.25-0.5 0.5v11c0 0.25 0.25 0.5 0.5 0.5h13c0.25 0 0.5-0.25 0.5-0.5v-11c0-0.25-0.25-0.5-0.5-0.5zm0.5 3h12v6h-12z"/></svg>

After

Width:  |  Height:  |  Size: 261 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" version="1.1" height="16"><path fill="#9abd4e" d="m2.5 1c-0.28 0-0.5 0.22-0.5 0.5v13c0 0.28 0.22 0.5 0.5 0.5h11c0.28 0 0.5-0.22 0.5-0.5v-10.5l-3-3h-8.5zm1.5 3h2v2h-2v-2zm3 0h5v2h-5v-2zm-3 3h2v2h-2v-2zm3 0h5v2h-5v-2zm-3 3h2v2h-2v-2zm3 0h5v2h-5v-2z"/></svg>

After

Width:  |  Height:  |  Size: 327 B

View file

@ -518,11 +518,15 @@ L.Control.Menubar = L.Control.extend({
// Add document specific menu
var docType = this._map.getDocType();
var $docLogo = $('#document-logo');
if (docType === 'text') {
$docLogo.addClass('writer-icon-img');
this._initializeMenu(this.options.text);
} else if (docType === 'spreadsheet') {
$docLogo.addClass('calc-icon-img');
this._initializeMenu(this.options.spreadsheet);
} else if (docType === 'presentation' || docType === 'drawing') {
$docLogo.addClass('impress-icon-img');
this._initializeMenu(this.options.presentation);
}