{% import 'macros/form.html' as form %} {% set preset_labels = { 'strict': _('Strict: static HTML, no scripts'), 'interactive': _('Interactive: scripts, popups and downloads, no storage'), 'external': _('External: a trusted third-party site, no sandbox (runs as Interactive for now)'), 'data-schematic': _('Data Schematic: qsv Data Schematics'), } %} {# TRANSLATORS: how the embedded page's height is set; "Auto" means the page reports its own height. #} {% set height_labels = { 'auto': _('Auto'), 'fixed': _('Fixed (px)'), 'viewport': _('Share of the window height, in percent'), 'aspect': _('Aspect ratio (e.g. 16/9)'), } %} {# TRANSLATORS: names of security presets, as in "the External preset". #} {% set preset_names = { 'strict': _('Strict'), 'interactive': _('Interactive'), 'external': _('External'), 'data-schematic': _('Data Schematic'), } %} {% asset 'webpageviewplus/webpageviewplus-js' %} {{ form.input('page_url', id='field-page_url', label=_('Web Page url'), placeholder=_('eg. http://example.com (if blank uses resource url)'), value=data.page_url, error=errors.page_url, classes=['control-full', 'control-large']) }} {# Well-known services (YouTube, Datawrapper...): offers the embed address and the settings the embed needs. Filled in by the script. #}
{% if frameability_check %}
{% endif %}
{% if errors.preset %}{{ errors.preset | join(', ') }}{% endif %}
{% if frame and 'degraded' in frame.notices %}
{{ _('This preset needs uploaded HTML to be served from a separate content origin, which this site doesn\'t have yet, so the view runs as Interactive.') }} {% if (data.preset or default_preset) == 'data-schematic' %}{{ _('Charts, the Tour and Explore work, but maps stay blank.') }}{% endif %}
{% endif %} {% if frame and 'same_origin_fallback' in frame.notices %}
{{ _('This view\'s sandbox would let scripts keep a real origin, which isn\'t allowed here, so it runs as Strict.') }}
{% endif %} {% if frame and 'credentialless' in frame.notices %}
{{ _('In Chrome and Edge, this site loads pages with this preset without the visitor\'s cookies or saved data, so logins inside the page and sign-in popups won\'t work.') }}
{% endif %}
{% if errors.height_mode %}{{ errors.height_mode | join(', ') }}{% endif %}
{{ form.input('height_value', id='field-height_value', label=_('Height value'), placeholder=_('eg. 600, 80 or 16/9'), value=data.height_value, error=errors.height_value, classes=['control-medium']) }}
{% if view_counting %}
{% if view_counts and data.count_views in (true, 'true', 'True') %} {% set t = view_counts.totals %}

{# TRANSLATORS: view counts as "label: number" pairs, so no plural forms are needed. #} {{ _('Last 30 days. Shown: {impressions}. Seen: {seen}. Loaded: {loaded}. Used: {engaged}. Failed: {failed}.').format(**t) }}

{% endif %} {% endif %}
{% if can_set_advanced %}
{# TRANSLATORS: heading of the advanced (sysadmin-only) settings. #} {{ _('Advanced') }} {{ form.input('sandbox', id='field-sandbox', label=_('Sandbox tokens (replace the preset\'s)'), placeholder=_('eg. allow-scripts allow-popups'), value=data.sandbox, error=errors.sandbox, classes=['control-full']) }} {{ form.input('allow', id='field-allow', label=_('Allowed features (replace the preset\'s)'), placeholder=_('eg. fullscreen; clipboard-write'), value=data.allow, error=errors.allow, classes=['control-full']) }}
{% if errors.referrer_policy %}{{ errors.referrer_policy | join(', ') }}{% endif %}
{% endif %}