Fix AiType

This commit is contained in:
VnPower
2024-09-17 23:10:37 +07:00
parent a5418aa9ce
commit d804db1ba2
4 changed files with 29 additions and 1 deletions
Binary file not shown.
+2 -1
View File
@@ -19,10 +19,11 @@
<div class="artwork-page-count"><span>&#9654;</span></div>
{{- end }}
</div>
{{- AiType := isset(.AiType) ? .AiType : 0}}
<a target="{{ target }}" href="/artworks/{{ .ID }}#checkpoint">
{{- if (.XRestrict > 0 && hideR18 != "" && hideR18G != "") || (.XRestrict == 2 && hideR18G != "") }}
<img src="/img/nsfw.png" alt="{{ .Title }}" loading="lazy" />
{{- else if .AiType == 2 && hideAi }}
{{- else if AiType == 2 && hideAi }}
<img src="/img/ai.png" alt="{{ .Title }}" loading="lazy" />
{{- else }}
<img src="{{ .Thumbnail }}" alt="{{ .Title }}" loading="lazy" />
+9
View File
@@ -0,0 +1,9 @@
# File structure
- `assets/`: Static files (images, CSS, JS) and site templates.
- `config/`: Handle configurations for the server.
- `config.go`: Parses for environment variables and pass down the configurations.
- `proxy_list.go`: Contains the built-in third party image proxy list.
- `core/`: Make requests to Pixiv's server and parses information into structured data.
- `doc/`: Contains documentations for the general user and developers.
- `server/`:
+18
View File
@@ -0,0 +1,18 @@
This file contains guidelines for code development.
# File structure
- `assets/`: Static files (images, CSS, JS) and site templates.
- `config/`: Handle configurations for the server.
- `config.go`: Parses for environment variables and pass down the configurations.
- `proxy_list.go`: Contains the built-in third party image proxy list.
- `core/`: Make requests to Pixiv's server and parses information into structured data.
- `doc/`: Contains documentations for the general user and developers.
- `server/`: The web server.
- `audit/`: Audit requests made by PixivFE to external APIs.
- `handlers/`: Contains middlewares for logging, rate limiting, error handling, etc.
- `proxy_checker/`: The image proxy checker.
- `routes/`: Routes handling. Pages will be rendered here.
- `session/`: Handles user's options.
- `template/`: Core template renderer and template functions.
- `utils/`: Other utilities.