{* TODO: this block isn't actually used for anything at the moment; need to figure out how to imports and parameters properly 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 *} {* Defining this as a block rather than a fragment because imports that require going to higher directories doesn't seem possible *}

Daily

Weekly

Monthly

Rookie

Overall

Illustrations

Ugoira

Manga

Daily (R-18)

Weekly (R-18)

Original

Popular among males

Popular among females

{{- block RankingOptions() }} {{- 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=" + Mode + "&date=" + .Data.CurrentDate + "&page=1&content=" }} {{- end }}

Content type

{{- path := slice("all", "illust", "manga", "ugoira") }} {{- name := slice("Overall", "Illustrations", "Manga", "Ugoira")}} {{- yield UnderlineNav(baseURL=url, paths=path, names=name, activeState=Content)}}

Select the type of content you want to see in the rankings.

Time frame

{{ url := "/ranking?content=" + Content +"&date=" + .Data.CurrentDate + "&page=1&mode=" }} {{- if Content != "ugoira" }}
{{- path := slice("daily", "weekly", "monthly", "rookie") }} {{- name := slice("Daily", "Weekly", "Monthly", "Rookie")}} {{- yield UnderlineNav(baseURL=url, paths=path, names=name, activeState=Mode)}}
{{- path := slice("daily_r18", "weekly_r18") }} {{- name := slice("Daily (R-18)", "Weekly (R-18)")}} {{- yield UnderlineNav(baseURL=url, paths=path, names=name, activeState=Mode)}}
{{- else }}
{{- path := slice("daily", "weekly") }} {{- name := slice("Daily", "Weekly")}} {{- yield UnderlineNav(baseURL=url, paths=path, names=name, activeState=Mode)}}
{{- path := slice("daily_r18", "weekly_r18") }} {{- name := slice("Daily (R-18)", "Weekly (R-18)")}} {{- yield UnderlineNav(baseURL=url, paths=path, names=name, activeState=Mode)}}
{{- end }}

Choose the time frame for the rankings.

Monthly and Rookie are unavailable when filtering for Ugoira.

{{- if Content == "all" }}

Specialized rankings

{{ specUrl := "/ranking?content=all&date=" + .Data.CurrentDate + "&page=1&mode=" }} {{- path := slice("original") }} {{- name := slice("Original")}} {{- yield UnderlineNav(baseURL=specUrl, paths=path, names=name, activeState=Mode)}}
{{ specUrl := "/ranking?content=all&date=" + .Data.CurrentDate + "&page=1&mode=" }} {{- path := slice("male", "female") }} {{- name := slice("Popular among males", "Popular among females")}} {{- yield UnderlineNav(baseURL=specUrl, paths=path, names=name, activeState=Mode)}}

Specialized ranking categories.

These options are only available when filtering for Overall.

{{- end }}
Reset filters
{{- end }}