{{define "public/item_detail.html"}} {{template "public_favicon_link" .}} {{.Title}} - {{T "site_name"}} {{if .SEO.RobotsNoindex}}{{end}} {{if .Description}}{{end}} {{if .CanonicalURL}}{{end}} {{with .SEO}} {{if .OgDescription}}{{end}} {{if $.CanonicalURL}}{{end}} {{if .OgImage}}{{end}} {{end}} {{if .Description}}{{end}} {{if .SEO.OgImage}}{{end}} {{template "custom-head-embed" .}} {{template "public/header_frag" .}} {{if .Data.AdminPreview}}
{{T "item_admin_preview_banner"}} {{T "item_admin_preview_back_audit"}}
{{end}}

{{index .Data.Item "title"}} v{{index .Data.Item "version"}}

{{if .Data.ItemTags}}
{{range .Data.ItemTags}} {{.Tag}} {{end}}
{{end}}
{{.Data.LikeCount}} {{.Data.DislikeCount}} {{index .Data.Item "download_count"}} {{if gt (asInt (index .Data.Item "published_at")) 0}} {{unixDate (index .Data.Item "published_at")}} {{else if .Data.AdminPreview}} {{T "item_admin_preview_not_published"}} {{end}}
{{if or .Data.LangDisplay .Data.DbLinks .Data.osDisplay (and (ge (asInt (index .Data.Item "ui_lang")) 1) (le (asInt (index .Data.Item "ui_lang")) 4)) (ge (asInt (index .Data.Item "code_difficulty")) 1)}}
{{if .Data.LangDisplay}} {{if .Data.LangFilterURL}}{{.Data.LangDisplay}}{{else}}{{.Data.LangDisplay}}{{end}} {{end}} {{if .Data.DbLinks}} {{range $i, $d := .Data.DbLinks}}{{if $i}}、{{end}}{{if $d.URL}}{{$d.Name}}{{else}}{{$d.Name}}{{end}}{{end}} {{end}} {{if .Data.osDisplay}} {{.Data.osDisplay}} {{end}} {{if and (ge (asInt (index .Data.Item "ui_lang")) 1) (le (asInt (index .Data.Item "ui_lang")) 4)}} {{.Data.UILangDisplay}} {{end}} {{if ge (asInt (index .Data.Item "code_difficulty")) 1}} {{range $s := starSlots1To5}}{{end}} ({{asInt (index .Data.Item "code_difficulty")}}/5) {{end}}
{{end}}
{{if and (not .Data.AdminPreview) .CanonicalURL}} {{end}}
{{if not .Data.AdminPreview}}
{{if $.User}} {{else}} {{end}} {{if $.User}} {{else}} {{end}}
{{end}} {{if .Data.ShowAuthorSocialStrip}}
{{if $.Data.AuthorDisplay}} {{T "item_author_strip_prefix"}}:{{$.Data.AuthorDisplay}} {{end}}
{{template "item_detail_author_follow_frag" .}}
{{end}}
{{if and $.Data.AuthorDisplay (not .Data.ShowAuthorSocialStrip)}}

{{T "field_author"}}:{{$.Data.AuthorDisplay}}

{{end}}
{{if .Data.VideoURL}}
{{end}} {{if $.Data.Screens}} {{end}} {{if or (index .Data.Item "intro") (index .Data.Item "demo_url") (index .Data.Item "related_url") $.Data.HasArchivePreview .Data.DetailHas}}

{{T "item_section_intro"}}

{{if index .Data.Item "intro"}}
{{.Data.IntroHTML}}
{{end}} {{if .Data.DetailHas}}

{{T "field_detail_html"}}

{{.Data.DetailHTML}}
{{end}} {{if $.Data.HasArchivePreview}}

{{T "item_zip_tree_title"}}

{{T "item_zip_tree_loading"}}
{{T "item_zip_tree_empty"}}
    {{T "item_zip_tree_truncated"}}
    {{end}} {{if or (index .Data.Item "demo_url") (index .Data.Item "related_url")}} {{end}}
    {{end}} {{if .Data.ReleaseLog}}

    {{T "item_section_changelog"}}

    {{.Data.ReleaseLog}}
    {{end}} {{if not .Data.AdminPreview}}

    {{T "item_section_comments"}}

    {{if $.User}}
    {{T
    {{end}}
    {{if $.Data.Comments}}
    {{range .Data.Comments}}
    {{.Username}}

    {{.Content}}

    {{.BehaviorDisplay}}
    {{end}}
    {{else}}

    {{T "browse_empty_comments"}}

    {{end}}
    {{else}}

    {{T "item_section_comments"}}

    {{T "item_admin_preview_comments_off"}}

    {{end}}
    {{if and (not .Data.AdminPreview) .CanonicalURL}} {{end}} {{if and $.User (not .Data.AdminPreview)}} {{end}} {{if .Data.HasArchivePreview}} {{end}} {{if and (not .Data.AdminPreview) .CanonicalURL}} {{end}} {{template "public/footer_frag" .}} {{end}} {{define "item_detail_author_follow_frag"}} {{if .Data.ShowAuthorSocialStrip}} {{if $.User}} {{if .Data.FollowingAuthor}} {{T "item_author_strip_dm"}} {{else}} {{T "item_author_strip_dm"}} {{end}} {{else}} {{end}} {{end}} {{end}}