diff --git a/customize.dist/src/less/mixins.less b/customize.dist/src/less/mixins.less index 8765d7925..456adf9b2 100644 --- a/customize.dist/src/less/mixins.less +++ b/customize.dist/src/less/mixins.less @@ -23,8 +23,11 @@ .top-left(@s: 5px) { border-top-left-radius: @s; } .size (@n) { - font-size: @n * 1vw; - line-height: @n * 1.1vw; + // font-size: @n * 1vmin; + // line-height: @n * 1.1vmin; + font-size: @n * 10%; + // line-height: @n * 11%; + line-height: 110%; } .two-part-gradient (@start, @end) { diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less index ffd6684ca..1d3835041 100644 --- a/customize.dist/src/less/toolbar.less +++ b/customize.dist/src/less/toolbar.less @@ -88,6 +88,73 @@ margin: auto; } } + +.clag () { + background: transparent; +} + + + #newLag { + height: 20px; + width: 23px; + background: transparent; + display: inline-block; + padding: 3px; + margin: 3px; + vertical-align: top; + box-sizing: content-box; + span { + display: inline-block; + width: 4px; + margin: 0; + margin-right: 1px; + background: black; + vertical-align: bottom; + box-sizing: border-box; + border: 1px solid black; + transition: background 1s, border 1s; + &:last-child { + margin-right: 0; + } + &.bar1 { height: 5px; } + &.bar2 { height: 10px; } + &.bar3 { height: 15px; } + &.bar4 { height: 20px; } + } + &.lag0 { + span { + .clag(); + border-color: red; + } + } + &.lag1 { + .bar2, .bar3, .bar4 { .clag(); } + span { + background-color: orange; + border-color: orange; + } + } + &.lag2 { + .bar3, .bar4 { .clag(); } + span { + background-color: orange; + border-color: orange; + } + } + &.lag3 { + .bar4 { .clag(); } + span { + background-color: green; + border-color: green; + } + } + &.lag4 { + span { + background-color: green; + border-color: green; + } + } + } div { white-space: normal; &.cryptpad-back { diff --git a/customize.dist/toolbar.css b/customize.dist/toolbar.css index de9558909..2b3b2deb7 100644 --- a/customize.dist/toolbar.css +++ b/customize.dist/toolbar.css @@ -161,6 +161,74 @@ .cryptpad-toolbar .cryptpad-lag div { margin: auto; } +.cryptpad-toolbar #newLag { + height: 20px; + width: 23px; + background: transparent; + display: inline-block; + padding: 3px; + margin: 3px; + vertical-align: top; + box-sizing: content-box; +} +.cryptpad-toolbar #newLag span { + display: inline-block; + width: 4px; + margin: 0; + margin-right: 1px; + background: black; + vertical-align: bottom; + box-sizing: border-box; + border: 1px solid black; + transition: background 1s, border 1s; +} +.cryptpad-toolbar #newLag span:last-child { + margin-right: 0; +} +.cryptpad-toolbar #newLag span.bar1 { + height: 5px; +} +.cryptpad-toolbar #newLag span.bar2 { + height: 10px; +} +.cryptpad-toolbar #newLag span.bar3 { + height: 15px; +} +.cryptpad-toolbar #newLag span.bar4 { + height: 20px; +} +.cryptpad-toolbar #newLag.lag0 span { + background: transparent; + border-color: red; +} +.cryptpad-toolbar #newLag.lag1 .bar2, +.cryptpad-toolbar #newLag.lag1 .bar3, +.cryptpad-toolbar #newLag.lag1 .bar4 { + background: transparent; +} +.cryptpad-toolbar #newLag.lag1 span { + background-color: orange; + border-color: orange; +} +.cryptpad-toolbar #newLag.lag2 .bar3, +.cryptpad-toolbar #newLag.lag2 .bar4 { + background: transparent; +} +.cryptpad-toolbar #newLag.lag2 span { + background-color: orange; + border-color: orange; +} +.cryptpad-toolbar #newLag.lag3 .bar4 { + background: transparent; +} +.cryptpad-toolbar #newLag.lag3 span { + background-color: green; + border-color: green; +} +.cryptpad-toolbar #newLag.lag4 span { + background-color: green; + border-color: green; +} .cryptpad-toolbar div { white-space: normal; } diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index 8c4966adc..558753aac 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -77,14 +77,17 @@ define(function () { out.backgroundButtonTitle = 'Changer la couleur de fond de la présentation'; out.colorButtonTitle = 'Changer la couleur du texte en mode présentation'; - out.printButton = "Imprimer"; + out.printButton = "Imprimer (Entrée)"; out.printButtonTitle = "Imprimer votre présentation ou l'enregistrer au format PDF"; - out.printOptions = "Options d'impression"; + out.printOptions = "Options de mise en page"; out.printSlideNumber = "Afficher le numéro des slides"; out.printDate = "Afficher la date"; out.printTitle = "Afficher le titre du pad"; out.printCSS = "Personnaliser l'apparence (CSS):"; + out.slideOptionsTitle = "Personnaliser la présentation"; + out.slideOptionsButton = "Enregistrer (Entrée)"; + out.editShare = "Lien d'édition"; out.editShareTitle = "Copier le lien d'édition dans le presse-papiers"; out.editOpen = "Éditer dans un nouvel onglet"; diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index 5a3fcba4e..1a4bf10da 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -79,14 +79,17 @@ define(function () { out.backgroundButtonTitle = 'Change the background color in the presentation'; out.colorButtonTitle = 'Change the text color in presentation mode'; - out.printButton = "Print"; + out.printButton = "Print (enter)"; out.printButtonTitle = "Print your slides or export them as a PDF file"; - out.printOptions = "Print options"; + out.printOptions = "Layout options"; out.printSlideNumber = "Display the slide number"; out.printDate = "Display the date"; out.printTitle = "Display the pad title"; out.printCSS = "Custom style rules (CSS):"; + out.slideOptionsTitle = "Customize your slides"; + out.slideOptionsButton = "Save (enter)"; + out.editShare = "Editing link"; out.editShareTitle = "Copy the editing link to clipboard"; out.editOpen = "Open editing link in a new tab"; diff --git a/q b/q new file mode 100644 index 000000000..cbba0eb66 --- /dev/null +++ b/q @@ -0,0 +1,478 @@ +warning: LF will be replaced by CRLF in customize.dist/translations/messages.fr.js. +The file will have its original line endings in your working directory. +[1mdiff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js[m +[1mindex 96e36a4..4ad51bd 100644[m +[1m--- a/customize.dist/translations/messages.fr.js[m +[1m+++ b/customize.dist/translations/messages.fr.js[m +[36m@@ -79,12 +79,14 @@[m [mdefine(function () {[m + [m + out.printButton = "Imprimer";[m + out.printButtonTitle = "Imprimer votre présentation ou l'enregistrer au format PDF";[m +[31m- out.printOptions = "Options d'impression";[m +[32m+[m[32m out.printOptions = "Options de mise en page";[m + out.printSlideNumber = "Afficher le numéro des slides";[m + out.printDate = "Afficher la date";[m + out.printTitle = "Afficher le titre du pad";[m + out.printCSS = "Personnaliser l'apparence (CSS):";[m + [m +[32m+[m[32m out.slideOptionsTitle = "Personnaliser la présentation";[m +[32m+[m + out.editShare = "Lien d'édition";[m + out.editShareTitle = "Copier le lien d'édition dans le presse-papiers";[m + out.editOpen = "Éditer dans un nouvel onglet";[m +[1mdiff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js[m +[1mindex b463b48..15540fd 100644[m +[1m--- a/customize.dist/translations/messages.js[m +[1m+++ b/customize.dist/translations/messages.js[m +[36m@@ -81,12 +81,14 @@[m [mdefine(function () {[m + [m + out.printButton = "Print";[m + out.printButtonTitle = "Print your slides or export them as a PDF file";[m +[31m- out.printOptions = "Print options";[m +[32m+[m[32m out.printOptions = "Layout options";[m + out.printSlideNumber = "Display the slide number";[m + out.printDate = "Display the date";[m + out.printTitle = "Display the pad title";[m + out.printCSS = "Custom style rules (CSS):";[m + [m +[32m+[m[32m out.slideOptionsTitle = "Customize your slides";[m +[32m+[m + out.editShare = "Editing link";[m + out.editShareTitle = "Copy the editing link to clipboard";[m + out.editOpen = "Open editing link in a new tab";[m +[1mdiff --git a/www/slide/main.js b/www/slide/main.js[m +[1mindex 50f216e..0bc6f5f 100644[m +[1m--- a/www/slide/main.js[m +[1m+++ b/www/slide/main.js[m +[36m@@ -136,7 +136,8 @@[m [mdefine([[m + [m + var $modal = $pad.contents().find('#modal');[m + var $content = $pad.contents().find('#content');[m +[31m- var $print = $pad.contents().find('#print');[m +[32m+[m[32m var $print = $pad.contents().find('#print'); var slideOptions = {};[m +[32m+[m + $( window ).resize(function() {[m + // 20vh[m + // 20 * 16 / 9vw[m +[36m@@ -149,7 +150,13 @@[m [mdefine([[m + // $print.css('font-size', (20*9/16)+'vw');[m + });[m + [m +[31m- Slide.setModal($modal, $content, $pad, ifrw, initialState);[m +[32m+[m[32m Slide.setModal(APP, $modal, $content, $pad, ifrw, slideOptions, initialState);[m +[32m+[m +[32m+[m[32m var setStyleState = function (state) {[m +[32m+[m[32m $pad.contents().find('#print, #content').find('style').each(function (i, el) {[m +[32m+[m[32m el.disabled = !state;[m +[32m+[m[32m });[m +[32m+[m[32m };[m + [m + var enterPresentationMode = function (shouldLog) {[m + Slide.show(true, editor.getValue());[m +[36m@@ -158,6 +165,7 @@[m [mdefine([[m + }[m + };[m + var leavePresentationMode = function () {[m +[32m+[m[32m setStyleState(false);[m + Slide.show(false);[m + };[m + [m +[36m@@ -229,7 +237,8 @@[m [mdefine([[m + content: textValue,[m + metadata: {[m + users: userData,[m +[31m- defaultTitle: defaultName[m +[32m+[m[32m defaultTitle: defaultName,[m +[32m+[m[32m slideOptions: slideOptions[m + }[m + };[m + if (!initializing) {[m +[36m@@ -370,6 +379,7 @@[m [mdefine([[m + setTabTitle();[m + $bar.find('.' + Toolbar.constants.title).find('span.title').text(data);[m + $bar.find('.' + Toolbar.constants.title).find('input').val(data);[m +[32m+[m[32m if (slideOptions.title) { Slide.updateOptions(); }[m + });[m + };[m + [m +[36m@@ -387,6 +397,15 @@[m [mdefine([[m + }[m + };[m + [m +[32m+[m[32m var updateOptions = function (newOpt) {[m +[32m+[m[32m if (stringify(newOpt) !== stringify(slideOptions)) {[m +[32m+[m[32m $.extend(slideOptions, newOpt);[m +[32m+[m[32m // TODO: manage realtime + cursor in the "options" modal ??[m +[32m+[m[32m console.log('updating options');[m +[32m+[m[32m Slide.updateOptions();[m +[32m+[m[32m }[m +[32m+[m[32m };[m +[32m+[m + var updateDefaultTitle = function (defaultTitle) {[m + defaultName = defaultTitle;[m + $bar.find('.' + Toolbar.constants.title).find('input').attr("placeholder", defaultName);[m +[36m@@ -409,6 +428,7 @@[m [mdefine([[m + updateTitle(json.metadata.title || defaultName);[m + titleUpdated = true;[m + }[m +[32m+[m[32m updateOptions(json.metadata.slideOptions);[m + updateColors(json.metadata.color, json.metadata.backColor);[m + }[m + if (!titleUpdated) {[m +[36m@@ -424,12 +444,14 @@[m [mdefine([[m + };[m + [m + var createPrintDialog = function () {[m +[31m- var printOptions = {[m +[32m+[m[32m var slideOptionsTmp = {[m + title: true,[m + slide: true,[m +[31m- date: true[m +[32m+[m[32m date: true,[m +[32m+[m[32m style: ''[m + };[m + [m +[32m+[m[32m $.extend(slideOptionsTmp, slideOptions);[m[41m [m + var $container = $('