New UI update! #31
2 days worth of code Reviewed-on: https://codeberg.org/VnPower/pixivfe/pulls/31
@@ -7,6 +7,7 @@ import (
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
func GetRandomColor() string {
|
||||
@@ -105,6 +106,10 @@ func ParsePixivRedirect(s string) template.HTML {
|
||||
return template.HTML(escaped)
|
||||
}
|
||||
|
||||
func ParseTime(date time.Time) string {
|
||||
return date.Format("2006-01-02 15:04")
|
||||
}
|
||||
|
||||
func GetTemplateFunctions() template.FuncMap {
|
||||
return template.FuncMap{
|
||||
"toInt": func(s string) int {
|
||||
@@ -143,5 +148,8 @@ func GetTemplateFunctions() template.FuncMap {
|
||||
}
|
||||
return fmt.Sprintf("%s-%s-%s", s[4:], s[2:4], s[:2])
|
||||
},
|
||||
"parseTime": func(date time.Time) string {
|
||||
return ParseTime(date)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 303 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0,0,256,256" width="50px" height="50px"><g fill-opacity="0" fill="#dddddd" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,256v-256h256v256z" id="bgRectangle"></path></g><g fill="#ffffff" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><g transform="scale(5.12,5.12)"><path d="M22.20508,2c-0.48953,0.00026 -0.90693,0.35484 -0.98633,0.83789l-0.97266,5.95508c-1.16958,0.34023 -2.28485,0.7993 -3.33594,1.37109l-4.91406,-3.50977c-0.39728,-0.28369 -0.94131,-0.23911 -1.28711,0.10547l-3.89062,3.88672c-0.3432,0.34344 -0.39015,0.88376 -0.11133,1.28125l3.45703,4.94531c-0.58061,1.05722 -1.04985,2.17878 -1.39844,3.35938l-5.92969,0.98633c-0.4815,0.0811 -0.83404,0.49805 -0.83398,0.98633v5.5c-0.00088,0.48518 0.3466,0.901 0.82422,0.98633l5.93359,1.05078c0.3467,1.17855 0.81296,2.30088 1.39453,3.35937l-3.5,4.89648c-0.28369,0.39728 -0.23911,0.94131 0.10547,1.28711l3.88867,3.89063c0.34265,0.34275 0.88175,0.39048 1.2793,0.11328l4.95508,-3.46875c1.05419,0.57517 2.17218,1.03762 3.3457,1.38086l0.99023,5.96289c0.08025,0.48228 0.49742,0.83584 0.98633,0.83594h5.5c0.4858,0.00071 0.90184,-0.34778 0.98633,-0.82617l1.06055,-5.98633c1.16868,-0.3485 2.28142,-0.8178 3.33008,-1.39648l4.98828,3.5c0.39749,0.27882 0.93781,0.23187 1.28125,-0.11133l3.88867,-3.89258c0.34612,-0.34687 0.38995,-0.89343 0.10352,-1.29102l-3.55664,-4.9375c0.56867,-1.04364 1.02681,-2.14972 1.36719,-3.31055l6.01758,-1.05469c0.47839,-0.08448 0.82689,-0.50053 0.82617,-0.98633v-5.5c-0.00026,-0.48953 -0.35484,-0.90693 -0.83789,-0.98633l-6.00781,-0.98242c-0.34266,-1.15945 -0.80206,-2.26356 -1.37109,-3.30664l3.50781,-4.99805c0.27882,-0.39749 0.23187,-0.93781 -0.11133,-1.28125l-3.89062,-3.88867c-0.34687,-0.34612 -0.89343,-0.38995 -1.29102,-0.10352l-4.92383,3.54102c-1.04908,-0.57636 -2.16255,-1.04318 -3.33398,-1.38867l-1.04687,-5.98437c-0.08364,-0.47917 -0.49991,-0.82867 -0.98633,-0.82812zM23.05664,4h3.80859l0.99609,5.68555c0.06772,0.38959 0.35862,0.70269 0.74219,0.79883c1.46251,0.36446 2.83609,0.94217 4.08984,1.70117c0.34265,0.20761 0.77613,0.1907 1.10156,-0.04297l4.67969,-3.36328l2.69336,2.69336l-3.33203,4.74805c-0.22737,0.3236 -0.24268,0.75079 -0.03906,1.08984c0.75149,1.25092 1.32146,2.61583 1.68555,4.07031c0.0969,0.38717 0.41473,0.67966 0.80859,0.74414l5.70703,0.93359v3.80859l-5.71875,1.00391c-0.3899,0.06902 -0.70237,0.36157 -0.79687,0.74609c-0.35988,1.45263 -0.93019,2.8175 -1.68164,4.06836c-0.20617,0.34256 -0.18851,0.775 0.04492,1.09961l3.37891,4.68945l-2.69336,2.69531l-4.74023,-3.32617c-0.32527,-0.22783 -0.75452,-0.24163 -1.09375,-0.03516c-1.24752,0.75899 -2.62251,1.33943 -4.08008,1.70898c-0.38168,0.09622 -0.67142,0.40737 -0.74023,0.79492l-1.00977,5.6875h-3.81445l-0.94141,-5.66211c-0.06549,-0.39365 -0.35874,-0.7107 -0.74609,-0.80664c-1.46338,-0.36069 -2.84314,-0.93754 -4.10547,-1.69531c-0.33857,-0.20276 -0.76473,-0.18746 -1.08789,0.03906l-4.70312,3.29492l-2.69531,-2.69922l3.32422,-4.64648c0.23221,-0.3254 0.24834,-0.75782 0.04102,-1.09961c-0.76602,-1.26575 -1.34535,-2.6454 -1.71094,-4.11523c-0.09555,-0.38244 -0.40684,-0.67307 -0.79492,-0.74219l-5.63086,-1v-3.81445l5.62695,-0.93555c0.39312,-0.06519 0.71002,-0.35754 0.80664,-0.74414c0.36873,-1.4749 0.94778,-2.85432 1.71094,-4.11719c0.20562,-0.33876 0.19183,-0.76697 -0.03516,-1.0918l-3.28516,-4.69531l2.69727,-2.69531l4.66211,3.33203c0.32413,0.23112 0.75447,0.248 1.0957,0.04297c1.25566,-0.75415 2.63862,-1.32636 4.10352,-1.68555c0.38927,-0.09584 0.68369,-0.41486 0.74805,-0.81055zM25,17c-4.40643,0 -8,3.59357 -8,8c0,4.40643 3.59357,8 8,8c4.40643,0 8,-3.59357 8,-8c0,-4.40643 -3.59357,-8 -8,-8zM25,19c3.32555,0 6,2.67445 6,6c0,3.32555 -2.67445,6 -6,6c-3.32555,0 -6,-2.67445 -6,-6c0,-3.32555 2.67445,-6 6,-6z"></path></g></g></svg>
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 383 B |
|
After Width: | Height: | Size: 732 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 577 B |
|
After Width: | Height: | Size: 466 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0,0,256,256" width="50px" height="50px"><g fill-opacity="0" fill="#dddddd" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,256v-256h256v256z" id="bgRectangle"></path></g><g fill="#ffffff" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><g transform="scale(5.12,5.12)"><path d="M21,3c-9.37891,0 -17,7.62109 -17,17c0,9.37891 7.62109,17 17,17c3.71094,0 7.14063,-1.19531 9.9375,-3.21875l13.15625,13.125l2.8125,-2.8125l-13,-13.03125c2.55469,-2.97656 4.09375,-6.83984 4.09375,-11.0625c0,-9.37891 -7.62109,-17 -17,-17zM21,5c8.29688,0 15,6.70313 15,15c0,8.29688 -6.70312,15 -15,15c-8.29687,0 -15,-6.70312 -15,-15c0,-8.29687 6.70313,-15 15,-15z"></path></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -1,13 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
{{ title := "" }}
|
||||
{{ if isset(Title) }}
|
||||
{{ title = Title }}
|
||||
{{ else }}
|
||||
{{ title = "PixivFE" }}
|
||||
{{ end }}
|
||||
<head>
|
||||
{{ title := "" }} {{ if isset(Title) }} {{ title = Title }} {{ else }} {{
|
||||
title = "PixivFE" }} {{ end }}
|
||||
<title>{{ title }} - PixivFE</title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="description" content="View this page on PixivFE." />
|
||||
@@ -18,95 +13,127 @@
|
||||
|
||||
{{ if BaseURL }}
|
||||
<meta property="og:site_name" content="PixivFE" />
|
||||
<meta property="og:title" content="{{ title }}">
|
||||
<meta property="og:title" content="{{ title }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="{{ FullURL }}">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta property="og:url" content="{{ FullURL }}" />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
|
||||
{{ if isset(PageType) }}
|
||||
|
||||
{{ if PageType == "artwork" }}
|
||||
{{ if ! Illust.XRestrict }}
|
||||
<meta property="og:description" content="View this artwork by {{ Illust.User.Name }} on PixivFE.">
|
||||
<meta property="og:image" content="{{ Illust.Images[0].Large }}">
|
||||
{{ if isset(PageType) }} {{ if PageType == "artwork" }} {{ if !
|
||||
Illust.XRestrict }}
|
||||
<meta
|
||||
property="og:description"
|
||||
content="View this artwork by {{ Illust.User.Name }} on PixivFE."
|
||||
/>
|
||||
<meta property="og:image" content="{{ Illust.Images[0].Large }}" />
|
||||
{{ else }}
|
||||
<meta property="og:description" content="View this (explicit) artwork by {{ Illust.User.Name }} on PixivFE.">
|
||||
<meta property="og:image" content="{{ BaseURL }}/assets/banner.jpg">
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ else if PageType == "user" }}
|
||||
<meta property="og:description" content="View this user's profile on PixivFE.">
|
||||
<meta
|
||||
property="og:description"
|
||||
content="View this (explicit) artwork by {{ Illust.User.Name }} on PixivFE."
|
||||
/>
|
||||
<meta property="og:image" content="{{ BaseURL }}/assets/banner.jpg" />
|
||||
{{ end }} {{ else if PageType == "user" }}
|
||||
<meta
|
||||
property="og:description"
|
||||
content="View this user's profile on PixivFE."
|
||||
/>
|
||||
{{ if User.BackgroundImage }}
|
||||
<meta property="og:image" content="{{ User.BackgroundImage }}">
|
||||
<meta property="og:image" content="{{ User.BackgroundImage }}" />
|
||||
{{ else }}
|
||||
<meta property="og:image" content="{{ User.Avatar }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<meta property="og:image" content="{{ User.Avatar }}" />
|
||||
{{ end }} {{ end }} {{ else }}
|
||||
<meta
|
||||
property="og:description"
|
||||
content="View this page on PixivFE. A privacy respecting frontend for Pixiv."
|
||||
/>
|
||||
<meta property="og:image" content="{{ BaseURL }}/assets/banner.jpg" />
|
||||
{{ end }} {{ end }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav>
|
||||
<div class="navigation-wrapper">
|
||||
<span>
|
||||
<input type="checkbox" class="sidebar-toggler" id="sidebar-toggler" />
|
||||
<label for="sidebar-toggler" class="sidebar-label">
|
||||
<img
|
||||
src="/assets/menu-thin.png"
|
||||
alt="Menu"
|
||||
width="30"
|
||||
height="30"
|
||||
/>
|
||||
</label>
|
||||
|
||||
{{ else }}
|
||||
<meta property="og:description" content="View this page on PixivFE. A privacy respecting frontend for Pixiv.">
|
||||
<meta property="og:image" content="{{ BaseURL }}/assets/banner.jpg">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</head>
|
||||
<div class="sidebar">
|
||||
<ul class="sidebar-list">
|
||||
<a class="sidebar-item" href="/discovery">
|
||||
<img src="/assets/compass.png" alt="icon" />Discovery</a
|
||||
>
|
||||
<a class="sidebar-item" href="/ranking">
|
||||
<img src="/assets/crown.png" alt="icon" />Ranking</a
|
||||
>
|
||||
<a class="sidebar-item" href="/newest">
|
||||
<img src="/assets/sparkling.png" alt="icon" />Newest</a
|
||||
>
|
||||
<br />
|
||||
<a class="sidebar-item" href="/self/following_works">
|
||||
<img src="/assets/users.png" alt="icon" />Latest by followed</a
|
||||
>
|
||||
<a class="sidebar-item" href="/self/bookmarks">
|
||||
<img src="/assets/heart.png" alt="icon" />Your bookmarks</a
|
||||
>
|
||||
<a class="sidebar-item" href="/self">
|
||||
<img src="/assets/user.png" alt="icon" />Your profile</a
|
||||
>
|
||||
<br />
|
||||
<a class="sidebar-item" href="/settings">
|
||||
<img src="/assets/settings.png" alt="icon" />Settings</a
|
||||
>
|
||||
<br />
|
||||
<a
|
||||
class="sidebar-item"
|
||||
href="https://codeberg.org/vnpower/pixivfe"
|
||||
>
|
||||
<img src="/assets/globe.png" alt="icon" />Source code</a
|
||||
>
|
||||
</ul>
|
||||
</div>
|
||||
<span class="navbar-brand">
|
||||
<img src="https://pixivfe.exozy.me/favicon.ico" alt="Icon" />
|
||||
<a href="/">
|
||||
<span>PixivFE</span>
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<body>
|
||||
<nav class="navbar">
|
||||
<ul class="navbar-list">
|
||||
<li class="navbar-item">
|
||||
<input type="checkbox" class="sidebar-toggler" id="sidebar-toggler" />
|
||||
<label for="sidebar-toggler" class="sidebar-label">
|
||||
<img src="/assets/menu-thin.png" alt="Menu" width="30" height="30" />
|
||||
</label>
|
||||
|
||||
<div class="sidebar">
|
||||
<ul class="sidebar-list">
|
||||
<a class="sidebar-item" href="/discovery">
|
||||
<img src="/assets/compass.png" alt="icon" />Discovery</a>
|
||||
<a class="sidebar-item" href="/ranking">
|
||||
<img src="/assets/crown.png" alt="icon" />Ranking</a>
|
||||
<a class="sidebar-item" href="/newest">
|
||||
<img src="/assets/sparkling.png" alt="icon" />Newest</a>
|
||||
<br />
|
||||
<a class="sidebar-item" href="/self/following_works">
|
||||
<img src="/assets/users.png" alt="icon" />Latest by followed</a>
|
||||
<a class="sidebar-item" href="/self/bookmarks">
|
||||
<img src="/assets/heart.png" alt="icon" />Your bookmarks</a>
|
||||
<a class="sidebar-item" href="/self">
|
||||
<img src="/assets/user.png" alt="icon" />Your profile</a>
|
||||
<br />
|
||||
<a class="sidebar-item" href="/settings">
|
||||
<img src="/assets/settings.png" alt="icon" />Settings</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<a href="/" class="navbar-brand">
|
||||
<img src="/favicon.ico" alt="PixivFE's logo" />
|
||||
<b>PixivFE</b>
|
||||
</a>
|
||||
</li>
|
||||
<li class="navbar-item search-bar">
|
||||
<form class="search-form" action="/tags" method="post" autocomplete="off">
|
||||
<input type="text" name="name" class="search-form-text" placeholder="⌕ Search artworks..." />
|
||||
<input type="submit" hidden />
|
||||
</form>
|
||||
</li>
|
||||
<li class="navbar-item navbar-buttons">
|
||||
<a href="/settings" class="navbar-button">
|
||||
<img src="/assets/settings.png" alt="Settings" width="30" height="30" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="navbar-entry">
|
||||
<form
|
||||
class="search-form"
|
||||
action="/tags"
|
||||
method="post"
|
||||
autocomplete="off"
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
name="name"
|
||||
class="search-form-text"
|
||||
placeholder="⌕ Search artworks..."
|
||||
/>
|
||||
<input type="submit" hidden />
|
||||
</form>
|
||||
</span>
|
||||
<span>
|
||||
<span class="navbar-entry" id="search-page-entry">
|
||||
<img src="/assets/search.svg" alt="Search" />
|
||||
</span>
|
||||
<span class="navbar-entry">
|
||||
<a href="/settings">
|
||||
<img src="/assets/cog.svg" alt="Settings" />
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="navbar-shadow"></div>
|
||||
</nav>
|
||||
{{ embed() }}
|
||||
|
||||
<div class="footer">
|
||||
<a href="https://codeberg.org/VnPower/pixivfe">
|
||||
<p>Join the development on Codeberg!</p>
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,95 +1,132 @@
|
||||
<div class="container">
|
||||
<div class="artwork-page">
|
||||
<div class="artwork-content">
|
||||
{{ if !Illust.IsUgoira }}
|
||||
<div class="artwork-images">
|
||||
{{ range index := Illust.Images }}
|
||||
<a href="{{ .Original }}" target="_blank">
|
||||
<img
|
||||
src="{{ .Large }}"
|
||||
alt="Page {{ index }}"
|
||||
class="artwork-image-page"
|
||||
/>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="artwork-images">
|
||||
<a href="https://ugoira.com/i/{{ Illust.ID }}" target="_blank">
|
||||
<video autoplay loop muted disablepictureinpicture playsinline poster="{{ Illust.Images[0].Large }}" src="https://ugoira.com/api/mp4/{{ Illust.ID }}">
|
||||
Unable to load ugoira.
|
||||
</video>
|
||||
</a>
|
||||
</div>
|
||||
<a href="https://ugoira.com/i/{{ Illust.ID }}">Go to ugoira.com for more options</a>
|
||||
{{ end }}
|
||||
<h2>{{ Illust.Title }}</h2>
|
||||
<p>{{ raw: parsePixivRedirect(Illust.Description) }}</p>
|
||||
|
||||
<div class="artwork-tags">
|
||||
{{ if Illust.AiType == 2 }}
|
||||
<span class="artwork-tag-name emphasize">AI-generated</span>
|
||||
{{ end }} {{ range Illust.Tags }} {{ if isEmphasize(.Name) }}
|
||||
<span class="artwork-tag-name emphasize">{{ .Name }}</span>
|
||||
{{ else }}
|
||||
<a href="/tags/{{ .Name }}" class="artwork-tag-name">#{{ .Name }}</a
|
||||
><span class="artwork-tag-altname">{{ .TranslatedName }}</span>
|
||||
{{ end }} {{ end }}
|
||||
</div>
|
||||
<br />
|
||||
<span
|
||||
>{{ Illust.Views }} views | {{ Illust.Bookmarks }} bookmarks | {{
|
||||
Illust.Likes }} likes</span
|
||||
<div class="container illust">
|
||||
{{ if !Illust.IsUgoira }}
|
||||
<div class="illust-images">
|
||||
{{ range index := Illust.Images }}
|
||||
<a href="{{ .Original }}" target="_blank">
|
||||
<img src="{{ .Large }}" alt="Page {{ index }}" />
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="illust-images">
|
||||
<a href="https://ugoira.com/i/{{ Illust.ID }}" target="_blank">
|
||||
<video
|
||||
autoplay
|
||||
loop
|
||||
muted
|
||||
disablepictureinpicture
|
||||
playsinline
|
||||
poster="{{ Illust.Images[0].Large }}"
|
||||
src="https://ugoira.com/api/mp4/{{ Illust.ID }}"
|
||||
>
|
||||
<br />
|
||||
<small>{{ Illust.Date }}</small>
|
||||
|
||||
<a href="/users/{{ Illust.User.ID }}" class="artwork-artist flex"
|
||||
><img
|
||||
src="{{ Illust.User.Avatar }}"
|
||||
alt="{{ Illust.User.Name }}"
|
||||
class="artwork-artist-avatar border-rounded"
|
||||
/>
|
||||
{{ Illust.User.Name }}</a
|
||||
>
|
||||
<div class="thumbnail-container">
|
||||
{{ range Illust.RecentWorks }}
|
||||
<div class="artwork-thumbnail-small artwork-thumbnail">
|
||||
{{ include "components/thumbnail-dt" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
Unable to load ugoira.
|
||||
</video>
|
||||
</a>
|
||||
</div>
|
||||
<a href="https://ugoira.com/i/{{ Illust.ID }}"
|
||||
>Go to ugoira.com for more options</a
|
||||
>
|
||||
{{ end }}
|
||||
<div class="illust-attr">
|
||||
<a href="/users/{{ Illust.User.ID }}"
|
||||
><img
|
||||
src="{{ Illust.User.Avatar }}"
|
||||
alt="{{ Illust.User.Name }}"
|
||||
class="illust-avatar"
|
||||
/>
|
||||
</a>
|
||||
<div class="attr-wrap">
|
||||
<div class="illust-title">{{ Illust.Title }}</div>
|
||||
<div class="illust-author">
|
||||
<a href="/users/{{ Illust.User.ID }}">{{ Illust.User.Name }}</a>
|
||||
</div>
|
||||
<hr />
|
||||
<h2>Comments</h2>
|
||||
{{ if Illust.CommentDisabled == 1 }}
|
||||
<p>The creator turned comments off</p>
|
||||
{{ else if Illust.Comments == 0 }}
|
||||
<p>There is no comment yet</p>
|
||||
{{ else }} {{ range Illust.CommentsList }}
|
||||
<div class="comment">
|
||||
<img
|
||||
class="comment-avatar"
|
||||
src="{{ .Avatar }}"
|
||||
alt="{{ .AuthorName }}"
|
||||
/>
|
||||
<div class="comment-context">
|
||||
<b>{{ .AuthorName }}</b>
|
||||
<p>
|
||||
{{ if .Stamp }}
|
||||
<img
|
||||
class="stamp"
|
||||
src="https://s.pximg.net/common/images/stamp/generated-stamps/{{ .Stamp }}_s.jpg"
|
||||
alt="https://s.pximg.net/common/images/stamp/generated-stamps/{{ .Stamp }}_s.jpg"
|
||||
/>
|
||||
{{ else }} {{ raw: parseEmojis(.Context) }} {{ end }}
|
||||
</p>
|
||||
|
||||
<small>{{ .Date }}</small>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }} {{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<h2>Related works</h2>
|
||||
<div>{{ include "components/small-tn" Illust.RelatedWorks }}</div>
|
||||
|
||||
<div class="illust-tags">
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/eye.png" alt="Views" />
|
||||
{{ Illust.Views }}
|
||||
</span>
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/heart-solid.png" alt="Bookmarks" />
|
||||
{{ Illust.Bookmarks }}
|
||||
</span>
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/like.png" alt="Likes" />
|
||||
{{ Illust.Likes }}
|
||||
</span>
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/calendar.png" alt="Date" />
|
||||
{{ parseTime: Illust.Date }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="illust-tags">
|
||||
{{ if Illust.AiType == 2 }}
|
||||
<span class="illust-tag">
|
||||
<span class="illust-tag-name" id="highlight">AI-generated</span>
|
||||
</span>
|
||||
{{ end }} {{ range Illust.Tags }} {{ if isEmphasize(.Name) }}
|
||||
<span class="illust-tag">
|
||||
<span class="illust-tag-name" id="highlight">{{ .Name }}</span>
|
||||
</span>
|
||||
{{ else }}
|
||||
<span class="illust-tag">
|
||||
<span class="illust-tag-name"
|
||||
><a href="/tags/{{ .Name }}">#{{ .Name }}</a></span
|
||||
><span class="illust-tag-translation">{{ .TranslatedName }}</span>
|
||||
</span>
|
||||
{{ end }} {{ end }}
|
||||
</div>
|
||||
<br />
|
||||
<div class="illust-description">
|
||||
{{ raw: parsePixivRedirect(Illust.Description) }}
|
||||
</div>
|
||||
<br />
|
||||
<div class="illust-other-works">
|
||||
<a href="/users/{{ Illust.User.ID }}"
|
||||
><img src="{{ Illust.User.Avatar }}" alt="{{ Illust.User.Name }}" /> Other
|
||||
works by {{ Illust.User.Name }}
|
||||
<span class="special-symbol">»</span>
|
||||
</a>
|
||||
<div class="artwork-container-scroll">
|
||||
{{ range Illust.RecentWorks }}
|
||||
<div class="artwork-small artwork">
|
||||
{{ include "components/thumbnail-dt" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<h2>Comments</h2>
|
||||
{{ if Illust.CommentDisabled == 1 }}
|
||||
<p>The creator turned comments off</p>
|
||||
{{ else if Illust.Comments == 0 }}
|
||||
<p>There are no comments yet</p>
|
||||
{{ else }} {{ range Illust.CommentsList }}
|
||||
<div class="comment">
|
||||
<img class="comment-avatar" src="{{ .Avatar }}" alt="{{ .AuthorName }}" />
|
||||
<div class="comment-context">
|
||||
<b>{{ .AuthorName }}</b>
|
||||
<p>
|
||||
{{ if .Stamp }}
|
||||
<img
|
||||
class="stamp"
|
||||
src="https://s.pximg.net/common/images/stamp/generated-stamps/{{ .Stamp }}_s.jpg"
|
||||
alt="https://s.pximg.net/common/images/stamp/generated-stamps/{{ .Stamp }}_s.jpg"
|
||||
/>
|
||||
{{ else }} {{ raw: parseEmojis(.Context) }} {{ end }}
|
||||
</p>
|
||||
|
||||
<small>{{ .Date }}</small>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }} {{ end }}
|
||||
</div>
|
||||
<div class="container">
|
||||
<h2>Related works</h2>
|
||||
<div class="artwork-container">
|
||||
{{ include "components/small-tn" Illust.RelatedWorks }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
{{ range . }} {{ if .ID == "#" }}
|
||||
<div class="artwork-thumbnail-small artwork-thumbnail">
|
||||
<img src="{{ .Thumbnail }}" alt="{{ .Title }}" class="artwork-master-image" loading="lazy" />
|
||||
<a class="artwork-thumbnail-title">
|
||||
<h3 class="no-margin">{{ .Title }}</h3>
|
||||
</a>
|
||||
<a class="artwork-thumbnail-artist flex"><img src="{{ .ArtistAvatar }}" alt="{{ .ArtistName }}"
|
||||
class="artwork-thumbnail-artist-avatar border-rounded" loading="lazy" />
|
||||
{{ .ArtistName }}</a>
|
||||
<div class="artwork-small artwork">
|
||||
<img src="{{ .Thumbnail }}" alt="{{ .Title }}" loading="lazy" />
|
||||
<div class="artwork-title">
|
||||
<a>{{ .Title }}</a>
|
||||
</div>
|
||||
<div class="artwork-author"></div>
|
||||
<a
|
||||
><img src="{{ .ArtistAvatar }}" alt="{{ .ArtistName }}" loading="lazy" />
|
||||
<span>{{ .ArtistName }}</span></a
|
||||
>
|
||||
</div>
|
||||
{{ else if .ID }}
|
||||
<div class="artwork-thumbnail-small artwork-thumbnail artwork-mobile">
|
||||
{{ include "thumbnail-dt" . }} {{ include "thumbnail-tt" . }} {{ include
|
||||
"thumbnail-at" . }}
|
||||
<div class="artwork-small artwork">
|
||||
{{ include "thumbnail-dt" . }} {{ include "thumbnail-tt" . }} {{ include
|
||||
"thumbnail-at" . }}
|
||||
</div>
|
||||
{{ end }} {{ end }}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<a href="/users/{{ .ArtistID }}" class="artwork-thumbnail-artist flex"><img src="{{ .ArtistAvatar }}"
|
||||
alt="{{ .ArtistName }}" class="artwork-thumbnail-artist-avatar border-rounded" loading="lazy" />
|
||||
{{ .ArtistName }}</a>
|
||||
<div class="artwork-author">
|
||||
<a href="/users/{{ .ArtistID }}"
|
||||
><img src="{{ .ArtistAvatar }}" alt="{{ .ArtistName }}" />
|
||||
<span>{{ .ArtistName }}</span></a
|
||||
>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{{ if .XRestrict != 0 }}
|
||||
<div class="artwork-profanity-label">
|
||||
<div class="artwork-additional">
|
||||
{{ if .XRestrict != 0 }}
|
||||
<div class="artwork-profanity-label">
|
||||
<span>{{ if .XRestrict == 1 }}R-18{{ else }}R-18G{{ end }}</span>
|
||||
</div>
|
||||
{{ end }} {{ if .Pages > 1 }}
|
||||
<div class="artwork-page-count"><span>⧉ {{ .Pages }}</span></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }} {{ if .Pages > 1 }}
|
||||
<div class="artwork-page-count"><span>⧉ {{ .Pages }}</span></div>
|
||||
{{ end }}
|
||||
<a href="/artworks/{{ .ID }}">
|
||||
<img src="{{ .Thumbnail }}" alt="{{ .Title }}" class="artwork-master-image" loading="lazy" />
|
||||
<img src="{{ .Thumbnail }}" alt="{{ .Title }}" loading="lazy" />
|
||||
</a>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<a class="artwork-thumbnail-title" href="/artworks/{{ .ID }}">
|
||||
<h3 class="no-margin">{{ .Title }}</h3>
|
||||
</a>
|
||||
<div class="artwork-title">
|
||||
<a href="/artworks/{{ .ID }}"> {{ .Title }} </a>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<div class="container">
|
||||
<h2>Discover works</h2>
|
||||
<div class="switcher">
|
||||
{{ url := "/discovery?mode=" }}
|
||||
<span class="switch-title">Filter</span>
|
||||
<a href="{{url}}all" class="switch-button">All</a>
|
||||
<a href="{{url}}safe" class="switch-button">Safe</a>
|
||||
<a href="{{url}}r18" class="switch-button">R-18</a>
|
||||
</div>
|
||||
<div>{{ include "components/small-tn" Artworks }}</div>
|
||||
<div class="pagination">
|
||||
<a href="" class="pagination-button">Reload</a>
|
||||
</div>
|
||||
<h2>Discover works</h2>
|
||||
<div class="switcher">
|
||||
{{ url := "/discovery?mode=" }}
|
||||
<div class="switch-title">Filter</div>
|
||||
<a href="{{url}}all" class="switch-button">All</a>
|
||||
<a href="{{url}}safe" class="switch-button">Safe</a>
|
||||
<a href="{{url}}r18" class="switch-button">R-18</a>
|
||||
</div>
|
||||
<div class="artwork-container">
|
||||
{{ include "components/small-tn" Artworks }}
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<a href="" class="pagination-button">Reload</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
<div class="container">
|
||||
<h2>Newest works from people you follow</h2>
|
||||
<div class="switcher">
|
||||
<span class="switch-title">Filter</span>
|
||||
<a href="/following_works?mode=all&page=1" class="switch-button">All</a>
|
||||
<a href="/following_works?mode=safe&page=1" class="switch-button">Safe</a>
|
||||
<a href="/following_works?mode=r18&page=1" class="switch-button">R-18</a>
|
||||
</div>
|
||||
<div>{{ include "components/small-tn" Artworks }}</div>
|
||||
<div class="pagination">
|
||||
{{ url := "/self/following_works" + "?mode=" + Queries.Mode + "&page=" }} {{ if Page == 1 }}
|
||||
<a href="#" class="pagination-button disabled">First</a>
|
||||
<a href="#" class="pagination-button disabled">Previous</a>
|
||||
{{ else }}
|
||||
<a href="{{url}}1" class="pagination-button">First</a>
|
||||
<a href="{{url}}{{ Page - 1 }}" class="pagination-button">Previous</a>
|
||||
{{ end }}
|
||||
<h2>Newest works from people you follow</h2>
|
||||
<div class="switcher">
|
||||
<div class="switch-title">Filter</div>
|
||||
<a href="/following_works?mode=all&page=1" class="switch-button">All</a>
|
||||
<a href="/following_works?mode=safe&page=1" class="switch-button">Safe</a>
|
||||
<a href="/following_works?mode=r18&page=1" class="switch-button">R-18</a>
|
||||
</div>
|
||||
<div>{{ include "components/small-tn" Artworks }}</div>
|
||||
<div class="pagination">
|
||||
{{ url := "/self/following_works" + "?mode=" + Queries.Mode + "&page=" }} {{
|
||||
if Page == 1 }}
|
||||
<a href="#" class="pagination-button disabled">First</a>
|
||||
<a href="#" class="pagination-button disabled">Previous</a>
|
||||
{{ else }}
|
||||
<a href="{{url}}1" class="pagination-button">First</a>
|
||||
<a href="{{url}}{{ Page - 1 }}" class="pagination-button">Previous</a>
|
||||
{{ end }}
|
||||
|
||||
<a href="#" class="pagination-button disabled">{{ Page }}</a>
|
||||
<a href="#" class="pagination-button disabled">{{ Page }}</a>
|
||||
|
||||
<a href="{{url}}{{ Page + 1 }}" class="pagination-button">Next</a>
|
||||
</div>
|
||||
<a href="{{url}}{{ Page + 1 }}" class="pagination-button">Next</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -88,42 +88,51 @@
|
||||
</div>
|
||||
{{ else }}
|
||||
<p><a href="/login">Login</a> to access more features!</p>
|
||||
<p>
|
||||
Enjoying this frontend so far? I need your opinions and ideas to improve
|
||||
this UI! Share them
|
||||
<a href="https://codeberg.org/VnPower/pixivfe/issues/21">here</a>!
|
||||
</p>
|
||||
<div class="component-header">
|
||||
<h2>Daily rankings</h2>
|
||||
<a href="/ranking">See more</a>
|
||||
</div>
|
||||
<div class="thumbnail-container">
|
||||
<div class="artwork-container-scroll">
|
||||
{{ range rank := Artworks.Rankings }}
|
||||
<div class="artwork-thumbnail-large artwork-thumbnail">
|
||||
<div class="artwork-rank-circle">{{ rank + 1 }}</div>
|
||||
{{ if toInt(.Pages) > 1 }}
|
||||
<div class="artwork-page-count"><span>⧉ {{ .Pages }}</span></div>
|
||||
{{ end }}
|
||||
<div class="artwork-large artwork">
|
||||
<div class="artwork-additional">
|
||||
<div class="artwork-position">{{ rank + 1 }}</div>
|
||||
|
||||
{{ if .Pages > 1 }}
|
||||
<div class="artwork-page-count">
|
||||
<span class="boxbox"> ⧉ </span>
|
||||
<span>2</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<a href="/artworks/{{ .ID }}">
|
||||
<img
|
||||
src="{{ .Thumbnail }}"
|
||||
alt="{{ .Title }}"
|
||||
class="artwork-master-image"
|
||||
/>
|
||||
<img src="{{ .Thumbnail }}" alt="{{ .Title }}" />
|
||||
</a>
|
||||
|
||||
<a class="artwork-thumbnail-title" href="/artworks/{{ .ID }}">
|
||||
<h3 class="no-margin">{{ .Title }}</h3>
|
||||
</a>
|
||||
<a href="/users/{{ .ArtistID }}" class="artwork-thumbnail-artist flex"
|
||||
><img
|
||||
src="{{ .ArtistAvatar }}"
|
||||
alt="{{ .ArtistName }}"
|
||||
class="artwork-thumbnail-artist-avatar border-rounded"
|
||||
/>
|
||||
{{ .ArtistName }}</a
|
||||
>
|
||||
<div class="artwork-title">
|
||||
<a href="/artworks/{{ .ID }}"> {{ .Title }} </a>
|
||||
</div>
|
||||
<div class="artwork-author">
|
||||
<a href="/users/{{ .ArtistID }}">
|
||||
<img
|
||||
src="{{ .ArtistAvatar }}"
|
||||
alt="{{ .ArtistName }}"
|
||||
class="artwork-thumbnail-artist-avatar border-rounded"
|
||||
/>
|
||||
<span>{{ .ArtistName }}</span></a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<h2>Pixivision</h2>
|
||||
<!-- <h2>Pixivision</h2>
|
||||
<div class="thumbnail-container">
|
||||
{{ range Artworks.Pixivision }}
|
||||
<a href="{{ .URL }}" class="spotlight-thumbnail">
|
||||
@@ -138,6 +147,7 @@
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<br />
|
||||
<br /> -->
|
||||
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<div class="container">
|
||||
<h2>Newest works from all users</h2>
|
||||
<div class="switcher">
|
||||
<span class="switch-title">Filter</span>
|
||||
<a href="/newest" class="switch-button">Safe</a>
|
||||
<a href="/newest?mode=r18" class="switch-button">R-18</a>
|
||||
</div>
|
||||
<div>{{ include "components/small-tn" Items }}</div>
|
||||
<h2>Newest works from all users</h2>
|
||||
<div class="switcher">
|
||||
<div class="switch-title">Filter</div>
|
||||
<a href="/newest" class="switch-button">Safe</a>
|
||||
<a href="/newest?mode=r18" class="switch-button">R-18</a>
|
||||
</div>
|
||||
<div class="artwork-container">{{ include "components/small-tn" Items }}</div>
|
||||
</div>
|
||||
|
||||
@@ -1,79 +1,93 @@
|
||||
<div class="container">
|
||||
<h2>{{ Title }}</h2>
|
||||
<h2>{{ Title }}</h2>
|
||||
|
||||
<div class="switcher">
|
||||
{{ url := "/ranking?mode=" + Queries.Mode + "&date=" + Data.CurrentDate + "&page=1&content=" }}
|
||||
<span class="switch-title">Content</span>
|
||||
<a href="{{ url }}all" class="switch-button">Overall</a>
|
||||
<a href="{{ url }}illust" class="switch-button">Illustrations</a>
|
||||
<a href="{{ url }}manga" class="switch-button">Mangas</a>
|
||||
</div>
|
||||
<br />
|
||||
<div class="switcher">
|
||||
{{ url := "/ranking?mode=" + Queries.Mode + "&date=" + Data.CurrentDate +
|
||||
"&page=1&content=" }}
|
||||
<div class="switch-title">Content</div>
|
||||
<a href="{{ url }}all" class="switch-button">Overall</a>
|
||||
<a href="{{ url }}illust" class="switch-button">Illustrations</a>
|
||||
<a href="{{ url }}manga" class="switch-button">Mangas</a>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="switcher">
|
||||
{{ url := "/ranking?content=" + Queries.Content +"&date=" + Data.CurrentDate + "&page=1&mode=" }}
|
||||
<span class="switch-title">Modes</span>
|
||||
<a href="{{ url }}daily" class="switch-button">Daily</a>
|
||||
<a href="{{ url }}weekly" class="switch-button">Weekly</a>
|
||||
<a href="{{ url }}monthly" class="switch-button">Monthly</a>
|
||||
<a href="{{ url }}rookie" class="switch-button">Rookie</a>
|
||||
<span class="switch-seperator"></span>
|
||||
<a href="{{ url }}daily_r18" class="switch-button">Daily (R-18)</a>
|
||||
<a href="{{ url }}weekly_r18" class="switch-button">Weekly (R-18)</a>
|
||||
</div>
|
||||
<br />
|
||||
<div class="switcher">
|
||||
{{ url := "/ranking?content=" + Queries.Content +"&date=" + Data.CurrentDate
|
||||
+ "&page=1&mode=" }}
|
||||
<div class="switch-title">Modes</div>
|
||||
<a href="{{ url }}daily" class="switch-button">Daily</a>
|
||||
<a href="{{ url }}weekly" class="switch-button">Weekly</a>
|
||||
<a href="{{ url }}monthly" class="switch-button">Monthly</a>
|
||||
<a href="{{ url }}rookie" class="switch-button">Rookie</a>
|
||||
<span class="switch-seperator"></span>
|
||||
<a href="{{ url }}daily_r18" class="switch-button">Daily (R-18)</a>
|
||||
<a href="{{ url }}weekly_r18" class="switch-button">Weekly (R-18)</a>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="switcher">
|
||||
{{ url := "/ranking?content=" + Queries.Content + "&mode=" + Queries.Mode + "&page=1" }}
|
||||
<span class="switch-title">Date</span>
|
||||
{{ if Data.PrevDate != "false" }}
|
||||
<a href="{{ url }}&date={{Data.PrevDate}}" class="switch-button">Yesterday</a>
|
||||
{{ end }}
|
||||
{{ if Data.NextDate != "false" }}
|
||||
<a href="{{ url }}&date={{Data.NextDate}}" class="switch-button">Next day</a>
|
||||
{{ end }}
|
||||
<a href="{{ url }}" class="switch-button">Latest</a>
|
||||
<span class="switch-seperator"></span>
|
||||
<a href="/ranking_log">Ranking calendar</a>
|
||||
</div>
|
||||
<br />
|
||||
<div class="switcher">
|
||||
{{ url := "/ranking?content=" + Queries.Content + "&mode=" + Queries.Mode +
|
||||
"&page=1" }}
|
||||
<div class="switch-title">Date</div>
|
||||
{{ if Data.PrevDate != "false" }}
|
||||
<a href="{{ url }}&date={{Data.PrevDate}}" class="switch-button"
|
||||
>Yesterday</a
|
||||
>
|
||||
{{ end }} {{ if Data.NextDate != "false" }}
|
||||
<a href="{{ url }}&date={{Data.NextDate}}" class="switch-button"
|
||||
>Next day</a
|
||||
>
|
||||
{{ end }}
|
||||
<a href="{{ url }}" class="switch-button">Latest</a>
|
||||
<span class="switch-seperator"></span>
|
||||
<a href="/ranking_log">Ranking calendar</a>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="artwork-container">
|
||||
{{ range Data.Artworks }}
|
||||
<div class="artwork-thumbnail-small artwork-thumbnail artwork-mobile">
|
||||
<div class="artwork-rank-circle">{{ .Rank }}</div>
|
||||
<div class="artwork-small artwork">
|
||||
<div class="artwork-additional">
|
||||
<div class="artwork-position">{{ .Rank }}</div>
|
||||
{{ if toInt(.Pages) > 1 }}
|
||||
<div class="artwork-page-count"><span>⧉ {{ .Pages }}</span></div>
|
||||
{{ end }}
|
||||
<a href="/artworks/{{ .ID }}">
|
||||
<img src="{{ .Image }}" alt="{{ .Title }}" class="artwork-master-image" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<a class="artwork-thumbnail-title" href="/artworks/{{ .ID }}">
|
||||
<h3 class="no-margin">{{ .Title }}</h3>
|
||||
</a>
|
||||
<a href="/users/{{ .ArtistID }}" class="artwork-thumbnail-artist flex"><img src="{{ .ArtistAvatar }}"
|
||||
alt="{{ .ArtistName }}" class="artwork-thumbnail-artist-avatar border-rounded" />
|
||||
{{ .ArtistName }}</a>
|
||||
<a href="/artworks/{{ .ID }}">
|
||||
<img src="{{ .Image }}" alt="{{ .Title }}" />
|
||||
</a>
|
||||
<div class="artwork-title">
|
||||
<a href="/artworks/{{ .ID }}"> {{ .Title }} </a>
|
||||
</div>
|
||||
<div class="artwork-author">
|
||||
<a href="/users/{{ .ArtistID }}"
|
||||
><img src="{{ .ArtistAvatar }}" alt="{{ .ArtistName }}" />
|
||||
<span>{{ .ArtistName }}</span></a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="pagination">
|
||||
{{ url := "/ranking?content=" + Queries.Content +"&date=" + Data.CurrentDate + "&mode=" + Queries.Mode +
|
||||
"&page=" }} {{ if Page <= 1 }} <a href="#" class="pagination-button disabled">First</a>
|
||||
<a href="#" class="pagination-button disabled">Previous</a>
|
||||
{{ else }}
|
||||
<a href="{{ url }}1" class="pagination-button">First</a>
|
||||
<a href="{{ url }}{{ Page - 1 }}" class="pagination-button">Previous</a>
|
||||
{{ end }}
|
||||
<div class="pagination">
|
||||
{{ url := "/ranking?content=" + Queries.Content +"&date=" + Data.CurrentDate
|
||||
+ "&mode=" + Queries.Mode + "&page=" }} {{ if Page <= 1 }}
|
||||
<a href="#" class="pagination-button disabled">First</a>
|
||||
<a href="#" class="pagination-button disabled">Previous</a>
|
||||
{{ else }}
|
||||
<a href="{{ url }}1" class="pagination-button">First</a>
|
||||
<a href="{{ url }}{{ Page - 1 }}" class="pagination-button">Previous</a>
|
||||
{{ end }}
|
||||
|
||||
<a href="#" class="pagination-button disabled">{{ Page }}</a>
|
||||
<a href="#" class="pagination-button disabled">{{ Page }}</a>
|
||||
|
||||
{{ if Page == 10 }}
|
||||
<a href="#" class="pagination-button disabled">Next</a>
|
||||
<a href="#" class="pagination-button disabled">Last</a>
|
||||
{{ else }}
|
||||
<a href="{{ url }}{{ Page + 1 }}" class="pagination-button">Next</a>
|
||||
<a href="{{ url }}10" class="pagination-button">Last</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if Page == 10 }}
|
||||
<a href="#" class="pagination-button disabled">Next</a>
|
||||
<a href="#" class="pagination-button disabled">Last</a>
|
||||
{{ else }}
|
||||
<a href="{{ url }}{{ Page + 1 }}" class="pagination-button">Next</a>
|
||||
<a href="{{ url }}10" class="pagination-button">Last</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<h2>Login</h2>
|
||||
<p>Go to <a href="/login">this page</a> to login</p>
|
||||
<h2>Settings</h2>
|
||||
<fieldset class="settings-fieldset">
|
||||
<div class="form-field">
|
||||
<h3>Image proxy server</h3>
|
||||
<form action="/settings/image_server" method="post">
|
||||
<legend>Image proxy server</legend>
|
||||
<input type="radio" name="image-proxy" id="image-proxy" value="i.pixiv.cat" />
|
||||
<label for="image-proxy">i.pixiv.cat</label>
|
||||
<br />
|
||||
@@ -20,16 +20,14 @@
|
||||
<input type="radio" name="image-proxy" id="image-proxy" value="piv.deception.world" />
|
||||
<label for="image-proxy">piv.deception.world</label>
|
||||
<br />
|
||||
<br />
|
||||
<input type="submit" value="Apply" />
|
||||
</form>
|
||||
<br />
|
||||
<form action="/settings/image_server" method="post">
|
||||
<label for="image-proxy">Custom image proxy server</label>
|
||||
<br />
|
||||
<input type="text" name="image-proxy" id="image-proxy" placeholder="Paste the address here..."
|
||||
autocomplete="off" />
|
||||
<br />
|
||||
<input type="submit" value="Apply" />
|
||||
</form>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,75 +1,85 @@
|
||||
<div class="container">
|
||||
<div class="tag-header">
|
||||
{{ if Tag.Metadata.ID }}
|
||||
<a href="/artworks/{{ Tag.Metadata.ID }}">
|
||||
<img class="tag-thumbnail" src="{{ Tag.Metadata.Image }}" alt="{{ Tag.Name }}" />
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
<div class="tag-details">
|
||||
<b class="main-tag">#{{ Tag.Name }}</b>
|
||||
<span class="translated-tag">{{ Tag.Metadata.Name }}</span>
|
||||
<br />
|
||||
<br />
|
||||
<span><b>{{ Data.Artworks.Total }}</b> works</span>
|
||||
|
||||
<p class="tag-description">{{ Tag.Metadata.Detail }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbnail-container">
|
||||
{{ range Data.RelatedTags }}
|
||||
<a class="tag-container" href="/tags/{{ . }}">#{{ . }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="switcher">
|
||||
{{ url := "/tags/" + Tag.Name + "?order=" + Queries.Order + "&mode=" +
|
||||
Queries.Mode + "&page=1" + "&category=" }}
|
||||
<span class="switch-title">Type</span>
|
||||
<a href="{{url }}artworks" class="switch-button">All</a>
|
||||
<a href="{{url }}illustrations" class="switch-button">Illustrations</a>
|
||||
<a href="{{url }}manga" class="switch-button">Manga</a>
|
||||
</div>
|
||||
<div class="switcher">
|
||||
{{ url := "/tags/" + Tag.Name + "?category=" + Queries.Category + "&mode=" +
|
||||
Queries.Mode + "&page=1" + "&order=" }}
|
||||
<span class="switch-title">Order</span>
|
||||
<a href="{{url }}date_d" class="switch-button">Newest</a>
|
||||
<a href="{{url }}date" class="switch-button">Oldest</a>
|
||||
</div>
|
||||
<div class="switcher">
|
||||
<span class="switch-title">Filter</span>
|
||||
{{ url := "/tags/" + Tag.Name + "?category=" + Queries.Category + "&order="
|
||||
+ Queries.Order + "&page=1" + "&mode=" }}
|
||||
<a href="{{url }}all" class="switch-button">All</a>
|
||||
<a href="{{url }}safe" class="switch-button">Safe</a>
|
||||
<a href="{{url }}r18" class="switch-button">R-18</a>
|
||||
</div>
|
||||
{{ if Data.Popular.Recent }}
|
||||
<h2>Popular artworks</h2>
|
||||
<div class="thumbnail-container">
|
||||
{{ include "components/small-tn-normal" Data.Popular.Recent }} {{ include
|
||||
"components/small-tn-normal" Data.Popular.Permanent }}
|
||||
</div>
|
||||
<div class="tag-header">
|
||||
{{ if Tag.Metadata.ID }}
|
||||
<a href="/artworks/{{ Tag.Metadata.ID }}">
|
||||
<img
|
||||
class="tag-thumbnail"
|
||||
src="{{ Tag.Metadata.Image }}"
|
||||
alt="{{ Tag.Name }}"
|
||||
/>
|
||||
</a>
|
||||
{{ end }}
|
||||
<!-- Switchers here -->
|
||||
<br />
|
||||
<h2>Works</h2>
|
||||
<div>{{ include "components/small-tn" Data.Artworks.Artworks }}</div>
|
||||
|
||||
<div class="pagination">
|
||||
{{ url := "/tags/" + Tag.Name + "?category=" + Queries.Category + "&order="
|
||||
+ Queries.Order + "&mode=" + Queries.Mode + "&page=" }} {{ if Page == 1 }}
|
||||
<a href="#" class="pagination-button disabled">First</a>
|
||||
<a href="#" class="pagination-button disabled">Previous</a>
|
||||
{{ else }}
|
||||
<a href="{{url}}1" class="pagination-button">First</a>
|
||||
<a href="{{url}}{{ Page - 1 }}" class="pagination-button">Previous</a>
|
||||
{{ end }}
|
||||
<div class="tag-details">
|
||||
<b class="main-tag">#{{ Tag.Name }}</b>
|
||||
<span class="translated-tag">{{ Tag.Metadata.Name }}</span>
|
||||
<br />
|
||||
<br />
|
||||
<span><b>{{ Data.Artworks.Total }}</b> works</span>
|
||||
|
||||
<a href="#" class="pagination-button disabled">{{ Page }}</a>
|
||||
|
||||
<a href="{{url}}{{ Page + 1 }}" class="pagination-button">Next</a>
|
||||
<p class="tag-description">{{ Tag.Metadata.Detail }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="artwork-container-scroll">
|
||||
{{ range Data.RelatedTags }}
|
||||
<a href="/tags/{{ . }}">
|
||||
<div class="tag-container">
|
||||
<div class="main">#{{ . }}</div>
|
||||
</div>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="switcher">
|
||||
{{ url := "/tags/" + Tag.Name + "?order=" + Queries.Order + "&mode=" +
|
||||
Queries.Mode + "&page=1" + "&category=" }}
|
||||
<div class="switch-title">Type</div>
|
||||
<a href="{{url }}artworks" class="switch-button">All</a>
|
||||
<a href="{{url }}illustrations" class="switch-button">Illustrations</a>
|
||||
<a href="{{url }}manga" class="switch-button">Manga</a>
|
||||
</div>
|
||||
<div class="switcher">
|
||||
{{ url := "/tags/" + Tag.Name + "?category=" + Queries.Category + "&mode=" +
|
||||
Queries.Mode + "&page=1" + "&order=" }}
|
||||
<div class="switch-title">Order</div>
|
||||
<a href="{{url }}date_d" class="switch-button">Newest</a>
|
||||
<a href="{{url }}date" class="switch-button">Oldest</a>
|
||||
</div>
|
||||
<div class="switcher">
|
||||
<div class="switch-title">Filter</div>
|
||||
{{ url := "/tags/" + Tag.Name + "?category=" + Queries.Category + "&order="
|
||||
+ Queries.Order + "&page=1" + "&mode=" }}
|
||||
<a href="{{url }}all" class="switch-button">All</a>
|
||||
<a href="{{url }}safe" class="switch-button">Safe</a>
|
||||
<a href="{{url }}r18" class="switch-button">R-18</a>
|
||||
</div>
|
||||
{{ if Data.Popular.Recent }}
|
||||
<h2>Popular artworks</h2>
|
||||
<div class="artwork-container-scroll">
|
||||
{{ include "components/small-tn" Data.Popular.Recent }} {{ include
|
||||
"components/small-tn" Data.Popular.Permanent }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<!-- Switchers here -->
|
||||
<br />
|
||||
<h2>Works</h2>
|
||||
<div class="artwork-container">
|
||||
{{ include "components/small-tn" Data.Artworks.Artworks }}
|
||||
</div>
|
||||
|
||||
<div class="pagination">
|
||||
{{ url := "/tags/" + Tag.Name + "?category=" + Queries.Category + "&order="
|
||||
+ Queries.Order + "&mode=" + Queries.Mode + "&page=" }} {{ if Page == 1 }}
|
||||
<a href="#" class="pagination-button disabled">First</a>
|
||||
<a href="#" class="pagination-button disabled">Previous</a>
|
||||
{{ else }}
|
||||
<a href="{{url}}1" class="pagination-button">First</a>
|
||||
<a href="{{url}}{{ Page - 1 }}" class="pagination-button">Previous</a>
|
||||
{{ end }}
|
||||
|
||||
<a href="#" class="pagination-button disabled">{{ Page }}</a>
|
||||
|
||||
<a href="{{url}}{{ Page + 1 }}" class="pagination-button">Next</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,67 +1,83 @@
|
||||
{{ if ! User.BackgroundImage }}
|
||||
<div class="user-background-placeholder"></div>
|
||||
<div class="background-cover"></div>
|
||||
{{ else }}
|
||||
<div class="user-background">
|
||||
<img src="{{ User.BackgroundImage }}" alt="{{ User.Name }}" />
|
||||
<div class="background-cover" id="hasbg">
|
||||
<img src="{{ User.BackgroundImage }}" alt="{{ User.Name }}" />
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="container">
|
||||
<div class="user-page">
|
||||
<div class="user-details">
|
||||
<img src="{{ User.Avatar }}" alt="avatar" class="user-avatar" />
|
||||
<h2 class="user-name">{{ User.Name }}</h2>
|
||||
<p class="user-id">
|
||||
{{ User.Following }} Following | {{ User.MyPixiv }} MyPixiv
|
||||
</p>
|
||||
<p class="user-comment">{{ raw: parsePixivRedirect(User.Comment) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="switcher">
|
||||
<span class="switch-title">Category</span>
|
||||
<a href="/users/{{ User.ID }}/artworks#checkpoint" class="switch-button">All</a>
|
||||
<a href="/users/{{ User.ID }}/illustrations#checkpoint" class="switch-button">Illustrations</a>
|
||||
<a href="/users/{{ User.ID }}/manga#checkpoint" class="switch-button">Mangas</a>
|
||||
<a href="/users/{{ User.ID }}/bookmarks#checkpoint" class="switch-button">Bookmarks</a>
|
||||
</div>
|
||||
<div>
|
||||
<h1 id="checkpoint">Illustrations and Mangas</h1>
|
||||
<div class="container user">
|
||||
<div class="user-avatar">
|
||||
<img src="{{ User.Avatar }}" alt="avatar" />
|
||||
</div>
|
||||
<div class="user-details">
|
||||
<h2>{{ User.Name }}</h2>
|
||||
<small> {{ User.Following }} Following | {{ User.MyPixiv }} MyPixiv </small>
|
||||
<p>{{ raw: parsePixivRedirect(User.Comment) }}</p>
|
||||
</div>
|
||||
<div class="switcher">
|
||||
<div class="switch-title">Category</div>
|
||||
<a href="/users/{{ User.ID }}/artworks#checkpoint" class="switch-button"
|
||||
>All</a
|
||||
>
|
||||
<a
|
||||
href="/users/{{ User.ID }}/illustrations#checkpoint"
|
||||
class="switch-button"
|
||||
>Illustrations</a
|
||||
>
|
||||
<a href="/users/{{ User.ID }}/manga#checkpoint" class="switch-button"
|
||||
>Mangas</a
|
||||
>
|
||||
<a href="/users/{{ User.ID }}/bookmarks#checkpoint" class="switch-button"
|
||||
>Bookmarks</a
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<h1 id="checkpoint">Illustrations and Mangas</h1>
|
||||
|
||||
<div>
|
||||
{{ range User.FrequentTags }}
|
||||
<a href="/tags/{{ .Name }}">
|
||||
<div class="tag-container" style="background-color: {{ randomColor() }}">
|
||||
{{ if ! .TranslatedName }}
|
||||
<div class="main">{{ .Name }}</div>
|
||||
<div class="sub">#</div>
|
||||
{{ else }}
|
||||
<div class="main">{{ .TranslatedName }}</div>
|
||||
<div class="sub">#{{ .Name }}</div>
|
||||
<!-- <div>
|
||||
{{ range User.FrequentTags }}
|
||||
<a href="/tags/{{ .Name }}">
|
||||
<div class="tag-container" style="background-color: {{ randomColor() }}">
|
||||
{{ if ! .TranslatedName }}
|
||||
<div class="main">{{ .Name }}</div>
|
||||
<div class="sub">#</div>
|
||||
{{ else }}
|
||||
<div class="main">{{ .TranslatedName }}</div>
|
||||
<div class="sub">#{{ .Name }}</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
{{ include "components/small-tn" User.Artworks }}
|
||||
<div class="artwork-container">
|
||||
{{ include "components/small-tn" User.Artworks }}
|
||||
</div>
|
||||
<div class="pagination">
|
||||
{{ url := "/users/" + User.ID + "/" + Category + "?page="}} {{ if Page == 1
|
||||
}}
|
||||
<a href="#" class="pagination-button disabled">First</a>
|
||||
<a href="#" class="pagination-button disabled">Previous</a>
|
||||
{{ else }}
|
||||
<a href="{{ url }}1#checkpoint" class="pagination-button">First</a>
|
||||
<a href="{{ url }}{{ Page - 1 }}#checkpoint" class="pagination-button">Previous</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="pagination">
|
||||
{{ url := "/users/" + User.ID + "/" + Category + "?page="}} {{ if Page == 1
|
||||
}}
|
||||
<a href="#" class="pagination-button disabled">First</a>
|
||||
<a href="#" class="pagination-button disabled">Previous</a>
|
||||
{{ else }}
|
||||
<a href="{{ url }}1#checkpoint" class="pagination-button">First</a>
|
||||
<a href="{{ url }}{{ Page - 1 }}#checkpoint" class="pagination-button"
|
||||
>Previous</a
|
||||
>
|
||||
{{ end }}
|
||||
|
||||
<a href="#" class="pagination-button disabled">{{ Page }}</a>
|
||||
<a href="#" class="pagination-button disabled">{{ Page }}</a>
|
||||
|
||||
{{ if Page == PageLimit - 1 }}
|
||||
<a href="#" class="pagination-button disabled">Next</a>
|
||||
<a href="#" class="pagination-button disabled">Last</a>
|
||||
{{ else }}
|
||||
<a href="{{ url }}{{ Page + 1 }}#checkpoint" class="pagination-button">Next</a>
|
||||
<a href="{{ url }}{{ PageLimit - 1 }}#checkpoint" class="pagination-button">Last</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if Page == PageLimit - 1 }}
|
||||
<a href="#" class="pagination-button disabled">Next</a>
|
||||
<a href="#" class="pagination-button disabled">Last</a>
|
||||
{{ else }}
|
||||
<a href="{{ url }}{{ Page + 1 }}#checkpoint" class="pagination-button"
|
||||
>Next</a
|
||||
>
|
||||
<a href="{{ url }}{{ PageLimit - 1 }}#checkpoint" class="pagination-button"
|
||||
>Last</a
|
||||
>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||