{% extends "base.html" %}{% load i18n %}

{% block content %}

<div class="bubble pad-10">
    {% if page_title %}
        <p>{% blocktrans %}The shortened URL for the page <strong>{{ page_title }}</strong> is:{% endblocktrans %}</p>
    {% else %}
        <p>{% blocktrans %}The shortened URL for the page is:{% endblocktrans %}</p>
    {% endif %}

  <p class="center" style="font-size:150%"><a href="{{ url }}">{{ url }}</a></p>

  <p>{% trans "You can also use your phone to scan the following barcode:" %}</p>

  <p class="center">
    <img class="qr-code" src="http://chart.apis.google.com/chart?cht=qr&amp;chs=200x200&amp;chld=L|1&amp;chl={{ url|urlencode }}" style="width:100%; max-width:200px" />
  </p>

{# Facebook, Twitter, and Email sharing icons #}

<p>{% trans "Click on the links below to share this page" %}</p>

<ul id="transport-links">
    <li class="transport-link"><a href="http://www.facebook.com/sharer/sharer.php?u={{ url }}"><img src="{{ STATIC_URL }}site/images/icons/facebook2.png" border="0"/></a></li>
    <li class="transport-link"><a href="http://twitter.com/home?status={% if page_title %}{{ page_title }} on {{ site_name }}{% endif %} {{ url }}"><img src="{{ STATIC_URL }}site/images/icons/twitter2.png" border="0"/></a></li>
    <li class="transport-link"><a href="mailto:?subject={% if page_title %}{{ page_title }} From {{ site_name }}{% endif %}&body={% if page_title %}{{ page_title }} From site_name{% endif %} {{ url }}"><img src="{{ STATIC_URL }}site/images/icons/email2.png" border="0"/></a></li>
</ul>


  <p><a href="{{ path }}">{% trans "You may wish to go back to the previous page" %}</a>.</p>

{% if use_javascript %}
    <script type="text/javascript">
      function resizeQR() {
        $('.qr-code').css('max-width', ((window.innerHeight < window.innerWidth) ? window.innerHeight : window.innerWidth) - 20);
      };
      $(resizeQR); $(window).resize(resizeQR);
    </script>
{% endif %}
</div>

{% endblock %}

{% block url_shorten_link %}{% endblock %}
