Added "Vertical Alignment" setting

This commit is contained in:
nutty
2026-07-23 16:02:59 +10:00
parent df2c740623
commit 86842d01f1
3 changed files with 37 additions and 1 deletions
+14
View File
@@ -30,6 +30,7 @@ const theme = urlParams.get('theme') || 'standard';
const font = urlParams.get("font") || "";
const fontSize = GetIntParam("fontSize", 20);
const maxWidth = GetIntParam("maxWidth", 500);
const verticalAlignment = urlParams.get('verticalAlignment') || 'align-to-center';
const textAlignment = urlParams.get('textAlignment') || 'left';
const includedApplications = urlParams.get('includedApplications') || '';
@@ -75,6 +76,19 @@ else
// Set text alignment
document.documentElement.style.setProperty('--text-alignment', `${textAlignment}`);
// Set vertical alignment
switch (verticalAlignment) {
case 'align-to-top':
mainContainer.style.alignItems = 'flex-start';
break;
case 'align-to-center':
mainContainer.style.alignItems = 'center';
break;
case 'align-to-bottom':
mainContainer.style.alignItems = 'flex-end';
break;
}
////////////////
+22
View File
@@ -72,6 +72,28 @@
"defaultValue": 500,
"group": "Appearance"
},
{
"id": "verticalAlignment",
"label": "Vertical Alignment",
"description": "",
"type": "select",
"options": [
{
"value": "align-to-top",
"label": "Align To Top"
},
{
"value": "align-to-center",
"label": "Align To Center"
},
{
"value": "align-to-bottom",
"label": "Align To Bottom"
}
],
"defaultValue": "align-to-center",
"group": "Appearance"
},
{
"id": "textAlignment",
"label": "Text Alignment",
+1 -1
View File
@@ -10,7 +10,7 @@ body {
justify-content: center;
align-items: center;
height: 100vh;
padding: 0.5em;
padding: 1em;
box-sizing: border-box;
}