Skip to content

Commit

Permalink
Make the background color of the preview page consistent with the theme
Browse files Browse the repository at this point in the history
  • Loading branch information
DianQK committed May 2, 2023
1 parent ae92cf4 commit 8f0f94e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ data class NoteDetailUiState(
val title: String = "",
val body: String = "",
val isLoading: Boolean = false,
val previewHtml: String = "<!DOCTYPE html><html><body></body><html>"
val previewHtml: String = "<!DOCTYPE html><html><body></body><html>",
)

const val TAG = "NoteDetailViewModel"
Expand Down Expand Up @@ -166,7 +166,7 @@ class NoteDetailViewModel @Inject constructor(
fun setPreviewHtml(body: String) {
viewModelScope.launch {
withContext(Dispatchers.IO) {
// TODO: match m3 theme
// TODO: Adapted to m3 theme, already adapted to the background color
val previewHtml = buildString {
append(
"""
Expand Down Expand Up @@ -213,7 +213,7 @@ class NoteDetailViewModel @Inject constructor(
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #484f58;
--color-canvas-default: #0d1117;
--color-canvas-default: transparent;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
Expand Down Expand Up @@ -261,7 +261,7 @@ class NoteDetailViewModel @Inject constructor(
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-default: transparent;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210, 18%, 87%, 1);
Expand Down

0 comments on commit 8f0f94e

Please sign in to comment.