mirror of
https://git.cmoser.eu/tinytools/django-tinywiki.git
synced 2026-02-04 06:06:33 +01:00
2026.01.02 09:05:15 (cachyos.cmoser.eu)
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -443,4 +443,6 @@ pip-selfcheck.json
|
|||||||
|
|
||||||
django_project/local/
|
django_project/local/
|
||||||
.data
|
.data
|
||||||
|
.static
|
||||||
|
.media
|
||||||
db.sqlite
|
db.sqlite
|
||||||
|
|||||||
@@ -404,7 +404,6 @@ def render_youtube_video(tag_name: str, value, options, parent, context):
|
|||||||
div_classes = []
|
div_classes = []
|
||||||
div_styles = []
|
div_styles = []
|
||||||
|
|
||||||
|
|
||||||
if 'width' in options:
|
if 'width' in options:
|
||||||
_w = options['width']
|
_w = options['width']
|
||||||
if _w.endswith('px') or _w.endswith('em') or _w.endswith('rem'):
|
if _w.endswith('px') or _w.endswith('em') or _w.endswith('rem'):
|
||||||
@@ -476,7 +475,7 @@ def render_youtube_video(tag_name: str, value, options, parent, context):
|
|||||||
div_style = ""
|
div_style = ""
|
||||||
if settings.USE_BOOTSTRAP:
|
if settings.USE_BOOTSTRAP:
|
||||||
return f"""<div class=""{' '.join(div_classes)}" {div_style}>
|
return f"""<div class=""{' '.join(div_classes)}" {div_style}>
|
||||||
<iframe class="{' '.join(classes)}" src="https://www.youtube.com/embgit ed/{options[tag_name]}?rel=0" allowfullscreen></iframe>
|
<iframe class="{' '.join(classes)}" src="https://www.youtube.com/embed/{options[tag_name]}?rel=0" allowfullscreen></iframe>
|
||||||
</div>""" # noqa: E501
|
</div>""" # noqa: E501
|
||||||
else:
|
else:
|
||||||
return f'<div {div_style}><iframe src="https://www.youtube.com/embed/{options[tag_name]}?rel=0" allowfullscreen></iframe></div>' # noqa: E501
|
return f'<div {div_style}><iframe src="https://www.youtube.com/embed/{options[tag_name]}?rel=0" allowfullscreen></iframe></div>' # noqa: E501
|
||||||
|
|||||||
Reference in New Issue
Block a user