{{ range $i := to 1 $.TotalPages }}
{{ if or (eq $i 1) (eq $i $.TotalPages) (and (ge $i (subtract $.CurrentPage 2)) (le $i (add $.CurrentPage 2))) }}
{{ $i }}
{{ else if and (eq $i 2) (gt (subtract $.CurrentPage 3) 1) }}
...
{{ else if and (eq $i (subtract $.TotalPages 1)) (lt (add $.CurrentPage 3) $.TotalPages) }}
...
{{ end }}
{{ end }}
{{ end }}
{{ range .FavoriteQuestions }}
{{ if .IsFavorite }}
{{ if not .IsCorrect }}
错题
{{ end }}
{{ if .Question.Type }}
{{ if eq .Question.Type "mcq" }}选择题{{ else if eq .Question.Type "fill" }}填空题{{ else if eq .Question.Type "sa" }}简答题{{ else if eq .Question.Type "algo" }}算法题{{ else }}{{.Question.Type}}{{ end }}
{{ end }}
{{ if .Question.Difficulty }}
{{.Question.Difficulty}}
{{ end }}
{{ if .Question.Category }}
{{.Question.Category}}
{{ end }}
{{.Question.Score}}分
{{.Question.Text}}
{{ if .Question.Options }}
{{ range $i, $opt := .Question.Options }}
{{index "ABCDE" $i}}{{$opt}}
{{ end }}
{{ end }}
正确答案:{{.Question.Answer}}
{{ if .UserAnswer }}
你的答案:{{.UserAnswer}}
{{ end }}
{{ if .Question.Analysis }}
答案解析
{{.Question.Analysis}}
{{ end }}
{{ end }}
{{ else }}
暂无收藏题目
{{ end }}
{{ range .FavoriteQuestions }}
{{ if not .IsCorrect }}
错题
{{ if .IsFavorite }}
收藏
{{ end }}
{{ if .Question.Type }}
{{ if eq .Question.Type "mcq" }}选择题{{ else if eq .Question.Type "fill" }}填空题{{ else if eq .Question.Type "sa" }}简答题{{ else if eq .Question.Type "algo" }}算法题{{ else }}{{.Question.Type}}{{ end }}
{{ end }}
{{ if .Question.Difficulty }}
{{.Question.Difficulty}}
{{ end }}
{{ if .Question.Category }}
{{.Question.Category}}
{{ end }}
{{.Question.Score}}分