mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
user page: fix duplicate <hr> issue
This commit is contained in:
+119
-92
@@ -128,132 +128,159 @@
|
||||
|
||||
<!-- Home category (all works) -->
|
||||
{{- if .Category.Value == "" || .Category.Value == "artworks" }}
|
||||
<!-- <div class="d-flex justify-content-between align-items-center mb-4">
|
||||
{* NOTE: using sentence case here to be more consistent with the rest of our UI, even though pixiv uses title case *}
|
||||
<h2 class="d-flex align-items-end mb-0">Works<span class="fs-6 bg-charcoal-surface1 rounded px-2 py-1 ms-2">{{ .User.WorkCounts.All }}</span></h2>
|
||||
</div> -->
|
||||
|
||||
{* NOTE: this <hr> breaks consistency, but the page for the home category looks weird without it *}
|
||||
<hr class="my-4">
|
||||
{* variable to track whether an <hr> has been rendered *}
|
||||
{{ hrRendered := "false" }}
|
||||
|
||||
{*
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<!-- NOTE: using sentence case here to be more consistent with the rest of our UI, even though pixiv uses title case -->
|
||||
<h2 class="d-flex align-items-end mb-0">Works<span class="fs-6 bg-charcoal-surface1 rounded px-2 py-1 ms-2">{{ .User.WorkCounts.All }}</span></h2>
|
||||
</div>
|
||||
*}
|
||||
|
||||
<!-- Illustrations -->
|
||||
{{ if len(.User.Illustrations) != 0 }}
|
||||
<h2 class="d-flex align-items-end">Illustrations<span class="fs-6 bg-charcoal-surface1 rounded px-2 py-1 ms-2">{{ .User.WorkCounts.Illustrations }}</span></h2>
|
||||
|
||||
<div class="d-flex flex-nowrap overflow-scroll mb-3">
|
||||
{{- range .User.Categories.illustrations.FrequentTags }}
|
||||
<div class="bg-charcoal-surface1 rounded px-3 py-2 me-2 mb-2 w-auto">
|
||||
<small class="d-flex flex-column align-items-center">
|
||||
<span>
|
||||
<a href="/tags/{{ escapeString(.Name) }}" class="text-primary-emphasis fw-semibold text-decoration-none text-nowrap">#{{ .Name }}</a>
|
||||
</span>
|
||||
{{- if .TranslatedName }}
|
||||
<small class="text-body-secondary fw-medium text-nowrap">({{ .TranslatedName }})</small>
|
||||
{{- end }}
|
||||
</small>
|
||||
</div>
|
||||
{{- if hrRendered == false }}
|
||||
{* NOTE: this <hr> breaks consistency, but the page for the home category looks weird without it *}
|
||||
<hr class="my-4">
|
||||
{{- hrRendered = true }}
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-2 row-cols-md-4 row-cols-lg-6 g-4">
|
||||
{{- include "fragments/small-tn" .User.Illustrations }}
|
||||
</div>
|
||||
<h2 class="d-flex align-items-end">Illustrations<span class="fs-6 bg-charcoal-surface1 rounded px-2 py-1 ms-2">{{ .User.WorkCounts.Illustrations }}</span></h2>
|
||||
|
||||
<div class="d-flex flex-nowrap overflow-scroll mb-3">
|
||||
{{- range .User.Categories.illustrations.FrequentTags }}
|
||||
<div class="bg-charcoal-surface1 rounded px-3 py-2 me-2 mb-2 w-auto">
|
||||
<small class="d-flex flex-column align-items-center">
|
||||
<span>
|
||||
<a href="/tags/{{ escapeString(.Name) }}" class="text-primary-emphasis fw-semibold text-decoration-none text-nowrap">#{{ .Name }}</a>
|
||||
</span>
|
||||
{{- if .TranslatedName }}
|
||||
<small class="text-body-secondary fw-medium text-nowrap">({{ .TranslatedName }})</small>
|
||||
{{- end }}
|
||||
</small>
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-2 row-cols-md-4 row-cols-lg-6 g-4">
|
||||
{{- include "fragments/small-tn" .User.Illustrations }}
|
||||
</div>
|
||||
|
||||
{* TODO: use a better check than this *}
|
||||
{{ if len(.User.Illustrations) > 29 }}
|
||||
<div class="d-flex mt-3">
|
||||
<a href="{{ .User.ID + "/illustrations" + "?page=2#checkpoint" }}" class="custom-btn-secondary-flex bg-charcoal-surface2">View more</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{* TODO: use a better check than this *}
|
||||
{{ if len(.User.Illustrations) > 29 }}
|
||||
<div class="d-flex mt-3">
|
||||
<a href="{{ .User.ID + "/illustrations" + "?page=2#checkpoint" }}" class="custom-btn-secondary-flex bg-charcoal-surface2">View more</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
<!-- Manga -->
|
||||
{{ if len(.User.Manga) != 0 }}
|
||||
<hr class="my-4">
|
||||
<h2 class="d-flex align-items-end">Manga<span class="fs-6 bg-charcoal-surface1 rounded px-2 py-1 ms-2">{{ .User.WorkCounts.Manga }}</span></h2>
|
||||
|
||||
<div class="d-flex flex-nowrap overflow-scroll mb-3">
|
||||
{{- range .User.Categories.manga.FrequentTags }}
|
||||
<div class="bg-charcoal-surface1 rounded px-3 py-2 me-2 mb-2 w-auto">
|
||||
<small class="d-flex flex-column align-items-center">
|
||||
<span>
|
||||
<a href="/tags/{{ escapeString(.Name) }}" class="text-primary-emphasis fw-semibold text-decoration-none text-nowrap">#{{ .Name }}</a>
|
||||
</span>
|
||||
{{- if .TranslatedName }}
|
||||
<small class="text-body-secondary fw-medium text-nowrap">({{ .TranslatedName }})</small>
|
||||
{{- end }}
|
||||
</small>
|
||||
</div>
|
||||
{{- if hrRendered != true }}
|
||||
<hr class="my-4">
|
||||
{{- hrRendered = true }}
|
||||
{{- else }}
|
||||
<hr class="my-4">
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
{{- if len(.User.MangaSeries) != 0 }}
|
||||
<div class="overflow-scroll mb-4" id="horizontal-scroll">
|
||||
<div class="row flex-nowrap">
|
||||
{{- range .User.MangaSeries }}
|
||||
{{- include "fragments/mangaseries-tn" . }}
|
||||
<h2 class="d-flex align-items-end">Manga<span class="fs-6 bg-charcoal-surface1 rounded px-2 py-1 ms-2">{{ .User.WorkCounts.Manga }}</span></h2>
|
||||
|
||||
<div class="d-flex flex-nowrap overflow-scroll mb-3">
|
||||
{{- range .User.Categories.manga.FrequentTags }}
|
||||
<div class="bg-charcoal-surface1 rounded px-3 py-2 me-2 mb-2 w-auto">
|
||||
<small class="d-flex flex-column align-items-center">
|
||||
<span>
|
||||
<a href="/tags/{{ escapeString(.Name) }}" class="text-primary-emphasis fw-semibold text-decoration-none text-nowrap">#{{ .Name }}</a>
|
||||
</span>
|
||||
{{- if .TranslatedName }}
|
||||
<small class="text-body-secondary fw-medium text-nowrap">({{ .TranslatedName }})</small>
|
||||
{{- end }}
|
||||
</small>
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
<div class="row row-cols-2 row-cols-md-4 row-cols-lg-6 g-4">
|
||||
{{- include "fragments/small-tn" .User.Manga }}
|
||||
</div>
|
||||
|
||||
{{ if len(.User.Manga) > 29 }}
|
||||
<div class="d-flex mt-3">
|
||||
<a href="{{ .User.ID + "/manga" + "?page=2#checkpoint" }}" class="custom-btn-secondary-flex bg-charcoal-surface2">View more</a>
|
||||
{{- if len(.User.MangaSeries) != 0 }}
|
||||
<div class="overflow-scroll mb-4" id="horizontal-scroll">
|
||||
<div class="row flex-nowrap">
|
||||
{{- range .User.MangaSeries }}
|
||||
{{- include "fragments/mangaseries-tn" . }}
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
<div class="row row-cols-2 row-cols-md-4 row-cols-lg-6 g-4">
|
||||
{{- include "fragments/small-tn" .User.Manga }}
|
||||
</div>
|
||||
|
||||
{{ if len(.User.Manga) > 29 }}
|
||||
<div class="d-flex mt-3">
|
||||
<a href="{{ .User.ID + "/manga" + "?page=2#checkpoint" }}" class="custom-btn-secondary-flex bg-charcoal-surface2">View more</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
<!-- Novels -->
|
||||
{{ if len(.User.Novels) != 0 }}
|
||||
<hr class="my-4">
|
||||
<h2 class="d-flex align-items-end">Novels<span class="fs-6 bg-charcoal-surface1 rounded px-2 py-1 ms-2">{{ .User.WorkCounts.Novels }}</span></h2>
|
||||
|
||||
<div class="d-flex flex-nowrap overflow-scroll mb-3">
|
||||
{{- range .User.Categories.novels.FrequentTags }}
|
||||
<div class="bg-charcoal-surface1 rounded px-3 py-2 me-2 mb-2 w-auto">
|
||||
<small class="d-flex flex-column align-items-center">
|
||||
<span>
|
||||
<a href="/tags/{{ escapeString(.Name) }}" class="text-primary-emphasis fw-semibold text-decoration-none text-nowrap">#{{ .Name }}</a>
|
||||
</span>
|
||||
{{- if .TranslatedName }}
|
||||
<small class="text-body-secondary fw-medium text-nowrap">({{ .TranslatedName }})</small>
|
||||
{{- end }}
|
||||
</small>
|
||||
</div>
|
||||
{{- if hrRendered == false }}
|
||||
<hr class="my-4">
|
||||
{{- hrRendered = true }}
|
||||
{{- else }}
|
||||
<hr class="my-4">
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
{{- if len(.User.NovelSeries) != 0 }}
|
||||
<div class="overflow-scroll mb-4" id="horizontal-scroll">
|
||||
<div class="row flex-nowrap">
|
||||
{{- range .User.NovelSeries }}
|
||||
{{- include "fragments/novelseries-tn" . }}
|
||||
<h2 class="d-flex align-items-end">Novels<span class="fs-6 bg-charcoal-surface1 rounded px-2 py-1 ms-2">{{ .User.WorkCounts.Novels }}</span></h2>
|
||||
|
||||
<div class="d-flex flex-nowrap overflow-scroll mb-3">
|
||||
{{- range .User.Categories.novels.FrequentTags }}
|
||||
<div class="bg-charcoal-surface1 rounded px-3 py-2 me-2 mb-2 w-auto">
|
||||
<small class="d-flex flex-column align-items-center">
|
||||
<span>
|
||||
<a href="/tags/{{ escapeString(.Name) }}" class="text-primary-emphasis fw-semibold text-decoration-none text-nowrap">#{{ .Name }}</a>
|
||||
</span>
|
||||
{{- if .TranslatedName }}
|
||||
<small class="text-body-secondary fw-medium text-nowrap">({{ .TranslatedName }})</small>
|
||||
{{- end }}
|
||||
</small>
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
<div class="row row-cols-1 row-cols-lg-2 g-4">
|
||||
{{- range .User.Novels }}
|
||||
<div class="col mt-1">
|
||||
<div class="custom-novel-card bg-transparent p-3 py-4 thumbnail-hover-dark">
|
||||
{{- include "fragments/novel-tn" . }}
|
||||
{{- if len(.User.NovelSeries) != 0 }}
|
||||
<div class="overflow-scroll mb-4" id="horizontal-scroll">
|
||||
<div class="row flex-nowrap">
|
||||
{{- range .User.NovelSeries }}
|
||||
{{- include "fragments/novelseries-tn" . }}
|
||||
{{- end }}
|
||||
</div>
|
||||
<hr class="my-0">
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
{{ if len(.User.Novels) > 29 }}
|
||||
<div class="d-flex mt-3">
|
||||
<a href="{{ .User.ID + "/novels" + "?page=2#checkpoint" }}" class="custom-btn-secondary-flex bg-charcoal-surface2">View more</a>
|
||||
<div class="row row-cols-1 row-cols-lg-2 g-4">
|
||||
{{- range .User.Novels }}
|
||||
<div class="col mt-1">
|
||||
<div class="custom-novel-card bg-transparent p-3 py-4 thumbnail-hover-dark">
|
||||
{{- include "fragments/novel-tn" . }}
|
||||
</div>
|
||||
<hr class="my-0">
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{ if len(.User.Novels) > 29 }}
|
||||
<div class="d-flex mt-3">
|
||||
<a href="{{ .User.ID + "/novels" + "?page=2#checkpoint" }}" class="custom-btn-secondary-flex bg-charcoal-surface2">View more</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
@@ -544,7 +544,6 @@
|
||||
"assets/views/unauthorized.jet.html:Q84lx6mjuV0": "Unauthorized",
|
||||
"assets/views/unauthorized.jet.html:SNRVjaimXDQ": "You need to <a href=\"/settings#login\">log in</a> to use this feature.",
|
||||
"assets/views/user.jet.html:3_oq3Nw2b2U": "View on pixiv.net",
|
||||
"assets/views/user.jet.html:5xhgcv5yNyM": "Frequently used tags",
|
||||
"assets/views/user.jet.html:9EbrMpLP6_U": "Bookmarks",
|
||||
"assets/views/user.jet.html:Awt3bDxDL0U": "View more",
|
||||
"assets/views/user.jet.html:P6fO_UTqr7E": "Manga",
|
||||
|
||||
Reference in New Issue
Block a user