tag.jet.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <div class="container">
  2. <div class="tag-header">
  3. {{ if Tag.Metadata.ID }}
  4. <a href="/artworks/{{ Tag.Metadata.ID }}">
  5. <img class="tag-thumbnail" src="{{ Tag.Metadata.Image }}" alt="{{ Tag.Name }}" />
  6. </a>
  7. {{ end }}
  8. <div class="tag-details">
  9. <b class="main-tag">#{{ Tag.Name }}</b>
  10. <span class="translated-tag">{{ Tag.Metadata.Name }}</span>
  11. <br />
  12. <br />
  13. <span><b>{{ Data.Artworks.Total }}</b> works</span>
  14. <p class="tag-description">{{ Tag.Metadata.Detail }}</p>
  15. </div>
  16. </div>
  17. <div class="artwork-container-scroll">
  18. {{ range Data.RelatedTags }}
  19. <a href="/tags/{{ . }}">
  20. <div class="tag-container">
  21. <div class="main">#{{ . }}</div>
  22. </div>
  23. </a>
  24. {{ end }}
  25. </div>
  26. <div class="switcher">
  27. <div class="switch-title">Category</div>
  28. {{ URL := URLC(Queries, "category") }}
  29. <a href='{{URL}}artworks#checkpoint' class="switch-button">Artworks</a>
  30. <a href='{{URL}}illustrations#checkpoint' class="switch-button">Illustrations</a>
  31. <a href='{{URL}}manga#checkpoint' class="switch-button">Manga</a>
  32. </div>
  33. <div class="switcher">
  34. <div class="switch-title">Order</div>
  35. {{ URL := URLC(Queries, "order") }}
  36. <a href='{{URL}}date_d#checkpoint' class="switch-button">Newest</a>
  37. <a href='{{URL}}date#checkpoint' class="switch-button">Oldest</a>
  38. </div>
  39. <div class="switcher">
  40. <div class="switch-title">Filter</div>
  41. {{ URL := URLC(Queries, "mode") }}
  42. <a href='{{URL}}all#checkpoint' class="switch-button">All</a>
  43. <a href='{{URL}}safe#checkpoint' class="switch-button">Safe</a>
  44. <a href='{{URL}}r18#checkpoint' class="switch-button">R-18</a>
  45. </div>
  46. <div class="switcher">
  47. <div class="switch-title">Ratio</div>
  48. {{ URL := URLC(Queries, "ratio") }}
  49. <a href='{{URL}}#checkpoint' class="switch-button">All</a>
  50. <a href='{{URL}}-0.5#checkpoint' class="switch-button">Portrait</a>
  51. <a href='{{URL}}0#checkpoint' class="switch-button">Square</a>
  52. <a href='{{URL}}0.5#checkpoint' class="switch-button">Landscape</a>
  53. </div>
  54. <div class="switcher">
  55. <div class="switch-title">Search mode</div>
  56. {{ URL := URLC(Queries, "smode") }}
  57. <a href='{{URL}}#checkpoint' class="switch-button">None</a>
  58. <a href='{{URL}}s_tag_full#checkpoint' class="switch-button">Exact (tags)</a>
  59. <a href='{{URL}}s_tag#checkpoint' class="switch-button">Partial (tags)</a>
  60. <a href='{{URL}}s_tc#checkpoint' class="switch-button">Title/Caption</a>
  61. </div>
  62. <details>
  63. <summary>
  64. <h2>Advanced settings</h2>
  65. </summary>
  66. {{ URL := URLC(Queries, "") }}
  67. <form action="{{ URL }}&name={{ Queries.Hash.Name }}" method="post">
  68. <label for="wlt">Minimum image width</label>
  69. <input type="text" name="wlt" value="{{ Queries.Hash.Wlt }}" />
  70. <label for="wgt">Maximum image width</label>
  71. <input type="text" name="wgt" value="{{ Queries.Hash.Wgt }}" />
  72. <label for="hlt">Minimum image height</label>
  73. <input type="text" name="hlt" value="{{ Queries.Hash.Hlt }}" />
  74. <label for="hgt">Maximum image height</label>
  75. <input type="text" name="hgt" value="{{ Queries.Hash.Hgt }}" />
  76. <label for="scd">Posted after (format: yyyy-mm-dd)</label>
  77. <input type="text" name="scd" value="{{ Queries.Hash.Scd }}" />
  78. <label for="ecd">Posted before (format: yyyy-mm-dd)</label>
  79. <input type="text" name="ecd" value="{{ Queries.Hash.Ecd }}" />
  80. <label for="tool">Tool</label>
  81. <input type="text" name="tool" value="{{ Queries.Hash.Tool }}" />
  82. <input type="submit" value="Set" />
  83. </form>
  84. </details>
  85. {{ if Data.Popular.Recent }}
  86. <h2>Popular artworks</h2>
  87. <h3>Recent</h3>
  88. <div class="artwork-container-scroll">
  89. {{ include "components/small-tn" Data.Popular.Recent }}
  90. </div>
  91. <h3>All Time</h3>
  92. <div class="artwork-container-scroll">
  93. {{ include "components/small-tn" Data.Popular.Permanent }}
  94. </div>
  95. {{ end }}
  96. {* Switchers here *}
  97. <br />
  98. <h2>Works</h2>
  99. <div class="artwork-container">
  100. {{ include "components/small-tn" Data.Artworks.Artworks }}
  101. </div>
  102. <div class="pagination">
  103. {{ url := URLC(Queries, "page") }}
  104. <small>Page {{ Page }}</small>
  105. <br />
  106. {{ raw: createPaginator(url, "#checkpoint", Page, -1) }}
  107. </div>
  108. </div>