{% extends "base.html" %}

{% block title %}some game{% endblock %}

{% block page_content %}

{% if game and game.game_record is not none %}
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title"> {{ game }} </h3>
    </div>

    <div class="panel-body">
      <div id="glift" style="display:block; position:relative; width:70%; height:500px">
    </div>
  </div>

  <script src="/static/glift.min.js"></script>
  <script>

  gliftWidget = glift.create({
    sgf: {
      sgfString: "{{game.game_record.decode()}}",
      widgetType: "GAME_VIEWER"
    },
    divId: "glift",
    display: {
      theme: 'DEPTH',
      disableZoomForMobile: true
    }
  });
    </script>
  {% else %}
  <h2> No game record found </h2>
  {% endif %}
{% endblock %}


{% extends "base.html" %}

{% block title %}some game{% endblock %}

{% block page_content %}

{% if game and game.game_record is not none %}
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title"> {{ game }} </h3>
    </div>

    <div class="panel-body">
      <div id="glift" style="display:block; position:relative; width:70%; height:500px">
    </div>
  </div>

  <script src="/static/glift.min.js"></script>
  <script>

  gliftWidget = glift.create({
    sgf: "{{url_for('api.get_game_sgf', game_id=game.id)}}",
    divId: "glift",
    display: {
      theme: 'DEPTH',
      disableZoomForMobile: true
    }
  });
    </script>
  {% else %}
  <h2> No game record found </h2>
  {% endif %}
{% endblock %}


Make glift work with sgf files containing newlines
Make glift work with sgf files containing newlines
