<commit_before>-extends "bootstrap3/bootstrap3.html"

-load leaflet_tags

-block bootstrap3_extra_head
  %link{href: "/static/css/styles.css", rel: "stylesheet"}
  -leaflet_js
  -leaflet_css

  :css
    .leaflet-container {
        width:  100%;
        height: 100vh;
    }

    body {
        padding-top: 51px; /*for navbar*/
    }

  :javascript
    function center_location (position) {
      resto_map.setView([position.coords.latitude, position.coords.longitude], 16);
    }

    function map_init (map, options) {
      resto_map = map

      $.getJSON("restaurants.json", function(data) {
        for (var i = 0; i < data.length; i ++) {
          var resto = data[i];
          L.marker([resto.lat, resto.lon]).addTo(map).bindPopup('<center><h4>' + resto.name + '</h4></center><hr>' + resto.address + '<br>' + resto.phone + '<br><a href="' + resto.website + '">' + resto.website + '</a><br><a href="restaurant/' + resto.id + '/">Plus d\'informations</a>');
        }
      })

      navigator.geolocation.getCurrentPosition(center_location);
    }

-block bootstrap3_content
  .navbar.navbar-fixed-top.navbar-bold{data-spy: "affix", data-offset-top: "1000"}
    .container
      .navbar-header
        %a.navbar-brand{href: "#"}
          Veg'Out
        %a.navbar-toggle{data-toggle: "collapse", data-target: ".navbar-collapse"}
          %span.icon-bar
          %span.icon-bar
          %span.icon-bar
      -#
        #navbar.collapse.navbar-collapse
          %ul.nav.navbar-nav
            %li.active
              %a{href: "#"} Home
            %li
              %a{href: "#about"} About
            %li
              %a{href: "#contact"} Contact

  .container
  -leaflet_map "map" callback="window.map_init"<commit_msg>[enh] add a dummy search bar<commit_after>-extends "bootstrap3/bootstrap3.html"

-load leaflet_tags

-block bootstrap3_extra_head
  %link{href: "/static/css/styles.css", rel: "stylesheet"}
  -leaflet_js
  -leaflet_css

  :css
    .leaflet-container {
        width:  100%;
        height: 100vh;
    }

    body {
        padding-top: 51px; /*for navbar*/
    }

  :javascript
    function center_location (position) {
      resto_map.setView([position.coords.latitude, position.coords.longitude], 16);
    }

    function map_init (map, options) {
      resto_map = map

      $.getJSON("restaurants.json", function(data) {
        for (var i = 0; i < data.length; i ++) {
          var resto = data[i];
          L.marker([resto.lat, resto.lon]).addTo(map).bindPopup('<center><h4>' + resto.name + '</h4></center><hr>' + resto.address + '<br>' + resto.phone + '<br><a href="' + resto.website + '">' + resto.website + '</a><br><a href="restaurant/' + resto.id + '/">Plus d\'informations</a>');
        }
      })

      navigator.geolocation.getCurrentPosition(center_location);
    }

-block bootstrap3_content
  .navbar.navbar-fixed-top.navbar-bold{data-spy: "affix", data-offset-top: "1000"}
    .container
      .navbar-header
        %a.navbar-brand{href: "#"}
          Veg'Out
        %a.navbar-toggle{data-toggle: "collapse", data-target: ".navbar-collapse"}
          %span.icon-bar
          %span.icon-bar
          %span.icon-bar
      #navbar.collapse.navbar-collapse
        %form.navbar-form.navbar-left{role: "search"}
          .form-group
            %input.form-control{type: "text", placeholder: "Restaurant"}
          %button.btn.btn-default{type: "submit"}
            Rechercher
        -#
          %ul.nav.navbar-nav
            %li.active
              %a{href: "#"} Home
            %li
              %a{href: "#about"} About
            %li
              %a{href: "#contact"} Contact

  .container
  -leaflet_map "map" callback="window.map_init"
{'fraction_non_alphanumeric': 0.16302883319859876, 'fraction_numerical': 0.01131770412287793, 'mean_word_length': 2.2589991220368746, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 27, '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': '1857514', 'n_tokens_mistral': 1304, 'n_tokens_neox': 1227, 'n_words': 212}