NYTExample.html 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. </head>
  13. <body>
  14. <!-- Main Bootstrap Search -->
  15. <div class="container">
  16. <!-- Jumbotron for Title -->
  17. <div class="jumbotron" style="background-color: #20315A ; color: white;">
  18. <h1 class="text-center"><strong><i class="fa fa-newspaper-o"></i> New York Times Search</strong></h1>
  19. </div>
  20. <!-- Row for Searching New York Times -->
  21. <div class="row">
  22. <div class="col-lg-12">
  23. <br>
  24. <!-- First panel is for handling the search parameters -->
  25. <div class="panel panel-primary">
  26. <div class="panel-heading">
  27. <h3 class="panel-title"><strong><i class="fa fa-list-alt"></i> Search Parameters</strong></h3>
  28. </div>
  29. <div class="panel-body">
  30. <!-- Here we create an HTML Form for handling the inputs-->
  31. <form role="form">
  32. <!-- Here we create the text box for capturing the search term-->
  33. <div class="form-group">
  34. <label for="search">Search Term:</label>
  35. <input type="text" class="form-control" id="searchTerm">
  36. </div>
  37. <!-- Here we capture the number of records that the user wants to retrieve -->
  38. <div class="form-group">
  39. <label for="pwd">Number of Records to Retrieve:</label>
  40. <select class="form-control" id="numRecordsSelect">
  41. <option value=1>1</option>
  42. <option value=5>5</option>
  43. <option value=10>10</option>
  44. </select>
  45. </div>
  46. <!-- Here we capture the Start Year Parameter-->
  47. <div class="form-group">
  48. <label for="startYear">Start Year (Optional):</label>
  49. <input type="text" class="form-control" id="startYear">
  50. </div>
  51. <!-- Here we capture the End Year Parameter -->
  52. <div class="form-group">
  53. <label for="endYear">End Year (Optional):</label>
  54. <input type="text" class="form-control" id="endYear">
  55. </div>
  56. <!-- Here we have our final submit button -->
  57. <button type="button" class="btn btn-default" id="runSearch"><i class="fa fa-search"></i> Search</button>
  58. <button type="button" class="btn btn-default" id="clearAll"><i class="fa fa-trash"></i> Clear Results</button>
  59. </form>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <!-- This row will handle all of the retrieved articles -->
  65. <div class="row">
  66. <div class="col-lg-12">
  67. <br>
  68. <!-- This panel will initially be made up of a panel and wells for each of the articles retrieved -->
  69. <div class="panel panel-primary">
  70. <!-- Panel Heading for the retrieved articles box -->
  71. <div class="panel-heading">
  72. <h3 class="panel-title"><strong><i class="fa fa-table"></i> Top Articles</strong></h3>
  73. </div>
  74. <!-- This main panel will hold each of the resulting articles -->
  75. <div class="panel-body" id="wellSection">
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <!-- Footer Region -->
  81. <div class="row">
  82. <div class="col-lg-12">
  83. <!-- Line Break followed by closing -->
  84. <hr>
  85. <h5 class="text-center"><small>Made by Ahmed with lots and lots of <i class="fa fa-heart"></i></small></h5>
  86. </div>
  87. </div>
  88. </div>
  89. <!-- jQuery JS -->
  90. <script src="https://code.jquery.com/jquery.js"></script>
  91. <!-- Code to the Javascript File -->
  92. <script src="NYTCode.js"></script>
  93. </body>
  94. </html>