artwork.jet.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {{ if !.IsUgoira }}
  2. <div class="illust-images">
  3. {{ range index := .Images }}
  4. <a href="{{ .Original }}" target="_blank">
  5. {{ if .Width != 0 && .Height != 0 }}
  6. {* todo: do not reflow the page because of loading image *}
  7. <img src="{{ .Large }}" alt="Page {{ index }}" data-width="{{.Width}}" data-height="{{.Height}}" />
  8. {{ else }}
  9. <img src="{{ .Large }}" alt="Page {{ index }}" />
  10. {{ end }}
  11. </a>
  12. {{ end }}
  13. </div>
  14. {{ else }}
  15. <div class="illust-images">
  16. <img src="/proxy/ugoira.com/{{ .ID }}" />
  17. <!-- <video autoplay loop muted disablepictureinpicture playsinline controls poster="{{ .Images[0].Large }}"
  18. src="/proxy/ugoira.com/{{ .ID }}">
  19. Unable to load ugoira.
  20. </video> -->
  21. </div>
  22. <a href="/proxy/ugoira.com/{{ .ID }}">Download</a>
  23. <br />
  24. <a href="https://ugoira.com/i/{{ .ID }}">Go to ugoira.com for more options</a>
  25. {{ end }}
  26. <div class="illust-attr">
  27. <div class="illust-author-attr">
  28. <a href="/users/{{ .User.ID }}"><img src="{{ .User.Avatar }}" alt="{{ .User.Name }}" class="illust-avatar" />
  29. </a>
  30. <div class="attr-wrap">
  31. <div class="illust-title">{{ .Title }}</div>
  32. <div class="illust-author">
  33. <a href="/users/{{ .User.ID }}">{{ .User.Name }}</a>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="artwork-actions">
  38. {{ if isset(.BookmarkData) && LoggedIn }}
  39. <a href="/self/deleteBookmark/{{ .BookmarkID }}?r={{ OriginalURL }}">
  40. <img src="/assets/heart-red.png" alt="Bookmarked" />
  41. </a>
  42. {{ else }}
  43. <a href="/self/addBookmark/{{ .ID }}?r={{ OriginalURL }}">
  44. <img src="/assets/heart-outline.png" alt="Bookmark" />
  45. </a>
  46. {{ end }}
  47. {{ if .Liked && LoggedIn}}
  48. <img src="/assets/like-blue.png" alt="Liked" />
  49. {{ else }}
  50. <a href="/self/like/{{ .ID }}?r={{ OriginalURL }}">
  51. <img src="/assets/like-outline.png" alt="Like" />
  52. </a>
  53. {{ end }}
  54. </div>
  55. </div>
  56. <div>
  57. <a href="https://pixiv.net/i/{{ .ID }}">pixiv.net/i/{{ .ID }}</a>
  58. <br />
  59. </div>
  60. <div class="illust-tags">
  61. <span class="illust-tag-attr">
  62. <img src="/assets/eye.png" alt="Views" />
  63. {{ .Views }}
  64. </span>
  65. <span class="illust-tag-attr">
  66. <img src="/assets/heart-solid.png" alt="Bookmarks" />
  67. {{ .Bookmarks }}
  68. </span>
  69. <span class="illust-tag-attr">
  70. <img src="/assets/like.png" alt="Likes" />
  71. {{ .Likes }}
  72. </span>
  73. <span class="illust-tag-attr">
  74. <img src="/assets/calendar.png" alt="Date" />
  75. {{ parseTime: .Date }}
  76. </span>
  77. </div>
  78. <div class="illust-tags">
  79. {{ if .AiType == 2 }}
  80. <span class="illust-tag">
  81. <span class="illust-tag-name" id="highlight">AI-generated</span>
  82. </span>
  83. {{ end }} {{ range .Tags }} {{ if isEmphasize(.Name) }}
  84. <span class="illust-tag">
  85. <span class="illust-tag-name" id="highlight">{{ .Name }}</span>
  86. </span>
  87. {{ else }}
  88. <span class="illust-tag">
  89. <span class="illust-tag-name"><a href="/tags/{{ escapeString(.Name) }}">#{{ .Name }}</a></span><span
  90. class="illust-tag-translation">{{ .TranslatedName }}</span>
  91. </span>
  92. {{ end }} {{ end }}
  93. </div>
  94. <br />
  95. <div class="illust-description">
  96. {{ raw: parsePixivRedirect(.Description) }}
  97. </div>
  98. <br />