|
21 | 21 | <#include "macro-head.ftl"> |
22 | 22 | <#include "macro-pagination-query.ftl"> |
23 | 23 | <#include "common/title-icon.ftl"> |
| 24 | +<#function medalTypeStyle type> |
| 25 | + <#switch type> |
| 26 | + <#case "精良"> |
| 27 | + <#return "color:#1d4ed8;"> |
| 28 | + <#case "稀有"> |
| 29 | + <#return "color:#8b5cf6;"> |
| 30 | + <#case "史诗"> |
| 31 | + <#return "color:#ea580c;font-weight:600;"> |
| 32 | + <#case "传说"> |
| 33 | + <#return "color:#eab308;font-weight:700;"> |
| 34 | + <#case "神话"> |
| 35 | + <#return "color:#f59e0b;font-weight:700;text-shadow:0 0 3px rgba(245,158,11,0.8);"> |
| 36 | + <#case "限定"> |
| 37 | + <#return "color:#ef4444;font-weight:700;text-shadow:0 0 6px rgba(239,68,68,0.9);"> |
| 38 | + <#default> |
| 39 | + <#return "color:#111827;"> |
| 40 | + </#switch> |
| 41 | +</#function> |
24 | 42 | <!DOCTYPE html> |
25 | 43 | <html> |
26 | 44 | <head> |
|
197 | 215 | </a> |
198 | 216 | </div> |
199 | 217 | <div class="fn__flex-1"> |
200 | | - <div id="articleMeta" class="fn__clear" style="height: auto;"> |
| 218 | + <div id="articleMeta" class="fn__clear" style="height: auto; overflow: visible"> |
201 | 219 | <a rel="author" href="${servePath}/member/${article.articleAuthorName}" |
202 | 220 | class="article__stats article__stats--a tooltipped tooltipped-e" |
203 | 221 | aria-label="${article.oId?number?number_to_datetime}"> |
|
225 | 243 | <div id="articleCollectCnt" class="article__stats usersInteracts article__stats--a"> |
226 | 244 | <span class="article__cnt">${article.articleCollectCnt}</span> |
227 | 245 | 收藏 |
228 | | - </div> |
229 | | - <#if article.articleQnAOfferPoint?c != "0"> |
230 | | - <div id="articleQnAOfferCnt" class="article__stats usersInteracts article__stats--a"> |
231 | | - <span class="article__cnt">${article.articleQnAOfferPoint?c}</span> |
232 | | - ${qnaOfferLabel} |
233 | | - </div> |
234 | | - </#if> |
235 | | - <div class="article__stats usersInteracts article__stats--a"> |
236 | | - <#if article.sysMetal != "[]"> |
| 246 | + </div> |
| 247 | + <#if article.articleQnAOfferPoint?c != "0"> |
| 248 | + <div id="articleQnAOfferCnt" class="article__stats usersInteracts article__stats--a"> |
| 249 | + <span class="article__cnt">${article.articleQnAOfferPoint?c}</span> |
| 250 | + ${qnaOfferLabel} |
| 251 | + </div> |
| 252 | + </#if> |
| 253 | + <div class="article__stats usersInteracts article__stats--a"> |
| 254 | + <#assign articleMedals = (article.sysMetal?is_string)?then(article.sysMetal?eval, article.sysMetal)![]> |
| 255 | + <#if articleMedals?size != 0> |
237 | 256 | <span class="article__cnt">作者勋章</span> |
238 | | - <#list article.sysMetal?eval as metal> |
239 | | - <img title="${metal.description}" src="${servePath}/gen?id=${metal.id}"/> |
| 257 | + <#list articleMedals as metal> |
| 258 | + <#assign medalType = metal.type!''> |
| 259 | + <#assign medalName = metal.name!''> |
| 260 | + <#assign medalDesc = metal.description!''> |
| 261 | + <span class="tip-wrapper"> |
| 262 | + <img src="${servePath}/gen?id=${metal.id}"/> |
| 263 | + <span class="tip-text"> |
| 264 | + <#if medalType != ""> |
| 265 | + <span style="${medalTypeStyle(medalType)}">[${medalType}]</span> |
| 266 | + <#if medalName != "" || medalDesc != ""> </#if> |
| 267 | + </#if> |
| 268 | + <#if medalName != "">${medalName}<#if medalDesc != ""> - </#if></#if>${medalDesc} |
| 269 | + </span> |
| 270 | + </span> |
240 | 271 | </#list> |
241 | 272 | </#if> |
242 | | - </div> |
243 | | - </div> |
| 273 | + </div> |
| 274 | + </div> |
244 | 275 | <br> |
245 | 276 | <#if article.thankedCnt != 0> |
246 | 277 | <div class="fn-clear"></div> |
|
366 | 397 | href="${servePath}/member/${comment.commentAuthorName}" |
367 | 398 | class="ft-gray"><span |
368 | 399 | class="ft-gray"><#if comment.commentAuthorNickName != "">${comment.commentAuthorNickName} (${comment.commentAuthorName})<#else>${comment.commentAuthorName}</#if></span></a> |
369 | | - <span class="ft-fade">• ${comment.timeAgo}</span> |
370 | | - |
371 | | - <#if comment.rewardedCnt gt 0> |
372 | | - <#assign hasRewarded = isLoggedIn && comment.commentAuthorId != currentUser.oId && comment.rewarded> |
373 | | - <span aria-label="<#if hasRewarded>${thankedLabel}<#else>${thankLabel} ${comment.rewardedCnt}</#if>" |
| 400 | + <span class="ft-fade">• ${comment.timeAgo}</span> |
| 401 | + |
| 402 | + <#if comment.rewardedCnt gt 0> |
| 403 | + <#assign hasRewarded = isLoggedIn && comment.commentAuthorId != currentUser.oId && comment.rewarded> |
| 404 | + <span aria-label="<#if hasRewarded>${thankedLabel}<#else>${thankLabel} ${comment.rewardedCnt}</#if>" |
374 | 405 | class="tooltipped tooltipped-n rewarded-cnt <#if hasRewarded>ft-red<#else>ft-fade</#if>"> |
375 | 406 | <svg class="fn-text-top"><use |
376 | 407 | xlink:href="#heart"></use></svg> ${comment.rewardedCnt} |
377 | 408 | </span> |
378 | | - </#if> |
379 | | - <#if 0 == comment.commenter.userUAStatus><span class="cmt-via ft-fade" |
380 | | - data-ua="${comment.commentUA}"></span></#if> |
381 | | - </span> |
382 | | - <#list comment.sysMetal?eval as metal> |
383 | | - <img title="${metal.description}" src="${servePath}/gen?id=${metal.id}"/> |
384 | | - </#list> |
385 | | - <a class="ft-a-title fn-right tooltipped tooltipped-nw" |
386 | | - aria-label="${goCommentLabel}" |
| 409 | + </#if> |
| 410 | + <#if 0 == comment.commenter.userUAStatus><span class="cmt-via ft-fade" |
| 411 | + data-ua="${comment.commentUA}"></span></#if> |
| 412 | + </span> |
| 413 | + <#assign commentMedals = (comment.sysMetal?is_string)?then(comment.sysMetal?eval, comment.sysMetal)![]> |
| 414 | + <#if commentMedals?size != 0> |
| 415 | + |
| 416 | + <#list commentMedals as metal> |
| 417 | + <#assign medalType = metal.type!''> |
| 418 | + <#assign medalName = metal.name!''> |
| 419 | + <#assign medalDesc = metal.description!''> |
| 420 | + <span class="tip-wrapper"> |
| 421 | + <img src="${servePath}/gen?id=${metal.id}"/> |
| 422 | + <span class="tip-text"> |
| 423 | + <#if medalType != ""> |
| 424 | + <span style="${medalTypeStyle(medalType)}">[${medalType}]</span> |
| 425 | + <#if medalName != "" || medalDesc != ""> </#if> |
| 426 | + </#if> |
| 427 | + <#if medalName != "">${medalName}<#if medalDesc != ""> - </#if></#if>${medalDesc} |
| 428 | + </span> |
| 429 | + </span> |
| 430 | + </#list> |
| 431 | + </#if> |
| 432 | + <a class="ft-a-title fn-right tooltipped tooltipped-nw" |
| 433 | + aria-label="${goCommentLabel}" |
387 | 434 | href="javascript:Comment.goComment('${servePath}/article/${article.oId}?p=${comment.paginationCurrentPageNum}&m=${userCommentViewMode}#${comment.oId}')"> |
388 | 435 | <svg> |
389 | 436 | <use xlink:href="#down"></use> |
|
0 commit comments