catalog.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!DOCTYPE html>
  2. <html lang='en'>
  3. <head>
  4. <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
  5. <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
  6. <title><?=$page->title?></title>
  7. <link rel='shortcut icon' href='<?=$page->favicon?>'/>
  8. <!-- CSS files -->
  9. <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
  10. <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>catalog.css'/>
  11. <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>filters.css'/>
  12. <!-- Meta tags -->
  13. <link rel='canonical' href='<?=$page->canonical?>'/>
  14. <link rel='author' href='<?=$page->author?>'/>
  15. <link rel='publisher' href='<?=$page->author?>'/>
  16. <meta name='description' content='<?=$page->description?>'/>
  17. <meta property='og:title' content='<?=$page->title?>'/>
  18. <meta property='og:url' content='<?=$page->canonical?>'/>
  19. <meta property='og:description' content='<?=$page->description?>'/>
  20. <meta property='og:image' content='<?=$page->icon?>'/>
  21. <meta property='og:site_name' content='<?=$page->name?>'/>
  22. <meta property='og:type' content='website'/>
  23. <meta property='og:locale' content='en'/>
  24. <meta name='twitter:card' content='summary'/>
  25. <meta name='twitter:title' content='<?=$page->title?>'/>
  26. <meta name='twitter:description' content='<?=$page->description?>'/>
  27. <meta name='twitter:image' content='<?=$page->icon?>'/>
  28. <meta name='twitter:url' content='<?=$page->canonical?>'/>
  29. <meta name='robots' content='index follow'/>
  30. <script>
  31. /**
  32. * Shows or hiddes the filters panel.
  33. */
  34. function toggleFilters(){
  35. var content = document.getElementById('filters_content');
  36. var slid = document.getElementById('filters_slid');
  37. if (content.style.maxHeight != '30em'){
  38. content.style.maxHeight = '30em';
  39. slid.style.transform = 'rotate(90deg)';
  40. }
  41. else{
  42. content.style.maxHeight = '0px';
  43. slid.style.transform = 'rotate(0deg)';
  44. }
  45. };
  46. </script>
  47. </head>
  48. <body>
  49. <?php
  50. include __DIR__ . "/inc/header.php";
  51. ?>
  52. <section class='filters'>
  53. <h2 id='filters_title' onClick='toggleFilters();'>
  54. <img id='filters_slid' id='filters_slid' alt=' ' src='<?=$path["img"]["icon"]?>slid.png'/>
  55. Catalog filters
  56. </h2>
  57. <article id='filters_content'>
  58. <?php
  59. $filters = $page->filters;
  60. $custom_filters = $page->custom_filters;
  61. include __DIR__ . "/inc/filter_catalog.php";
  62. ?>
  63. </article>
  64. </section> <!-- #filters -->
  65. <section class='list'>
  66. <h2>
  67. Catalog
  68. </h2>
  69. <article>
  70. <?php
  71. $element = "";
  72. foreach ($page->monsters as $mon){
  73. if ($mon->element != $element){
  74. if ($element != ""){
  75. ?>
  76. </article>
  77. <article>
  78. <?php
  79. }
  80. $element = $mon->element;
  81. }
  82. ?>
  83. <div class='monster'>
  84. <a href='/<?=$UID?>/catalog/<?=$mon->id?>'>
  85. <div class='monster_panel'>
  86. <?=html_unit_panel($mon)?>
  87. </div>
  88. </a>
  89. </div>
  90. <?php
  91. }
  92. ?>
  93. </article>
  94. </section> <!-- #catalog -->
  95. <?php
  96. include __DIR__ . "/inc/footer.php";
  97. ?>
  98. </body>
  99. </html>