<commit_before>{% extends "template.twig" %}

{% block content %}
  Message of the moments: <b> {{ message }} </b>
  <table class="table">
    <thead>
      <tr>
        <th>#</th>
        <th>Title</th>
        <th>Type</th>
      </tr>
    </thead>
    <tbody>


    {% for data in data %}
      <tr class={{ data.state }}>
        <th scope="row"> {{ loop.index }} </th>
        <td> {{ data.title }} </td>
        <td> {{ data.type }} </td>
      </tr>
    {% endfor %}
  </tbody>
</table>

<canvas id="mapCanvas" width="500" height="500" style="border:1px solid #d3d3d3;">
<img id="map" width="500" height="500" src="images/tilesets/map.png" >
<script>

var mapCanvas;
window.onload = function() {
    var mapCanvas = document.getElementById("mapCanvas");
    var ctx = mapCanvas.getContext("2d");
    var image = document.getElementById("map");
    ctx.drawImage(image, 0, 0);


    ctx.drawImage(imageBouton, 200, 200);

    window.addEventListener("click", fonctionAppeleeSurLeClic);
}



      var imageBouton = new Image();
      //imageBouton.addEventListener('load', myFunction, false);
      imageBouton.src = "images/tilesets/type_1.png";



      var fonctionAppeleeSurLeClic = function(e) {
  var positions = getMousePosition(e,mapCanvas);

  if ( positions[ 0 ] > 200 && positions[ 0 ] < 200 + 32
    && positions[ 1 ] > 200 && positions[ 1 ] < 200 + 32 ) {
    alert("clic sur le bouton");
  }
}

var getOffsetPosition = function(obj){
    var offsetX = offsetY = 0;

    if (obj.offsetParent) {
        do {
            offsetX += obj.offsetLeft;<commit_msg>JBA // micro cleanup<commit_after>{% extends "template.twig" %}

{% block content %}
  Message of the moments: <b> {{ message }} </b>
  <table class="table">
    <thead>
      <tr>
        <th>#</th>
        <th>Title</th>
        <th>Type</th>
      </tr>
    </thead>
    <tbody>


    {% for data in data %}
      <tr class={{ data.state }}>
        <th scope="row"> {{ loop.index }} </th>
        <td> {{ data.title }} </td>
        <td> {{ data.type }} </td>
      </tr>
    {% endfor %}
  </tbody>
</table>

<canvas id="mapCanvas" width="500" height="500" style="border:1px solid #d3d3d3;">
<script>

var mapCanvas;
window.onload = function() {
    var mapCanvas = document.getElementById("mapCanvas");
    var ctx = mapCanvas.getContext("2d");

    ctx.drawImage(image, 0, 0);


    ctx.drawImage(imageBouton, 200, 200);

    window.addEventListener("click", fonctionAppeleeSurLeClic);
}

  var image = new Image();
image.src = "images/tilesets/map.png";

      var imageBouton = new Image();
      //imageBouton.addEventListener('load', myFunction, false);
      imageBouton.src = "images/tilesets/type_1.png";



      var fonctionAppeleeSurLeClic = function(e) {
  var positions = getMousePosition(e,mapCanvas);

  if ( positions[ 0 ] > 200 && positions[ 0 ] < 200 + 32
    && positions[ 1 ] > 200 && positions[ 1 ] < 200 + 32 ) {
    alert("clic sur le bouton");
  }
}

var getOffsetPosition = function(obj){
    var offsetX = offsetY = 0;

    if (obj.offsetParent) {
        do {
            offsetX += obj.offsetLeft;
{'fraction_non_alphanumeric': 0.17374517374517376, 'fraction_numerical': 0.028314028314028315, 'mean_word_length': 2.7367788461538463, 'pattern_counts': {'":': 0, '<': 60, '<?xml version=': 0, '>': 60, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '759194', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1038, 'n_words': 245}