From f03018f3bce25583b782f316424bb5e71ae3c6c2 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 28 Sep 2016 15:28:25 +0200 Subject: [PATCH] Improve the top bar and use the font awesome icons in /code --- customize.dist/DecorateToolbar.js | 13 +---- customize.dist/Header.html | 9 ++-- customize.dist/logo-xwiki.png | Bin 0 -> 780 bytes customize.dist/main.css | 9 ++-- customize.dist/src/cryptpad.less | 11 ++-- customize.dist/src/toolbar.less | 6 +-- customize.dist/toolbar.css | 6 +-- customize.dist/translations/messages.fr.js | 10 ++++ customize.dist/translations/messages.js | 10 ++++ www/code/index.html | 3 +- www/code/inner.html | 1 + www/code/main.js | 59 ++++++--------------- www/common/toolbar.js | 47 ++-------------- www/pad/index.html | 1 + www/pad/main.js | 9 +--- www/poll/index.html | 4 +- www/poll/main.js | 2 - www/slide/index.html | 1 + 18 files changed, 72 insertions(+), 129 deletions(-) create mode 100644 customize.dist/logo-xwiki.png diff --git a/customize.dist/DecorateToolbar.js b/customize.dist/DecorateToolbar.js index ca66c601f..8f155148f 100644 --- a/customize.dist/DecorateToolbar.js +++ b/customize.dist/DecorateToolbar.js @@ -9,21 +9,12 @@ define([ var $ = window.jQuery; var main = function () { var url = window.location.pathname; - var isHtml = /\.html/.test(url) || url === '/'; + var isHtml = /\.html/.test(url) || url === '/' || url === ''; $.ajax({ url: isHtml ? '/customize/BottomBar.html' : '/customize/Header.html', success: function (ret) { $('iframe').height('96%'); - if (isHtml) { - $('body').append(ret); - } - else { - $('body').prepend(ret); - } - $('head').append($('', { - rel: 'stylesheet', - href: '/customize/main.css' - })); + $('body').append(ret); LS.main(); Messages._applyTranslation(); } diff --git a/customize.dist/Header.html b/customize.dist/Header.html index 3ffeaa347..6548f9075 100644 --- a/customize.dist/Header.html +++ b/customize.dist/Header.html @@ -8,15 +8,14 @@ -

+

- +

+
-

+

diff --git a/customize.dist/logo-xwiki.png b/customize.dist/logo-xwiki.png new file mode 100644 index 0000000000000000000000000000000000000000..375739d2b8bd90c6bc31bd5d15e7f9486c218d65 GIT binary patch literal 780 zcmV+n1M~ceP)TlTT>eRTPE4d*?S9%B00b ztP9K3ff}fPz=ewng28m57V1iI*_uUN2ySe;P?%DSf>jU{R2WbZMXe};32wqjSBe#i zU=cHmViz_r(pt5l>HN-d(WFe$Nr>QGJ??$yd-opRg-t|jmTj$Bwr%Eat{iMvyyW}a z?e+t!U@dZ~!t}M^_*(I)Q{RvGdcD22Z*Yo%`Yoz3J$3M)CMPGG&1UmsfU|cKyP!`p zIta7fK(vHLfEqBfszcyv!g(MYjXU-)EG#^@QV8S0$8C>EIw4fc>xiFk8aX2VCV3O` zN}^)>*w|FJ+r9JTla!@7WAn{2>^6y)AS+2;BRLTf=hijV_D+}nsw~UTUHX$wr!%(V zrR|zazg(8($+9dzwf*Q?eXIk$5AlMKll+rp8n^^JC-E?_l*wE~yuB&lGIXEBfkZ*( z8A`4wGyym>XCva>VY*^i5+EXGmi>A>#k~ZXIu(I1)0jE)I;nM^XdQ zpa9kB=R?33NAK!r|HVUdyB2@#Qs9cnFc&uRa5v%zP#5YYxfQ4hDw(_*5#J5d<*=mf zTalgxMuo0sW}D<0;4hFQy=eQMO#yA!b-lCOfe}gVi1=~&;~z`%60nGL*!K8_K-*PG z$3Qy;+0XtP)oS(I^RS~^uWyftb0qI1*%xe)^t|n@LxHvn;1JMAATz%#C_09$QawES z&*EnQ5pkO2BOsF;6CAf)9oFFviN}(xmGMwY>eK~_)_)THU-2(tyFsbT@0#%d0000< KMNUMnLSTaXI&gdd literal 0 HcmV?d00001 diff --git a/customize.dist/main.css b/customize.dist/main.css index 38edb7a59..72190a3a1 100644 --- a/customize.dist/main.css +++ b/customize.dist/main.css @@ -230,7 +230,6 @@ tbody td:last-child { font-family: Arial, Helvetica, Tahoma, Verdana, sans-serif; font-size: 20px; display: block; - float: right; margin-left: 10px; padding-top: 3px; color: #fafafa; @@ -253,15 +252,19 @@ tbody td:last-child { float: left; padding-left: 10px; } +.bottom-bar-left p { + float: right; +} .bottom-bar-right { display: block; float: right; padding-right: 20px; } .bottom-bar-center { - margin-left: auto; - margin-right: auto; width: 20%; + position: absolute; + left: 40%; + text-align: center; } .bottom-bar-heart { top: 2px; diff --git a/customize.dist/src/cryptpad.less b/customize.dist/src/cryptpad.less index 9c9a3ae22..16448646f 100644 --- a/customize.dist/src/cryptpad.less +++ b/customize.dist/src/cryptpad.less @@ -267,7 +267,6 @@ tbody { font-size: 20px; display:block; - float:right; margin-left: 10px; padding-top:3px; color: @fore; @@ -291,15 +290,19 @@ tbody { float:left; padding-left:10px; } +.bottom-bar-left p { + float: right; +} .bottom-bar-right { display:block; float:right; padding-right:20px } .bottom-bar-center { - margin-left: auto; - margin-right: auto; - width: 20% + width: 20%; + position: absolute; + left: 40%; + text-align: center; } .bottom-bar-heart { top: 2px; diff --git a/customize.dist/src/toolbar.less b/customize.dist/src/toolbar.less index 7a7b437b3..ff68cb4b7 100644 --- a/customize.dist/src/toolbar.less +++ b/customize.dist/src/toolbar.less @@ -16,7 +16,7 @@ color: #666; font-weight: bold; - height: 26px; + height: 30px; margin-bottom: -3px; display: inline-block; width: 100%; @@ -27,7 +27,7 @@ } div { - padding: 0 10px; + padding: 0 3px; height: 1.5em; line-height: 25px; height: 100%; @@ -40,7 +40,7 @@ } button { - height: 100%; + height: 26px; background-color: inherit; background-image: linear-gradient(to bottom,#fff,#e4e4e4); border: 1px solid #A6A6A6; diff --git a/customize.dist/toolbar.css b/customize.dist/toolbar.css index 82eebb356..58d3c07ed 100644 --- a/customize.dist/toolbar.css +++ b/customize.dist/toolbar.css @@ -16,7 +16,7 @@ user-select: none; color: #666; font-weight: bold; - height: 26px; + height: 30px; margin-bottom: -3px; display: inline-block; width: 100%; @@ -26,7 +26,7 @@ float: right; } .cryptpad-toolbar div { - padding: 0 10px; + padding: 0 3px; height: 1.5em; line-height: 25px; height: 100%; @@ -38,7 +38,7 @@ color: #000; } .cryptpad-toolbar button { - height: 100%; + height: 26px; background-color: inherit; background-image: linear-gradient(to bottom, #fff, #e4e4e4); border: 1px solid #A6A6A6; diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index dd2fb372a..188d7e769 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -33,6 +33,10 @@ define(function () { out.viewers = '{0} lecteurs'; out.anonymous = "Vous êtes actuellement anonyme"; + out.greenLight = "Tout fonctionne bien"; + out.orangeLight = "Votre connexion est lente, ce qui réduit la qualité de l'éditeur" + out.redLight = "Vous êtes déconnectés de la session"; + out.importButton = 'IMPORTER'; out.importButtonTitle = 'Importer un document depuis un fichier local'; @@ -183,5 +187,11 @@ define(function () { out.bottom_france = 'Fait avec en '; out.bottom_support = 'Un projet XWiki SAS Labs avec le soutien de OpenPaaS-ng'; + // Header.html + + out.header_france = 'Fait avec en France par XWiki SAS'; + out.header_support = ' OpenPaaS-ng'; + out.header_logoTitle = "Aller vers la page d'accueil"; + return out; }); diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index eea13040f..40a73ec34 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -33,6 +33,10 @@ define(function () { out.viewers = '{0} viewers'; out.anonymous = "You are currently anonymous"; + out.greenLight = "Everything is working fine"; + out.orangeLight = "Your slow connection may impact your experience"; + out.redLight = "You are disconnected from the session"; + out.importButton = 'IMPORT'; out.importButtonTitle = 'Import a document from a local file'; @@ -183,5 +187,11 @@ define(function () { out.bottom_france = 'Made with in '; out.bottom_support = 'An XWiki SAS Labs Project with the support of OpenPaaS-ng'; + // Header.html + + out.header_france = 'With from France by XWiki SAS'; + out.header_support = ' OpenPaaS-ng'; + out.header_logoTitle = 'Go to the main page'; + return out; }); diff --git a/www/code/index.html b/www/code/index.html index 38d04be5b..eee5ba3a8 100644 --- a/www/code/index.html +++ b/www/code/index.html @@ -14,13 +14,14 @@ data-main-favicon="/customize/main-favicon.png" data-alt-favicon="/customize/alt-favicon.png" id="favicon" /> +