Fix #8
This commit is contained in:
parent
ec0e59e242
commit
09ab991fbb
@ -244,6 +244,24 @@ class Note {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the color that grayed-out text should be, for when we can't calculate
|
||||
* CSS opacity or something.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getGrayColor(): string {
|
||||
$text = $this->getTextColor();
|
||||
|
||||
if ($text == 'FFFFFF') {
|
||||
return 'C0C0C0';
|
||||
} else if ($text = '000000') {
|
||||
return '808080';
|
||||
} else {
|
||||
return 'A9A9A9';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the note content
|
||||
* @param string $markdown
|
||||
|
@ -55,6 +55,9 @@ foreach ($notes as $note) {
|
||||
echo "#notecard_" . $note->getID() . " .card-footer a {\n"
|
||||
. " color: #" . $note->getTextColor() . ";\n"
|
||||
. "}\n";
|
||||
echo "#notecard_" . $note->getID() . " .parsedown-task-list-close {\n"
|
||||
. " color: #" . $note->getGrayColor() . ";\n"
|
||||
. "}\n";
|
||||
}
|
||||
|
||||
foreach ($colors as $c) {
|
||||
|
@ -38,5 +38,4 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
.parsedown-task-list-close {
|
||||
text-decoration: line-through;
|
||||
opacity: 0.5;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user