A search interface for data from the Politics of Patents case study (part of Copim WP6): this parses data from the archive of RTF files and provides additional data from the European Patent Office API. https://patents.copim.ac.uk
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.7KB

  1. <?php
  2. # @name: titles.php
  3. # @version: 0.1
  4. # @creation_date: 2021-09-24
  5. # @license: The MIT License <https://opensource.org/licenses/MIT>
  6. # @author: Simon Bowie <ad7588@coventry.ac.uk>
  7. # @purpose: Displays ten random titles
  8. include '../solr.php';
  9. $core = 'all';
  10. $random_titles = ten_random_titles($core);
  11. ?>
  12. <!DOCTYPE html>
  13. <html lang="en">
  14. <head>
  15. <title>Performing Patents Otherwise: Archival conversations with 320.000 clothing inventions</title>
  16. <meta charset="utf-8">
  17. <meta name="viewport" content="width=device-width, initial-scale=1">
  18. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
  19. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
  20. <link rel="stylesheet" type="text/css" href="css/style.css">
  21. </head>
  22. <body>
  23. <div class="container">
  24. <button class="float-end btn btn-danger" onclick="removeRandomTitle()">-</button>
  25. <?php
  26. foreach ($random_titles as $record_array):
  27. ?>
  28. <?
  29. foreach ($record_array as $id => $title):
  30. ?>
  31. <a href="id_search.php?id=<? echo $id; ?>&core=all">
  32. <span class="title">
  33. <?
  34. echo $title;
  35. ?>
  36. </span>
  37. </a>
  38. <?
  39. endforeach;
  40. ?>
  41. <br><br>
  42. <hr>
  43. <?php
  44. endforeach;
  45. ?>
  46. </div>
  47. <script>
  48. function removeRandomTitle() {
  49. var elts = document.getElementsByClassName("title");
  50. var RandomSpan = elts[Math.floor(Math.random() * elts.length)];
  51. RandomSpan.innerHTML = "";
  52. }
  53. </script>
  54. </body>
  55. </html>