feat: add preferred font field to themes
This commit is contained in:
parent
26243a8cd6
commit
186d3c7a0a
7 changed files with 19 additions and 13 deletions
2
app.vue
2
app.vue
|
@ -65,7 +65,7 @@ useHead({
|
|||
<style>
|
||||
html,
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-family: var(--preferred-font);
|
||||
box-sizing: border-box;
|
||||
color: var(--text-color);
|
||||
background: var(--optional-body-background);
|
||||
|
|
|
@ -12,15 +12,16 @@
|
|||
|
||||
--padding-color: #e0e0e0;
|
||||
|
||||
--sidebar-width: 2.5em;
|
||||
--standard-radius: .5em;
|
||||
--button-radius: .6em;
|
||||
--pfp-radius: 100%;
|
||||
|
||||
--primary-color: #f07028;
|
||||
--primary-highlighted-color: #f28f4b;
|
||||
--secondary-color: #683820;
|
||||
--secondary-highlighted-color: #885830;
|
||||
--accent-color: #a04b24;
|
||||
--accent-highlighted-color: #b86038;
|
||||
|
||||
--sidebar-width: 2.5em;
|
||||
--standard-radius: .5em;
|
||||
--button-radius: .6em;
|
||||
--pfp-radius: 100%;
|
||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
||||
}
|
|
@ -23,4 +23,5 @@
|
|||
--standard-radius: .5em;
|
||||
--button-radius: .6em;
|
||||
--pfp-radius: 100%;
|
||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
||||
}
|
|
@ -24,6 +24,7 @@
|
|||
--standard-radius: .5em;
|
||||
--button-radius: .6em;
|
||||
--pfp-radius: 100%;
|
||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
||||
|
||||
--optional-body-background: ; /* background element for the body */
|
||||
--optional-chat-background: ; /* background element for the chat box */
|
||||
|
|
|
@ -12,15 +12,16 @@
|
|||
|
||||
--padding-color: #484848;
|
||||
|
||||
--sidebar-width: 2.5em;
|
||||
--standard-radius: .5em;
|
||||
--button-radius: .6em;
|
||||
--pfp-radius: 100%;
|
||||
|
||||
--primary-color: #df5f0b;
|
||||
--primary-highlighted-color: #ef6812;
|
||||
--secondary-color: #e8ac84;
|
||||
--secondary-highlighted-color: #f8b68a;
|
||||
--accent-color: #e68b4e;
|
||||
--accent-highlighted-color: #f69254;
|
||||
|
||||
--sidebar-width: 2.5em;
|
||||
--standard-radius: .5em;
|
||||
--button-radius: .6em;
|
||||
--pfp-radius: 100%;
|
||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
||||
}
|
|
@ -23,6 +23,7 @@
|
|||
--standard-radius: .5em;
|
||||
--button-radius: .6em;
|
||||
--pfp-radius: 100%;
|
||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
||||
|
||||
/* --optional-body-background: background */
|
||||
--optional-body-background: linear-gradient(45deg, #ed222480, #ed222480, #ed222480, #ed222480, #ed222480, #ed222480, #f35b2280, #f9962180, #f5c11e80, #f1eb1b80, #f1eb1b80, #f1eb1b80, #63c72080, #0c9b4980, #21878d80, #3954a580, #61379b80, #93288e80);
|
||||
|
|
|
@ -27,7 +27,8 @@ export default (name: string, seed: string): string => {
|
|||
ctx.fillStyle = 'white'
|
||||
ctx.textAlign = 'center'
|
||||
ctx.textBaseline = 'middle'
|
||||
ctx.font = 'bold 96px Arial, Helvetica, sans-serif'
|
||||
const preferredFont = document.documentElement.style.getPropertyValue("--preferred-font")
|
||||
ctx.font = `bold 96px ${preferredFont}, Arial, Helvetica, sans-serif`
|
||||
// 136 isn't actually centered, but it *looks* centered
|
||||
ctx.fillText(previewName, 128, 136)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue