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

{% block head_extra %}
    <script type="text/javascript" src="{% static 'js/webretro/embed/embed.js' %}"></script>
{% endblock %}

{% block title %}{{object.name}}{% endblock %}

{% block content %}
    <a href="{% url "games:game_list" %}">Back to list</a>

    <div id="webretro-container" style="width:800px; height:600px"></div>
    <script>webretroEmbed(document.getElementById("webretro-container"), "{% static 'js/webretro/index.html' %}", {core: "{{object.game_system.webretro_core}}", rom:"{{request.scheme}}://{{request.META.HTTP_HOST}}{{object.rom_file.url}}"});</script>
    <p><a href="{{object.rom_file.url}}">Download ROM</a></p>

    <p><img src={{object.screenshot.url}} /></p>

{% endblock %}
