From 2e131f452d0b7de026aafb5ebb4fccc7eba1874e Mon Sep 17 00:00:00 2001 From: yellowmonarch <75360541+yellowmonarch@users.noreply.github.com> Date: Fri, 18 Nov 2022 22:47:54 +0200 Subject: [PATCH] Change pdf.js Related changes: - Removed `openFile` buttons - Removed `editorFreeText` button - Removed `editorInk` button - Decreased `mainContainer` min-width to 275px - Changed color scheme (--body-bg-color, --main-color, --toolbar-icon-bg-color, --toolbar-icon-hover-bg-color) - Changed `loadingBar` background color - Removed `editorModeSeparator` - Swapped `Download` and `Print` buttons - Add missing russian locale keys --- web/locale/ru/viewer.properties | 21 +++++---------------- web/viewer.css | 12 ++++++------ web/viewer.html | 28 +++++++++++++--------------- 3 files changed, 24 insertions(+), 37 deletions(-) diff --git a/web/locale/ru/viewer.properties b/web/locale/ru/viewer.properties index cf0b15a..98dc0a7 100644 --- a/web/locale/ru/viewer.properties +++ b/web/locale/ru/viewer.properties @@ -41,6 +41,8 @@ print.title=Печать print_label=Печать download.title=Загрузить download_label=Загрузить +save.title=Сохранить +save_label=Сохранить bookmark.title=Ссылка на текущий вид (скопировать или открыть в новом окне) bookmark_label=Текущий вид @@ -214,7 +216,6 @@ error_stack=Стeк: {{stack}} error_file=Файл: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number error_line=Строка: {{line}} -rendering_error=При создании страницы произошла ошибка. # Predefined zoom values page_scale_width=По ширине страницы @@ -232,6 +233,8 @@ invalid_file_error=Некорректный или повреждённый PDF- missing_file_error=PDF-файл отсутствует. unexpected_response_error=Неожиданный ответ сервера. +rendering_error=При создании страницы произошла ошибка. + # LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be # replaced by the modification date, and time, of the annotation. annotation_date_string={{date}}, {{time}} @@ -250,16 +253,6 @@ printing_not_supported=Предупреждение: В этом браузер printing_not_ready=Предупреждение: PDF не полностью загружен для печати. web_fonts_disabled=Веб-шрифты отключены: не удалось задействовать встроенные PDF-шрифты. -# Editor -editor_none.title=Отключить редактирование аннотаций -editor_none_label=Отключить редактирование -editor_free_text.title=Добавить аннотацию FreeText -editor_free_text_label=Аннотация FreeText -editor_ink.title=Добавить рукописную аннотацию -editor_ink_label=Рукописная аннотация - -free_text_default_content=Введите текст… - # Editor editor_free_text2.title=Текст editor_free_text2_label=Текст @@ -275,11 +268,7 @@ editor_ink_color=Цвет editor_ink_thickness=Толщина editor_ink_opacity=Прозрачность -# Editor aria -editor_free_text_aria_label=Редактор FreeText -editor_ink_aria_label=Редактор чернил - # Editor aria editor_free_text2_aria_label=Текстовый редактор editor_ink2_aria_label=Редактор рисования -editor_ink_canvas_aria_label=Созданное пользователем изображение +editor_ink_canvas_aria_label=Созданное пользователем изображение \ No newline at end of file diff --git a/web/viewer.css b/web/viewer.css index cb7bf6c..5c8c56e 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -1062,8 +1062,8 @@ --toolbar-icon-opacity: 0.7; --doorhanger-icon-opacity: 0.9; - --main-color: rgba(12, 12, 13, 1); - --body-bg-color: rgba(237, 237, 240, 1); + --main-color: rgba(0, 18, 25, 1); + --body-bg-color: rgba(179, 179, 179, 1); --progressBar-percent: 0%; --progressBar-end-offset: 0; --progressBar-color: rgba(10, 132, 255, 1); @@ -1071,8 +1071,8 @@ --progressBar-indeterminate-blend-color: rgba(116, 177, 239, 1); --scrollbar-color: auto; --scrollbar-bg-color: auto; - --toolbar-icon-bg-color: rgba(0, 0, 0, 1); - --toolbar-icon-hover-bg-color: rgba(0, 0, 0, 1); + --toolbar-icon-bg-color: rgba(0, 18, 25, 1); + --toolbar-icon-hover-bg-color: rgba(0, 18, 25, 1); --sidebar-narrow-bg-color: rgba(237, 237, 240, 0.9); --sidebar-toolbar-bg-color: rgba(245, 246, 247, 1); @@ -1358,7 +1358,7 @@ body { right: 0; bottom: 0; left: 0; - min-width: 350px; + min-width: 275px; } [dir="ltr"] #sidebarContent { @@ -1511,7 +1511,7 @@ body { position: absolute; inset-inline: 0 var(--progressBar-end-offset); height: 4px; - background-color: var(--body-bg-color); + background-color: var(--sidebar-toolbar-bg-color); border-bottom: 1px solid var(--toolbar-border-color); transition-property: inset-inline-start; transition-duration: var(--sidebar-transition-duration); diff --git a/web/viewer.html b/web/viewer.html index 3d12cac..301e115 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -148,16 +148,16 @@ See https://github.com/adobe-type-tools/cmap-resources