novel.jet.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <div class="container novel" id="checkpoint">
  2. <div class="novel-detail">
  3. <div class="novel-cover">
  4. <a href="{{ Novel.CoverURL }}">
  5. <img src="{{ Novel.CoverURL }}" alt="{{ Novel.Title }}" />
  6. </a>
  7. </div>
  8. <div class="novel-metadata">
  9. <div class="novel-title">{{ Novel.Title }}</div>
  10. <small><span>{{ Novel.WordCount }} word(s)</span>&nbsp;<span>{{ floor: Novel.ReadingTime / 60 }}
  11. min</span></small>
  12. <p class="novel-description">{{ raw: Novel.Description }}</p>
  13. <div class="illust-tags">
  14. {{ if Novel.AiType == 2 }}
  15. <span class="illust-tag">
  16. <span class="illust-tag-name" id="highlight">AI-generated</span>
  17. </span>
  18. {{ end }}
  19. {{ if Novel.IsOriginal }}
  20. <span class="illust-tag">
  21. <span class="illust-tag-name">Original</span>
  22. </span>
  23. {{ end }}
  24. {{ if Novel.Genre != "0" }}
  25. <span class="illust-tag">
  26. <span class="illust-tag-name">{{ novelGenre: Novel.Genre }}</span>
  27. </span>
  28. {{ end }}
  29. {{ range Novel.Tags.Tags }} {{ if isEmphasize(.Name) }}
  30. <span class="illust-tag">
  31. <span class="illust-tag-name" id="highlight">{{ .Name }}</span>
  32. </span>
  33. {{ else }}
  34. <span class="illust-tag">
  35. <span class="illust-tag-translation"><a href="/tags/{{ escapeString(.Name) }}">#{{ .Name }}</a></span>
  36. </span>
  37. {{ end }} {{ end }}
  38. </div>
  39. <div class="illust-tags">
  40. <span class="illust-tag-attr">
  41. <img src="/assets/eye.png" alt="Views" />
  42. {{ Novel.Views }}
  43. </span>
  44. <span class="illust-tag-attr">
  45. <img src="/assets/heart-solid.png" alt="Bookmarks" />
  46. {{ Novel.Bookmarks }}
  47. </span>
  48. <span class="illust-tag-attr">
  49. <img src="/assets/like.png" alt="Likes" />
  50. {{ Novel.Likes }}
  51. </span>
  52. <span class="illust-tag-attr">
  53. <img src="/assets/calendar.png" alt="Date" />
  54. {{ parseTime: Novel.CreateDate }}
  55. </span>
  56. </div>
  57. </div>
  58. </div>
  59. <!-- ----------- -->
  60. <div class="novel-settings">
  61. <div class="novel-settings-wrapper">
  62. <span class="dropdown">
  63. {{ url := "/settings/novelFontType?r=" + OriginalURL + "#content" }}
  64. <input type="checkbox" class="dropdown-toggler" id="font-type-toggler" />
  65. <label for="font-type-toggler" class="dropdown-toggler-label">
  66. <img src="/assets/font-family.png" alt="Font family" />
  67. </label>
  68. <div class="dropdown-content">
  69. <div>Font type</div>
  70. <form action="{{ url }}?noredirect=t" method="post">
  71. <input type="text" name="font-type" value="gothic" class="value-holder" />
  72. <input type="submit" value="Gothic" />
  73. </form>
  74. <form action="{{ url }}?noredirect=t" method="post">
  75. <input type="text" name="font-type" value="mincho" class="value-holder" />
  76. <input type="submit" value="Mincho" />
  77. </form>
  78. </div>
  79. </span>
  80. <img src="/assets/font-size.png" alt="Font size" />
  81. <span class="dropdown">
  82. {{ url := "/settings/novelViewMode?r=" + OriginalURL + "#content" }}
  83. <input type="checkbox" class="dropdown-toggler" id="view-mode-toggler" />
  84. <label for="view-mode-toggler" class="dropdown-toggler-label">
  85. <img src="/assets/orientation.png" alt="Orientation" />
  86. </label>
  87. <div class="dropdown-content">
  88. <div>Force text orientation</div>
  89. <form action="{{ url }}?noredirect=t" method="post">
  90. <input type="text" name="view-mode" value="1" class="value-holder" />
  91. <input type="submit" value="Horizontal" />
  92. </form>
  93. <form action="{{ url }}?noredirect=t" method="post">
  94. <input type="text" name="view-mode" value="2" class="value-holder" />
  95. <input type="submit" value="Vertical" />
  96. </form>
  97. <form action="{{ url }}" method="post">
  98. <input type="text" name="view-mode" value="" class="value-holder" />
  99. <input type="submit" value="Don't force" />
  100. </form>
  101. </div>
  102. </span>
  103. </div>
  104. </div>
  105. <!-- ----------- -->
  106. <div class="novel-content" id="content" data-font="{{ FontType }}" data-lang="{{ Language }}"
  107. data-view="{{ ViewMode }}">
  108. <div class="novel-content-text">
  109. {{ raw: renderNovel(Novel.Content) }}
  110. </div>
  111. </div>
  112. <div class="novel-attr">
  113. <a href="/users/{{ User.ID }}"><img src="{{ User.Avatar }}" alt="{{ User.Name }}" class="novel-avatar" />
  114. </a>
  115. <div class="attr-wrap">
  116. <div class="novel-title">
  117. <a href="/users/{{ User.ID }}">{{ User.Name }}</a>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="novel-container">
  122. {{ range NovelRelated }}
  123. {{ include "components/novel-tn" . }}
  124. {{ end }}
  125. </div>
  126. </div>