{{- extends "layout/default" }} {{- import "blocks/pagination" }} {{- import "blocks/underlinenav" }} {{- import "blocks/rankingnav" }} {{- block body() }} {{- Mode := isset(Queries.mode) ? Queries.mode : "daily" }} {{- Content := isset(Queries.content) ? Queries.content : "all" }} {{- url := "" }} {{- if Mode == "original" || Mode == "male" || Mode == "female" || Mode == ""}} {{ url = "/ranking?date=" + .Data.CurrentDate + "&page=1&content=" }} {{- else }} {{- url = "/ranking?mode=" + "daily" + "&date=" + .Data.CurrentDate + "&page=1&content=" }} {{- end }}

Daily

Weekly

Monthly

Rookie

Overall

Illustrations

Ugoira

Manga

Daily (R-18)

Weekly (R-18)

Weekly (R-18G)

Original

AI-generated

Popular among males

Popular among females

AI-generated (R-18)

Popular among males (R-18)

Popular among females (R-18)

Ranking

{* TODO: add additional checks to these UnderlineNav buttons to ensure only valid URLs can be generated e.g. selecting the "Ugoira" button hides the buttons under "Specialized rankings" as well as the "Monthly" and "Rookie" options under "Time frame", but this doesn't occur vice versa with the "Ugoira" button still visible if either of the latter buttons are selected, thus allowing the user to generate an invalid URL even when there is no UX indication that this is the case Currently resetting Mode to "daily" upon Content switch as an easy (if inadequate) workaround for this TODO *} {{- url := "" }} {{- if Mode == "original" || Mode == "male" || Mode == "female" || Mode == "" }} {{ url = "/ranking?date=" + .Data.CurrentDate + "&page=1&content=" }} {{- else }} {{- url = "/ranking?mode=" + "daily" + "&date=" + .Data.CurrentDate + "&page=1&content=" }} {{- end }} {{- path := slice("all", "illust", "ugoira", "manga") }} {{- name := slice("Overall", "Illustrations", "Ugoira", "Manga")}} {{- yield UnderlineNav(baseURL=url, paths=path, names=name, activeState=Content)}}
{{- if isset(Queries.mode) && isset(Queries.content) }}

{{ Queries.mode }} {{ Queries.content }} rankings for {{ .Data.CurrentDate }}

{{- else }}

Daily All Rankings for {{ .Data.CurrentDate }}

{{- end }}
{{- yield RankingNav()}}
{{- include "fragments/ranking-tn" .Data.Contents }}
{{- yield RankingNav()}}
{{- url := "/ranking?content=" + Content +"&date=" + .Data.CurrentDate + "&mode=" + Mode + "&page=" }} {{- paginationData := createPaginator(url, "#checkpoint", .Page, -1, 1, 5) }} {{- yield pagination(data=paginationData) }}