Skip to content

Commit

Permalink
perf(renderer): update style render
Browse files Browse the repository at this point in the history
  • Loading branch information
fu050409 committed Mar 4, 2024
1 parent c25627c commit 275064d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/diceutils/renderer/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@
}
.text-simsun {
font-family: SimSun, Microsoft Yahei, Arial;
font-family: Cascadia Mono, SimSun, Microsoft Yahei, Arial;
}
.text-cascadia {
font-family: Cascadia Mono, Arial;
}
.text-2 {
Expand Down Expand Up @@ -161,9 +165,9 @@ def _render_act(self, element: Element, is_first: bool = False):

def _render_dicer(self, element: Element) -> str:
return f"<span>{element.content}</span>"

def _render_command(self, element: Element) -> str:
return f"<span>{element.content}</span>"
return f'<span class="text-cascadia">{element.content}</span>'

def _render_speak(self, element: Element) -> str:
content = "“" + element.content.strip('"“”') + "”"
Expand Down

0 comments on commit 275064d

Please sign in to comment.