tweak: image alignment (center/left/right)

This commit is contained in:
dragonwocky 2021-10-24 13:30:21 +11:00
parent 047b4cce7d
commit 4d8eec7399
3 changed files with 18 additions and 0 deletions

View File

@ -133,3 +133,10 @@
right: 2px;
bottom: -2px;
}
.enhancer--tweak-img_alignment-left .notion-image-block {
align-self: start !important;
}
.enhancer--tweak-img_alignment-right .notion-image-block {
align-self: end !important;
}

View File

@ -47,4 +47,9 @@ export default async function ({ web }, db) {
document.body.classList.add(`enhancer--tweak-${tweak}`);
}
}
const imgAlignment = await db.get(['tweak.img_alignment']);
if (imgAlignment !== 'center') {
document.body.classList.add(`enhancer--tweak-img_alignment-${imgAlignment}`);
}
}

View File

@ -113,6 +113,12 @@
"label": "quote block quotation marks",
"tooltip": "**wrap quote block content in large, decorative serif quotation marks**",
"value": false
},
{
"type": "select",
"key": "tweak.img_alignment",
"label": "image alignment",
"values": ["center", "left", "right"]
}
]
}