mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
artwork: avoid RecentWorks newline
This commit is contained in:
@@ -35,14 +35,27 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="horizontal-scroll" class="row flex-nowrap flex-lg-wrap overflow-scroll overflow-lg-visible px-4 g-3">
|
||||
{{- range .Illust.RecentWorks }}
|
||||
{* NOTE: indivisble col-7 to create a visible affordance *}
|
||||
<div class="col-7 col-md-4 col-xl-3">
|
||||
<div class="card h-100 border-0 bg-transparent">
|
||||
{{ include "fragments/thumbnail-dt" . }}
|
||||
<div class="card-body p-0">{{ include "fragments/thumbnail-tt" . }}</div>
|
||||
{* we only render 19 items if there are 20 RecentWorks to avoid a newline with only the "See more" button on large devices *}
|
||||
{{- if len(.Illust.RecentWorks) == 20 }}
|
||||
{{- range .Illust.RecentWorks[:19] }}
|
||||
{* NOTE: indivisble col-7 to create a visible affordance *}
|
||||
<div class="col-7 col-md-4 col-xl-3">
|
||||
<div class="card h-100 border-0 bg-transparent">
|
||||
{{ include "fragments/thumbnail-dt" . }}
|
||||
<div class="card-body p-0">{{ include "fragments/thumbnail-tt" . }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- range .Illust.RecentWorks }}
|
||||
{* NOTE: indivisble col-7 to create a visible affordance *}
|
||||
<div class="col-7 col-md-4 col-xl-3">
|
||||
<div class="card h-100 border-0 bg-transparent">
|
||||
{{ include "fragments/thumbnail-dt" . }}
|
||||
<div class="card-body p-0">{{ include "fragments/thumbnail-tt" . }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{* See more button *}
|
||||
<div class="col-7 col-md-4 col-xl-3">
|
||||
|
||||
@@ -143,7 +143,6 @@
|
||||
"assets/views/index.jet.html:MnsvADadEqk": "Newest articles on pixivision",
|
||||
"assets/views/index.jet.html:QX9SfhF5thM": "Nothing here yet—find a user to follow!",
|
||||
"assets/views/index.jet.html:Sccoo133FQI": "All",
|
||||
"assets/views/index.jet.html:X9iU_H9c1Ss": "You are logged in.",
|
||||
"assets/views/index.jet.html:lEVH3Ram904": "Newest works",
|
||||
"assets/views/index.jet.html:lv5wuj1vx98": "Latest works by followed",
|
||||
"assets/views/index.jet.html:n7zdClpaR18": "Recommended illustrations tagged",
|
||||
|
||||
Reference in New Issue
Block a user