diff --git a/customize.dist/DecorateToolbar.js b/customize.dist/DecorateToolbar.js index 8f155148f..d6f77ea30 100644 --- a/customize.dist/DecorateToolbar.js +++ b/customize.dist/DecorateToolbar.js @@ -13,7 +13,7 @@ define([ $.ajax({ url: isHtml ? '/customize/BottomBar.html' : '/customize/Header.html', success: function (ret) { - $('iframe').height('96%'); + //:$('iframe').height('96%'); $('body').append(ret); LS.main(); Messages._applyTranslation(); diff --git a/customize.dist/Header.html b/customize.dist/Header.html index 6548f9075..6d7e2a370 100644 --- a/customize.dist/Header.html +++ b/customize.dist/Header.html @@ -8,14 +8,16 @@ -
+
diff --git a/customize.dist/cryptofist_mini.png b/customize.dist/cryptofist_mini.png new file mode 100644 index 000000000..82a5218ef Binary files /dev/null and b/customize.dist/cryptofist_mini.png differ diff --git a/customize.dist/main.css b/customize.dist/main.css index 0c063e6e8..2455aa465 100644 --- a/customize.dist/main.css +++ b/customize.dist/main.css @@ -146,6 +146,7 @@ tr { .buttons { margin-bottom: 50px; margin-top: 20px; + line-height: 2.5em; } .button { padding: 4px 12px 4px 12px; @@ -242,6 +243,34 @@ tbody td:last-child { margin-right: 4px; position: relative; } +@media screen and (max-width: 800px) { + .top-bar .big, + .bottom-bar .big { + display: none; + } +} +@media screen and (min-width: 801px) { + .top-bar .big, + .bottom-bar .big { + display: inline-block; + } +} +@media screen and (max-width: 800px) { + .top-bar .small, + .bottom-bar .small { + display: inline-block; + } +} +@media screen and (min-width: 801px) { + .top-bar .small, + .bottom-bar .small { + display: none; + } +} +.top-bar .small img, +.bottom-bar .small img { + height: 1.25em; +} .bottom-bar { bottom: 0px; right: 0px; diff --git a/customize.dist/src/cryptpad.less b/customize.dist/src/cryptpad.less index c41af4de9..7492114e9 100644 --- a/customize.dist/src/cryptpad.less +++ b/customize.dist/src/cryptpad.less @@ -175,6 +175,7 @@ p, pre, td, a, table, tr { .buttons { margin-bottom: 50px; margin-top: 20px; + line-height: 2.5em; } .button { @@ -278,6 +279,27 @@ tbody { margin-right: 4px; position: relative; } + + .big { + @media screen and (max-width: 800px) { + display: none; + } + @media screen and (min-width: 801px) { + display: inline-block; + } + } + .small { + @media screen and (max-width: 800px) { + display: inline-block; + } + @media screen and (min-width: 801px) { + display: none; + } + img { + height: 1.25em; + } + } + } .bottom-bar { bottom: 0px; diff --git a/customize.dist/src/toolbar.less b/customize.dist/src/toolbar.less index ff68cb4b7..17e25c232 100644 --- a/customize.dist/src/toolbar.less +++ b/customize.dist/src/toolbar.less @@ -16,8 +16,6 @@ color: #666; font-weight: bold; - height: 30px; - margin-bottom: -3px; display: inline-block; width: 100%; z-index: 9001; @@ -27,32 +25,58 @@ } div { - padding: 0 3px; - height: 1.5em; - line-height: 25px; - height: 100%; + white-space: normal; &.cryptpad-back { padding: 0; font-weight: bold; cursor: pointer; color: #000; } + &.cryptpad-lag { + float: right; + line-height: 26px; + margin: 2px 0px 2px 4px; + } } - button { + button, .rightside-element { height: 26px; + padding-right: 5px; + padding-left: 5px; + margin: 2px; + } + + button { background-color: inherit; background-image: linear-gradient(to bottom,#fff,#e4e4e4); border: 1px solid #A6A6A6; border-bottom-color: #979797; border-radius: 3px; - margin-right: 5px; - padding-right: 5px; - padding-left: 5px; &:hover { background-image:linear-gradient(to bottom,#f2f2f2,#ccc); } + &.userlist { + @media screen and (max-width: 800px) { + display: none; + } + @media screen and (min-width: 801px) { + display: inline-block; + } + &.small { + @media screen and (max-width: 800px) { + display: inline-block; + } + @media screen and (min-width: 801px) { + display: none; + } + } + } } + + .cryptpad-state { + line-height: 30px; /* equivalent to 26px + 2*2px margin used for buttons */ + } + .rightside-button { float: right; cursor: pointer; @@ -63,30 +87,89 @@ float: left; } + .rightside-element { + vertical-align: middle; + white-space: nowrap; + &.float { + float: right; + } + } + select { border: 0px; margin-left: 5px; margin-right: 5px; padding-left: 5px; + border: 1px solid #A6A6A6; + border-bottom-color: #979797; } } .cryptpad-toolbar-leftside { float: left; - div { - float: left; + margin-bottom: -1px; + .cryptpad-dropdown-container { + position: relative; + display: inline-block; + padding: 0px; + .cryptpad-dropdown { + z-index:1000; + display:none; + position: absolute; + background-color: #f9f9f9; + min-width: 160px; + overflow: auto; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + height: auto; + padding: 5px; + white-space: normal; + p { + width: 210px; + padding: 0; + margin: 0; + white-space: normal; + &.cryptpad-dropdown-users { + text-align:baseline; + .yourself { + font-style: italic; + } + .anonymous { + font-style: italic; + } + } + h2 { + font-weight: bold; + text-align: center; + background-color: #EEEEEE; + padding: 5px 0px; + margin: 5px 0px; + font-size: 16px; + } + } + button { + margin: 2px 0px; + } + } + } + button { + margin: 2px 4px 2px 0px; + } + .cryptpad-userbuttons-container { + display: none; } - } .cryptpad-toolbar-rightside { text-align: right; + margin-right: 30px; //float: right; } -.cryptpad-lag { - float: right; -} .cryptpad-spinner { float: left; + display: inline-block; + height: 26px; + margin: 2px; + line-height: 26px; + font-size: 20px; } .cryptpad-readonly { margin-right: 20px; @@ -94,13 +177,12 @@ text-transform: uppercase; } .cryptpad-toolbar-username { - font-style: italic; } .lag { display: inline-block; vertical-align: middle; padding: 0 !important; - margin: 0 !important; + margin: 0 5px !important; height: 15px !important; width: 15px !important; border-radius: 50%; diff --git a/customize.dist/toolbar.css b/customize.dist/toolbar.css index 58d3c07ed..930a17eaf 100644 --- a/customize.dist/toolbar.css +++ b/customize.dist/toolbar.css @@ -16,8 +16,6 @@ user-select: none; color: #666; font-weight: bold; - height: 30px; - margin-bottom: -3px; display: inline-block; width: 100%; z-index: 9001; @@ -26,10 +24,7 @@ float: right; } .cryptpad-toolbar div { - padding: 0 3px; - height: 1.5em; - line-height: 25px; - height: 100%; + white-space: normal; } .cryptpad-toolbar div.cryptpad-back { padding: 0; @@ -37,20 +32,52 @@ cursor: pointer; color: #000; } -.cryptpad-toolbar button { +.cryptpad-toolbar div.cryptpad-lag { + float: right; + line-height: 26px; + margin: 2px 0px 2px 4px; +} +.cryptpad-toolbar button, +.cryptpad-toolbar .rightside-element { height: 26px; + padding-right: 5px; + padding-left: 5px; + margin: 2px; +} +.cryptpad-toolbar button { background-color: inherit; background-image: linear-gradient(to bottom, #fff, #e4e4e4); border: 1px solid #A6A6A6; border-bottom-color: #979797; border-radius: 3px; - margin-right: 5px; - padding-right: 5px; - padding-left: 5px; } .cryptpad-toolbar button:hover { background-image: linear-gradient(to bottom, #f2f2f2, #ccc); } +@media screen and (max-width: 800px) { + .cryptpad-toolbar button.userlist { + display: none; + } +} +@media screen and (min-width: 801px) { + .cryptpad-toolbar button.userlist { + display: inline-block; + } +} +@media screen and (max-width: 800px) { + .cryptpad-toolbar button.userlist.small { + display: inline-block; + } +} +@media screen and (min-width: 801px) { + .cryptpad-toolbar button.userlist.small { + display: none; + } +} +.cryptpad-toolbar .cryptpad-state { + line-height: 30px; + /* equivalent to 26px + 2*2px margin used for buttons */ +} .cryptpad-toolbar .rightside-button { float: right; cursor: pointer; @@ -59,40 +86,96 @@ cursor: pointer; float: left; } +.cryptpad-toolbar .rightside-element { + vertical-align: middle; + white-space: nowrap; +} +.cryptpad-toolbar .rightside-element.float { + float: right; +} .cryptpad-toolbar select { border: 0px; margin-left: 5px; margin-right: 5px; padding-left: 5px; + border: 1px solid #A6A6A6; + border-bottom-color: #979797; } .cryptpad-toolbar-leftside { float: left; + margin-bottom: -1px; } -.cryptpad-toolbar-leftside div { - float: left; +.cryptpad-toolbar-leftside .cryptpad-dropdown-container { + position: relative; + display: inline-block; + padding: 0px; +} +.cryptpad-toolbar-leftside .cryptpad-dropdown-container .cryptpad-dropdown { + z-index: 1000; + display: none; + position: absolute; + background-color: #f9f9f9; + min-width: 160px; + overflow: auto; + box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); + height: auto; + padding: 5px; + white-space: normal; +} +.cryptpad-toolbar-leftside .cryptpad-dropdown-container .cryptpad-dropdown p { + width: 210px; + padding: 0; + margin: 0; + white-space: normal; +} +.cryptpad-toolbar-leftside .cryptpad-dropdown-container .cryptpad-dropdown p.cryptpad-dropdown-users { + text-align: baseline; +} +.cryptpad-toolbar-leftside .cryptpad-dropdown-container .cryptpad-dropdown p.cryptpad-dropdown-users .yourself { + font-style: italic; +} +.cryptpad-toolbar-leftside .cryptpad-dropdown-container .cryptpad-dropdown p.cryptpad-dropdown-users .anonymous { + font-style: italic; +} +.cryptpad-toolbar-leftside .cryptpad-dropdown-container .cryptpad-dropdown p h2 { + font-weight: bold; + text-align: center; + background-color: #EEEEEE; + padding: 5px 0px; + margin: 5px 0px; + font-size: 16px; +} +.cryptpad-toolbar-leftside .cryptpad-dropdown-container .cryptpad-dropdown button { + margin: 2px 0px; +} +.cryptpad-toolbar-leftside button { + margin: 2px 4px 2px 0px; +} +.cryptpad-toolbar-leftside .cryptpad-userbuttons-container { + display: none; } .cryptpad-toolbar-rightside { text-align: right; -} -.cryptpad-lag { - float: right; + margin-right: 30px; } .cryptpad-spinner { float: left; + display: inline-block; + height: 26px; + margin: 2px; + line-height: 26px; + font-size: 20px; } .cryptpad-readonly { margin-right: 20px; font-weight: bold; text-transform: uppercase; } -.cryptpad-toolbar-username { - font-style: italic; -} .lag { display: inline-block; vertical-align: middle; padding: 0 !important; - margin: 0 !important; + margin: 0 5px !important; height: 15px !important; width: 15px !important; border-radius: 50%; diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index df9deb63c..a1c60e990 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -17,21 +17,17 @@ define(function () { out.common_connectionLost = 'Connexion au serveur perdue'; - out.editingAlone = 'Pas d\'autre participant'; - out.editingWithOneOtherPerson = 'Édition avec une autre personne'; - out.editingWith = 'Édition avec'; - out.otherPeople = 'autres personnes'; out.disconnected = 'Déconnecté'; out.synchronizing = 'Synchronisation'; out.reconnecting = 'Reconnexion...'; out.lag = 'Latence'; out.readonly = 'Lecture seule'; - out.nobodyIsEditing = "Personne n'édite le document"; - out.onePersonIsEditing = 'Une personne édite le document'; - out.peopleAreEditing = '{0} personnes éditent le document'; - out.oneViewer = '1 lecteur'; - out.viewers = '{0} lecteurs'; - out.anonymous = "Vous êtes actuellement anonyme"; + out.anonymous = "Anonyme"; + out.yourself = "Vous-même"; + out.anonymousUsers = "utilisateurs anonymes"; + out.anonymousUser = "utilisateur anonyme"; + out.share = "Partage"; + out.users = "Utilisateurs"; out.greenLight = "Tout fonctionne bien"; out.orangeLight = "Votre connexion est lente, ce qui réduit la qualité de l'éditeur"; @@ -82,7 +78,14 @@ define(function () { out.readonlyUrl = 'Document en lecture seule'; out.copyReadOnly = "Copier l'URL dans le presse-papiers"; out.openReadOnly = "Ouvrir dans un nouvel onglet"; - + out.editing = "en édition"; + out.viewing = "en lecture"; + out.editShare = "Partager l'URL"; + out.editShareTitle = "Copier l'URL d'édition dans le presse-papiers"; + out.viewShare = "Partager l'URL de lecture"; + out.viewShareTitle = "Copier l'URL d'accès en lecture seule dans le presse-papiers"; + out.viewOpen = "Voir dans un nouvel onglet"; + out.viewOpenTitle = "Ouvrir le document en lecture seule dans un nouvel onglet"; out.disconnectAlert = 'Perte de la connexion au réseau !'; @@ -199,6 +202,7 @@ define(function () { // Header.html out.header_france = 'Fait avec en par '; + out.header_xwiki = ''; out.header_support = ' '; out.header_logoTitle = "Aller vers la page d'accueil"; diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index d46fb6e5a..2b2a7a0cb 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -17,21 +17,17 @@ define(function () { out.common_connectionLost = 'Server Connection Lost'; - out.editingAlone = 'Editing alone'; - out.editingWithOneOtherPerson = 'Editing with one other person'; - out.editingWith = 'Editing with'; - out.otherPeople = 'other people'; out.disconnected = 'Disconnected'; out.synchronizing = 'Synchronizing'; out.reconnecting = 'Reconnecting...'; out.lag = 'Lag'; out.readonly = 'Read only'; - out.nobodyIsEditing = 'Nobody is editing'; - out.onePersonIsEditing = 'One person is editing'; - out.peopleAreEditing = '{0} people are editing'; - out.oneViewer = '1 viewer'; - out.viewers = '{0} viewers'; - out.anonymous = "You are currently anonymous"; + out.anonymous = "Anonymous"; + out.yourself = "Yourself"; + out.anonymousUsers = "anonymous users"; + out.anonymousUser = "anonymous user"; + out.share = "Share"; + out.users = "Users"; out.greenLight = "Everything is working fine"; out.orangeLight = "Your slow connection may impact your experience"; @@ -83,6 +79,14 @@ define(function () { out.readonlyUrl = 'Read only document'; out.copyReadOnly = "Copy URL to clipboard"; out.openReadOnly = "Open in a new tab"; + out.editing = "editing"; + out.viewing = "viewing"; + out.editShare = "Share"; + out.editShareTitle = "Copy the edit URL to clipboard"; + out.viewShare = "Share view URL"; + out.viewShareTitle = "Copy the read-only URL to clipboard"; + out.viewOpen = "View in new tab"; + out.viewOpenTitle = "Open the document in read-only mode in a new tab"; out.disconnectAlert = 'Network connection lost!'; @@ -200,6 +204,7 @@ define(function () { // Header.html out.header_france = 'With from by '; + out.header_xwiki = ''; out.header_support = ' '; out.header_logoTitle = 'Go to the main page'; diff --git a/www/code/index.html b/www/code/index.html index eee5ba3a8..bdef6b6f4 100644 --- a/www/code/index.html +++ b/www/code/index.html @@ -19,23 +19,35 @@ html, body { overflow-y: hidden; } + #iframe-container { + position: fixed; + top: 2.6em; + bottom: 0px; + right: 0px; + left: 0px; + padding: 0px; + } #pad-iframe { - position:fixed; - top:2.5em; - left:0px; - bottom:0px; - right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; + box-sizing: border-box; + } + /* We use !important here to override the 96% set to the element in DecorateToolbar.js + when we enter fullscreen mode. It allows us to avoid changing the iframe's size in JS */ + #pad-iframe.fullscreen { + top: 0px; + height: 100% !important; } - +