<?php 
global $config, $settings;
if (!$config) {exit();}

ob_start();
?>
<style>
	#odf {
		box-shadow: var(--md-elevation-level2);
		margin:var(--marg);
	}
</style>
<div style="text-align:center">
	<div id="odf"></div>
	<script type="text/javascript">
		(new odf.OdfCanvas(document.getElementById("odf"))).load('<?php echo S::safeJS($url);?>');
	</script>
</div>
<?php
$contents = ob_get_clean();
$page = [
	'styles' => ['basic'],
	'scripts' => [
		$this->url.'/webodf.js?v='.$settings->currentVersion,
	],
	'loadMsg' => false,
	'noJSTrans' => true,
	'contents' => $contents
];
require $config['path']['includes'].'/ui/page/plugin.php';