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
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. $additional_titles = ten_random_titles($core);
  12. ?>
  13. <!DOCTYPE html>
  14. <html lang="en">
  15. <head>
  16. <title>Performing Patents Otherwise: Archival conversations with 320.000 clothing inventions</title>
  17. <meta charset="utf-8">
  18. <meta name="viewport" content="width=device-width, initial-scale=1">
  19. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
  20. <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>
  21. <link rel="stylesheet" type="text/css" href="css/style.css">
  22. </head>
  23. <body>
  24. <div class="container">
  25. <button class="float-end btn btn-danger" onclick="removeRandomTitle()">-</button>
  26. <button class="float-end btn btn-danger" onclick="addRandomTitle()">+</button>
  27. <?php
  28. foreach ($random_titles as $record_array):
  29. ?>
  30. <?
  31. foreach ($record_array as $id => $title):
  32. ?>
  33. <span class="title">
  34. <a href="id_search.php?id=<? echo $id; ?>&core=all">
  35. <?
  36. echo $title;
  37. ?>
  38. </a>
  39. </span>
  40. <?
  41. endforeach;
  42. ?>
  43. <br><br>
  44. <hr>
  45. <?php
  46. endforeach;
  47. ?>
  48. </div>
  49. <script>
  50. var titles = <?php echo json_encode($additional_titles); ?>;
  51. x = 0;
  52. function addRandomTitle(){
  53. var record_array = titles[x];
  54. let title = "";
  55. for (const id in record_array) {
  56. title += record_array[id];
  57. document.querySelector('.container').innerHTML += "<a href='id_search.php?id=" + id + "&core=all'><span class='title'>" + title + "</span></a><br><br><hr>";
  58. x++;
  59. }
  60. }
  61. function removeRandomTitle() {
  62. var elts = document.getElementsByClassName("title");
  63. var RandomSpan = elts[Math.floor(Math.random() * elts.length)];
  64. var TextReplacement = RandomSpan.textContent.replace(/\w/g,"-");
  65. RandomSpan.removeAttribute("href");
  66. RandomSpan.innerHTML = TextReplacement;
  67. }
  68. </script>
  69. </body>
  70. </html>