plugin('escapeHtml'); $blockId = $block->id(); $url = json_encode($this->url('api/timeline', ['block-id' => $blockId]), 320); // @see https://timeline.knightlab.com/docs/options.html $options = json_decode($options, true) ?: []; $options += [ 'start_at_slide' => 0, 'language' => substr($this->siteSetting('locale'), 0, 2), ]; // The container size is required inline to avoid 0-height issues with some themes. if (isset($options['container_style'])): $containerStyle = $options['container_style']; unset($options['container_style']); else: $containerStyle = 'width: 100%; height: 80vh;'; endif; $options = json_encode($options, 320); $js = <<headScript()->appendScript($js); ?>