mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-18 19:50:58 -04:00
Added "Vertical Alignment" setting
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////
|
||||
|
||||
Reference in New Issue
Block a user