You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2018/01/12 19:26:42 UTC
allura git commit: Make Youtube embed work better with different CSS
Repository: allura
Updated Branches:
refs/heads/master cfae3b6c5 -> 900f57928
Make Youtube embed work better with different CSS
* grid-20 is unnecessary, just need a block-level element
* <p> gives us uniform left-padding and bottom
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/900f5792
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/900f5792
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/900f5792
Branch: refs/heads/master
Commit: 900f57928d26baa532a42897e35e755af02378fc
Parents: cfae3b6
Author: Dave Brondsema <da...@brondsema.net>
Authored: Fri Jan 12 14:06:07 2018 -0500
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Jan 12 14:06:07 2018 -0500
----------------------------------------------------------------------
Allura/allura/lib/macro.py | 2 +-
Allura/allura/tests/test_globals.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/900f5792/Allura/allura/lib/macro.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/macro.py b/Allura/allura/lib/macro.py
index 5aca72d..c65c504 100644
--- a/Allura/allura/lib/macro.py
+++ b/Allura/allura/lib/macro.py
@@ -469,6 +469,6 @@ def embed(url=None):
else:
embed_url = embed_url.geturl()
html.find('iframe')['src'] = embed_url
- return jinja2.Markup('<div class="grid-20">%s</div>' % html)
+ return jinja2.Markup('<p>%s</p>' % html)
return '[[embed url=%s]]' % url
http://git-wip-us.apache.org/repos/asf/allura/blob/900f5792/Allura/allura/tests/test_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index a3dd87d..b0650a5 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -338,8 +338,8 @@ def test_macro_embed(oembed_fetch):
"title": "Nature's 3D Printer: MIND BLOWING Cocoon in Rainforest - Smarter Every Day 94",
}
r = g.markdown_wiki.convert('[[embed url=http://www.youtube.com/watch?v=kOLpSPEA72U]]')
- assert_in('<div class="grid-20"><iframe height="270" '
- 'src="https://www.youtube.com/embed/kOLpSPEA72U?feature=oembed" width="480"></iframe></div>',
+ assert_in('<p><iframe height="270" '
+ 'src="https://www.youtube.com/embed/kOLpSPEA72U?feature=oembed" width="480"></iframe></p>',
r.replace('\n', ''))