123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>New York Times Search</title>
  6. <!-- Bootstrap CSS -->
  7. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  8. <!-- Bootswatch Styling for Improving the Aesthetics -->
  9. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/flatly/bootstrap.min.css">
  10. <!-- Font Awesome CSS Icons (For cool glyphicons) -->
  11. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
  12. <!-- Style to fix the issue of text extending past panel length -->
  13. <style>
  14. .panel-body a
  15. {
  16. word-break:break-all
  17. }
  18. </style>
  19. </head>
  20. <body>
  21. <!-- Main Bootstrap Search -->
  22. <div class="container">
  23. <!-- Jumbotron for Title -->
  24. <div class="jumbotron" style="background-color: #20315A ; color: white;">
  25. <h1 class="text-center"><strong><i class="fa fa-newspaper-o"></i> New York Times Search</strong></h1>
  26. </div>
  27. <!-- Row for Searching New York Times -->
  28. <div class="row">
  29. <div class="col-sm-12">
  30. <br>
  31. <!-- First panel is for handling the search parameters -->
  32. <div class="panel panel-primary">
  33. <div class="panel-heading">
  34. <h3 class="panel-title"><strong><i class="fa fa-list-alt"></i> Search Parameters</strong></h3>
  35. </div>
  36. <div class="panel-body">
  37. <!-- Here we create an HTML Form for handling the inputs-->
  38. <form role="form">
  39. <!-- Here we create the text box for capturing the search term-->
  40. <div class="form-group">
  41. <label for="search">Search Term:</label>
  42. <input type="text" class="form-control" id="searchTerm">
  43. </div>
  44. <!-- Here we capture the number of records that the user wants to retrieve -->
  45. <div class="form-group">
  46. <label for="pwd">Number of Records to Retrieve:</label>
  47. <select class="form-control" id="numRecordsSelect">
  48. <option value=1>1</option>
  49. <!-- Setting the option for 5 as default -->
  50. <option value=10 selected>10</option>
  51. <option value=5>5</option>
  52. </select>
  53. </div>
  54. <!-- Here we capture the Start Year Parameter-->
  55. <div class="form-group">
  56. <label for="startYear">Start Year (Optional):</label>
  57. <input type="text" class="form-control" id="startYear">
  58. </div>
  59. <!-- Here we capture the End Year Parameter -->
  60. <div class="form-group">
  61. <label for="endYear">End Year (Optional):</label>
  62. <input type="text" class="form-control" id="endYear">
  63. </div>
  64. <!-- Here we have our final submit button -->
  65. <button type="submit" class="btn btn-default" id="runSearch"><i class="fa fa-search"></i> Search</button>
  66. <button type="button" class="btn btn-default" id="clearAll"><i class="fa fa-trash"></i> Clear Results</button>
  67. </form>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <!-- This row will handle all of the retrieved articles -->
  73. <div class="row">
  74. <div class="col-sm-12">
  75. <br>
  76. <!-- This panel will initially be made up of a panel and wells for each of the articles retrieved -->
  77. <div class="panel panel-primary">
  78. <!-- Panel Heading for the retrieved articles box -->
  79. <div class="panel-heading">
  80. <h3 class="panel-title"><strong><i class="fa fa-table"></i> Top Articles</strong></h3>
  81. </div>
  82. <!-- This main panel will hold each of the resulting articles -->
  83. <div class="panel-body" id="wellSection">
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. <!-- Footer Region -->
  89. <div class="row">
  90. <div class="col-sm-12">
  91. <!-- Line Break followed by closing -->
  92. <hr>
  93. <h5 class="text-center"><small>Made by Ahmed with lots and lots of <i class="fa fa-heart"></i></small></h5>
  94. </div>
  95. </div>
  96. </div>
  97. <!-- jQuery JS -->
  98. <script src="https://code.jquery.com/jquery.js"></script>
  99. <!-- Code to the Javascript File -->
  100. <script src="NYTCode.js"></script>
  101. </body>
  102. </html>