mirror of
https://github.com/mue/mue.git
synced 2026-07-07 14:17:09 +02:00
feat: custom font ui, fix modal css and date widget stuff
Co-authored-by: Alex Sparkes <turbomarshmello@gmail.com>
This commit is contained in:
@@ -89,18 +89,18 @@ export default class SettingsFunctions {
|
||||
|
||||
const font = localStorage.getItem('font');
|
||||
if (font) {
|
||||
const data = JSON.parse(font);
|
||||
const google = localStorage.getItem('fontGoogle');
|
||||
|
||||
let url = '';
|
||||
if (data.google === true) {
|
||||
url = `@import url('https://fonts.googleapis.com/css2?family=${data.name}&display=swap');`;
|
||||
if (google === 'true') {
|
||||
url = `@import url('https://fonts.googleapis.com/css2?family=${font}&display=swap');`;
|
||||
}
|
||||
|
||||
document.head.insertAdjacentHTML('beforeend', `
|
||||
<style>
|
||||
${url}
|
||||
* {
|
||||
font-family: '${data.name}', 'Lexend Deca' !important;
|
||||
font-family: '${font}', 'Lexend Deca' !important;
|
||||
}
|
||||
</style>`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user