diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-06-03 16:30:06 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-03 16:30:06 -0300 |
commit | d519780f9863ad8fa0bd3057e308f07c112f0985 (patch) | |
tree | 73db0b6db9b94668a670c0ed3be27bdbafde09f1 /src | |
parent | 10174e6b269c8479ebeb12b3e76a694327aafd73 (diff) |
content, css: transformContent: support align="center" inline
Diffstat (limited to 'src')
-rw-r--r-- | src/content/dependencies/transformContent.js | 7 | ||||
-rw-r--r-- | src/static/css/site.css | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js index 0904cde6..695f1be3 100644 --- a/src/content/dependencies/transformContent.js +++ b/src/content/dependencies/transformContent.js @@ -262,6 +262,10 @@ export default { height && {height}, style && {style}, + align === 'center' && + !link && + {class: 'align-center'}, + pixelate && {class: 'pixelate'}); @@ -271,6 +275,9 @@ export default { {href: link}, {target: '_blank'}, + align === 'center' && + {class: 'align-center'}, + {title: language.$('misc.external.opensInNewTab', { link: diff --git a/src/static/css/site.css b/src/static/css/site.css index eb1edb2f..aff773c5 100644 --- a/src/static/css/site.css +++ b/src/static/css/site.css @@ -1143,6 +1143,12 @@ ul.image-details li { margin-bottom: 1.5em; } +a.align-center, img.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + .content-image { display: inline-block !important; } |