« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/content/dependencies/transformContent.js7
-rw-r--r--src/static/css/site.css6
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;
 }