forked from indymedia/epicyon
Fixed dimensions
parent
9abf777e66
commit
0f4e269734
|
@ -1009,14 +1009,14 @@ def htmlRemplaceEmojiFromTags(content: str,tag: {}) -> str:
|
||||||
content=content.replace(tagItem['name'],emojiHtml)
|
content=content.replace(tagItem['name'],emojiHtml)
|
||||||
return content
|
return content
|
||||||
|
|
||||||
def addEmbeddedVideo(content: str,width=100) -> str:
|
def addEmbeddedVideo(content: str) -> str:
|
||||||
"""Adds embedded videos
|
"""Adds embedded videos
|
||||||
"""
|
"""
|
||||||
if '>vimeo.com/' in content:
|
if '>vimeo.com/' in content:
|
||||||
url=content.split('>vimeo.com/')[1]
|
url=content.split('>vimeo.com/')[1]
|
||||||
if '<' in url:
|
if '<' in url:
|
||||||
url=url.split('<')[0]
|
url=url.split('<')[0]
|
||||||
content=content+"<iframe src=\"https://player.vimeo.com/video/"+url+"\" width=\""+str(width)+"%\" height=\""+str(width)+"%\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe>"
|
content=content+"<iframe src=\"https://player.vimeo.com/video/"+url+"\" width=\"100%\" height=\"100%\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe>"
|
||||||
return content
|
return content
|
||||||
|
|
||||||
def individualPostAsHtml(baseDir: str, \
|
def individualPostAsHtml(baseDir: str, \
|
||||||
|
|
Loading…
Reference in New Issue