Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching to a more dynamic system of iFrame resizing for openshot.org #5012

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/_templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }} - <a href="http://www.openshot.org/">www.openshot.org</a>.{% endtrans %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }} - <a data-iframe-height href="http://www.openshot.org/">www.openshot.org</a>.{% endtrans %}
{%- endif %}
{%- endif %}

Expand Down Expand Up @@ -48,4 +48,4 @@

{%- block extrafooter %} {% endblock %}

</footer>
</footer>
17 changes: 3 additions & 14 deletions doc/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
{% extends "!layout.html" %}
{% set css_files = css_files + ["_static/tablefix.css"] %}
{%- block footer %}
<script src="//cdn.openshot.org/static/vendor/iframeSizer/iframeResizer.contentWindow.min.js"></script>
<script>
$( document ).ready(function() {
console.log( "OpenShot Documentation page ready" );
const height = document.body.scrollHeight;
const href = location.href;
if (window.parent) {
location.href.includes('index.html')
window.parent.postMessage(
{height, href}
);
}
});

<!-- Adds target=_blank to external links -->
$(document).ready(function () {
$('a[href^="http://"], a[href^="https://"]').not('a[class*=internal]').attr('target', '_blank');
<!-- Adds target=_blank to external links -->
$('a[href^="http://"], a[href^="https://"]').not('a[class*=internal]').attr('target', '_blank');
});
</script>
{% endblock %}