mirror of
https://github.com/mue/mue.git
synced 2026-07-25 01:37:21 +02:00
feat: new font settings and week number on date widget
This commit is contained in:
@@ -91,16 +91,28 @@ export default class SettingsFunctions {
|
||||
if (font) {
|
||||
const google = localStorage.getItem('fontGoogle');
|
||||
|
||||
let url = '';
|
||||
let url, fontweight, fontstyle = '';
|
||||
if (google === 'true') {
|
||||
url = `@import url('https://fonts.googleapis.com/css2?family=${font}&display=swap');`;
|
||||
}
|
||||
|
||||
const fontWeight = localStorage.getItem('fontWeight');
|
||||
if (fontWeight) {
|
||||
fontweight = `font-weight: ${fontWeight};`;
|
||||
}
|
||||
|
||||
const fontStyle = localStorage.getItem('fontStyle');
|
||||
if (fontStyle) {
|
||||
fontstyle = `font-style: ${fontStyle};`;
|
||||
}
|
||||
|
||||
document.head.insertAdjacentHTML('beforeend', `
|
||||
<style>
|
||||
${url}
|
||||
* {
|
||||
font-family: '${font}', 'Lexend Deca' !important;
|
||||
${fontweight}
|
||||
${fontstyle}
|
||||
}
|
||||
</style>`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user