1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2026-02-04 07:53:11 +00:00

Improve font size initialization and style organization

Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-12-24 10:35:23 +00:00
parent a89bca2ca4
commit a332d9365f

View File

@ -15,14 +15,12 @@
<div
class="font-weight-medium mb-4 serif-font"
:style="contentStyle"
style="white-space: pre-wrap; line-height: 1.6; text-align: left;"
>
{{ sentence }}
</div>
<div
class="text-medium-emphasis serif-font"
:style="authorStyle"
style="text-align: left;"
>
<span
v-if="author"
@ -68,19 +66,23 @@ export default {
loading: false,
timer: null,
unwatch: null,
fontSize: 28
fontSize: SettingsManager.getSetting('font.size')
}
},
computed: {
contentStyle() {
return {
'font-size': `${this.fontSize}px`
'font-size': `${this.fontSize}px`,
'white-space': 'pre-wrap',
'line-height': '1.6',
'text-align': 'left'
}
},
authorStyle() {
// Author font size is 60% of the main font size
return {
'font-size': `${this.fontSize * 0.6}px`
'font-size': `${this.fontSize * 0.6}px`,
'text-align': 'left'
}
}
},