aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2019-10-30 10:51:43 +0000
committers-ol <s-ol@users.noreply.github.com>2019-10-30 10:51:43 +0000
commit3c79e6904c2df4e542d43b9e1068c75384fb6a89 (patch)
tree06deaaf1023db0f707f9a6f403c5b82683896bde
parentadd ba_log 2019-10-29 (diff)
downloadmmm-3c79e6904c2df4e542d43b9e1068c75384fb6a89.tar.gz
mmm-3c79e6904c2df4e542d43b9e1068c75384fb6a89.zip
fix embed in static rendered markdown
-rw-r--r--mmm/mmmfs/util.moon7
-rw-r--r--scss/_content.scss1
2 files changed, 5 insertions, 3 deletions
diff --git a/mmm/mmmfs/util.moon b/mmm/mmmfs/util.moon
index eb5d025..0e57f93 100644
--- a/mmm/mmmfs/util.moon
+++ b/mmm/mmmfs/util.moon
@@ -10,7 +10,7 @@ tourl = (path) ->
path .. '/'
(elements) ->
- import a, div, pre from elements
+ import a, div, span, pre from elements
find_fileder = (fileder, origin) ->
if 'string' == type fileder
@@ -53,8 +53,9 @@ tourl = (path) ->
ok, node = pcall fileder.gett, fileder, name, 'mmm/dom'
if not ok
- return div "couldn't embed #{fileder} #{name}",
+ return span "couldn't embed #{fileder} #{name}",
(pre node),
+ class: 'embed'
style: {
background: 'var(--gray-fail)',
padding: '1em',
@@ -64,7 +65,7 @@ tourl = (path) ->
klass ..= ' desc' if opts.desc
klass ..= ' inline' if opts.inline
- node = div {
+ node = span {
class: klass
node
if opts.desc
diff --git a/scss/_content.scss b/scss/_content.scss
index 6993fef..51994a3 100644
--- a/scss/_content.scss
+++ b/scss/_content.scss
@@ -27,6 +27,7 @@
}
.embed {
+ display: block;
width: inherit;
height: inherit;
max-width: inherit;