-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlight color selection for the Compare PDFs page. #1515
Conversation
<div class="row"> | ||
<div class="flex-container"> | ||
<div class="color-selector spacer1"> | ||
<label>Highlight Color 1: </label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must support custom languages like having it as
th:text="#{compare.highlightColor}"
and
compare.highlightColor=Highlight Color 1:
in languages GB file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 5 updated for US message file, just updated the GB one in commit 6.
Changed text in some labels to conform to Thymeleaf format.
Description
Added the option to change the colors of the difference highlights using color selector boxes. Like before, the user will click the "Compare" button to parse text into a pair of boxes with differences in text highlighted. The user has to select their colors prior to clicking "Compare", and do so again if they want something different. The color selectors are red and green by default, which were the original colors prior to change.
Issue #1290 is a small collection several related feature enhancements for the Compare PDFs page. Item 6 of the list requested the option to change the color of the highlights that indicate a change between each document.
This page is an HTML file containing internal CSS and JavaScript. As this feature expands, the HTML and JS will need to be separated out, but I didn't opt to do that at this time. I added several selectors to the internal CSS. I only edited the JavaScript code slightly to make coloring dependent on the color input boxes that I added. I only used standard HTML and CSS, with the only reason being that I haven't learned a front-end framework yet. I kept styling basic so that someone more proficient with design can work on it.
HTML:
CSS:
JavaScript, specifically comparePDFs():
Closes #(1290 list item 6)
Checklist:
Contributor License Agreement
By submitting this pull request, I acknowledge and agree that my contributions will be included in Stirling-PDF and that they can be relicensed in the future under the MPL 2.0 (Mozilla Public License Version 2.0) license.
(This does not change the general open-source nature of Stirling-PDF, simply moving from one license to another license)