<commit_before><html>
<head>
  <title>Cook Book Search</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
  <style>
    #alert {
      top: 0px;
      position: fixed;
      width: 100%;
    }
    .title{
      font-weight: bold;
      font-size: 200%;
    }
    .item{
      background-color: red;
      /*height: 20px;
      margin: 10px;
      padding: 20px;*/
      color: #fff;
      padding: 1em;
      margin-bottom: 0.25em;
    }
    body{
      width:80%;
      margin-left: auto;
      margin-right: auto;
    }
  </style>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

  <script>
    $(document).ready(function(){
      var url="get_all_json.php";
      $.getJSON( url, function( data ) {
          for(var i=0;i<data.length;i++){
            $("#main").append($("<a>").append($("<div>")
                .attr("id", data[i].pid)
                .addClass('item')
                .text(data[i].title))
              .attr("href", "edit.php?pid=" + data[i].pid)
              .addClass('title')
            );
                     
          }
        
      });
    });
  </script>
</head>
<body>
  <div id="main">

  </div>
</body>
</html>
<commit_msg>filter list and link clicking now working<commit_after><html>
<head>
  <title>Cook Book Search</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
  <style>
    #alert {
      top: 0px;
      position: fixed;
      width: 100%;
    }
    .title{
      font-weight: bold;
      font-size: 200%;
    }
    .item{
      background-color: red;
      /*height: 20px;
      margin: 10px;
      padding: 20px;*/
      color: #fff;
      padding: 1em;
      margin-bottom: 0.25em;
    }
    body{
      width:80%;
      margin-left: auto;
      margin-right: auto;
      padding: 1em;
    }
    input{
      width:100%;
      margin-bottom: 10px;
      font-size: 200%;

    }
  </style>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

  <script>
    $(document).ready(function(){
      var url="get_all_json.php";
      $.getJSON( url, function( data ) {
          for(var i=0;i<data.length;i++){
            $("#results").append($("<div>")
                .addClass('item')
                .attr("ingredients", data[i].ingredients)
                .attr("id", data[i].pid)
                .attr("pid", data[i].pid)
            );

            $("#" + data[i].pid).append($("<div>")
                .text(data[i].title)
                .addClass('title')
            )

            $("#" + data[i].pid).append($("<div>")
              .attr("ingredients", data[i].ingredients)
              .text(data[i].ingredients) 
            )                     
          }
      });

      $("#search").keyup(function(){
        var v=$(this).val();
        $(".item").hide();
        $( ".item:contains('"+v+"')" ).show();
        console.log(v);
      });
  
      $("#results").on('click','.item',function(){
        var pid = $(this).attr("pid");
        window.location.href = "edit.php?pid=" + pid;
      });
    });
  </script>
</head>
<body>
  <div id="main">
    <input id="search" type="text" placeholder="Enter Search"/>
    <div id="results"></div>
  </div>
</body>
</html>

{'fraction_non_alphanumeric': 0.20037604082728983, 'fraction_numerical': 0.0196078431372549, 'mean_word_length': 1.9322834645669291, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 53, 'https://': 2, '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': '2153125', 'n_tokens_mistral': 1321, 'n_tokens_neox': 1244, 'n_words': 201}