{% asset 'webpageviewplus/webpageviewplus-css' %} {% asset 'webpageviewplus/webpageviewplus-js' %} {% if frame and refused %} {# A page browsers won't show here: a card instead of a blank frame. #}

{{ frame.title }}

{% if refused == 'mixed' %}

{{ _("This page can't be shown here: it's served over http://, which browsers block inside https:// sites.") }}

{% else %}

{{ _("{host} doesn't allow its pages to be shown inside other sites.").format(host=refused_host) }}

{% endif %} {% if 'open' in controls %} {{ _('Open in new tab') }} {% endif %}
{% elif frame %} {% set desc_id = ('webpageviewplus-desc-' ~ resource_view.id) if resource_view and resource_view.id and resource_view.description else none %} {# No skip link in the form's preview, which has no view id to key it on. #} {% set after_id = ('webpageviewplus-after-' ~ resource_view.id) if resource_view and resource_view.id else none %}
{# Warms the connection before the (lazy) frame needs it. Frame navigation isn't CORS, so no crossorigin. #} {% if preconnect and not held_back %}{% endif %} {% if after_id %}{{ _('Skip embedded content') }}{% endif %} {% set stage %} {# Touch screens, frames taller than half the screen: lets the page scroll past the frame until the reader taps it. Shown by the script. #} {% endset %} {% if held_back %} {# Consent (a third-party page) or Save-Data: a card instead of the page, which the script loads from the template on request. Nothing is requested from the page's host until then. #}

{{ frame.title }}

{% if held_back == 'consent' %}

{{ _('This view loads content from {host}.').format(host=consent_host) }}

{% else %}

{{ _('Not loaded, to save data.') }}

{% endif %}
{% else %} {{ stage }} {% endif %} {% if desc_id %}

{{ resource_view.description }}

{% endif %} {# The skip link lands here: past the frame, before the control bar, so the next Tab reaches Open in new tab. #} {% if after_id %}{% endif %}

{% if connections %}
{{ _('This page connects to') }}
{% endif %} {% if count_url %}

{{ _('This view counts visits.') }} {% if privacy_policy_url %}{{ _('Privacy policy') }}{% endif %}

{% endif %} {% if show_controls and controls %} {# TRANSLATORS: accessible name of the toolbar under an embedded web page. #} {% elif 'open' in controls %} {# This view hides its bar, but the site still offers Open in new tab: shown only on narrow screens (and 400% zoom), where the frame is hardest to use. #} {{ _('Open in new tab') }} {% endif %}
{% elif frame_error == 'host' %}

{{ _("This page can't be embedded: its host isn't on this site's list of allowed hosts.") }}

{% else %}

{{ _('This page cannot be embedded: only http:// and https:// URLs are supported.') }}

{% endif %}