Documentation
¶
Overview ¶
templ: version: v0.2.707
templ: version: v0.2.707
templ: version: v0.2.707
templ: version: v0.2.707
templ: version: v0.2.707
templ: version: v0.2.707
templ: version: v0.2.707
templ: version: v0.2.707
templ: version: v0.2.707
Index ¶
- Constants
- func Admin() templ.Component
- func CSRFHidden() templ.Component
- func ClearTemporaryFlashesMiddleware() echo.MiddlewareFunc
- func DeleteFlash(c echo.Context, name string)
- func Error(message string) templ.Component
- func ForgotPasswordEmail() templ.Component
- func ForgotPasswordForm(vm ForgotPasswordFormViewModel) templ.Component
- func GetFlash(c echo.Context, name string) interface{}
- func Home(news string) templ.Component
- func Info(message string) templ.Component
- func Login(vm LoginViewModel) templ.Component
- func Middleware(users njudge.Users, ps njudge.Problems, problemStore problems.Store, ...) echo.MiddlewareFunc
- func MoveFlashesToContextMiddleware() echo.MiddlewareFunc
- func Page() templ.Component
- func PageWithContent(content string) templ.Component
- func Pagination(links []PaginationLink) templ.Component
- func Problem(vm ProblemViewModel) templ.Component
- func ProblemEdit(vm ProblemEditViewModel) templ.Component
- func ProblemList(vm ProblemListViewModel) templ.Component
- func ProblemRanklist(vm ProblemRanklistViewModel) templ.Component
- func ProblemStatus(vm SubmissionsViewModel) templ.Component
- func ProblemSubmit(vm ProblemSubmitViewModel) templ.Component
- func ProblemsetRanklist(vm ProblemsetRanklistViewModel) templ.Component
- func Profile(vm ProfileViewModel) templ.Component
- func ProfileSettings(vm ProfileSettingsViewModel) templ.Component
- func ProfileSubmissions(vm ProfileSubmissionsViewModel) templ.Component
- func Register(vm RegisterViewModel) templ.Component
- func Render(ctx echo.Context, statusCode int, t templ.Component) error
- func SetFlash(c echo.Context, name string, value interface{})
- func Status(vm SubmissionsViewModel) templ.Component
- func Submission(vm SubmissionViewModel) templ.Component
- func SubmissionFeedback(s njudge.Submission) templ.Component
- func SubmissionFeedbackUpdate(s njudge.Submission) templ.Component
- func SubmissionRow(s njudge.Submission) templ.Component
- func SubmissionRowUpdate(s njudge.Submission) templ.Component
- func SubmissionStatusText(s njudge.Submission) templ.Component
- func Submissions(vm SubmissionsViewModel) templ.Component
- func TaskArchive(vm TaskArchiveViewModel) templ.Component
- func Tr(ctx context.Context, key string, args ...any) string
- func TrCs(ctx context.Context, cs problems.Contents) problems.LocalizedData
- type Cached
- type CategoryFilterOption
- type Empty
- type ForgotPasswordFormViewModel
- type LanguageCompileCommand
- type Link
- type LoginViewModel
- type PaginationData
- type PaginationLink
- type ProblemEditViewModel
- type ProblemListProblem
- type ProblemListViewModel
- type ProblemRanklistRow
- type ProblemRanklistViewModel
- type ProblemSubmitViewModel
- type ProblemTag
- type ProblemViewModel
- type ProblemsetRanklistRow
- type ProblemsetRanklistViewModel
- type ProfileSettingsViewModel
- type ProfileSubmission
- type ProfileSubmissionsViewModel
- type ProfileViewModel
- type RegisterViewModel
- type SortColumn
- type Store
- type SubmissionViewModel
- type SubmissionsViewModel
- type TaskArchiveViewModel
Constants ¶
View Source
const ( TopMessageContextKey = "_top_message" LoginMessageContextKey = "_login_message" LoginRedirectContextKey = "_login_redirect" ForgotPasswordEmailMessageContextKey = "_forgot_password_email_message" ForgotPasswordFormMessageContextKey = "_forgot_password_form_message" ChangePasswordContextKey = "_change_password" )
View Source
const ( CustomHeadPartial = "custom_head" CustomMenuPartial = "custom_menu" )
View Source
const ( CSRFTokenContextKey = "_csrf" CSRFTokenLookup = "form:" + CSRFTokenContextKey UserContextKey = "user" URLPathContextKey = "_url_path" TitleContextKey = "_njudge_title" UsersContextKey = "_njudge_users" ProblemsContextKey = "_njudge_problems" ProblemsStoreContextKey = "_njudge_problems_store" PartialsStoreContextKey = "_njudge_partials_store" )
Variables ¶
This section is empty.
Functions ¶
func CSRFHidden ¶ added in v0.5.0
func ClearTemporaryFlashesMiddleware ¶ added in v0.5.0
func ClearTemporaryFlashesMiddleware() echo.MiddlewareFunc
func DeleteFlash ¶ added in v0.5.0
func DeleteFlash(c echo.Context, name string)
func ForgotPasswordEmail ¶ added in v0.5.0
func ForgotPasswordForm ¶ added in v0.5.0
func ForgotPasswordForm(vm ForgotPasswordFormViewModel) templ.Component
func Login ¶ added in v0.5.0
func Login(vm LoginViewModel) templ.Component
func Middleware ¶ added in v0.5.0
func MoveFlashesToContextMiddleware ¶ added in v0.5.0
func MoveFlashesToContextMiddleware() echo.MiddlewareFunc
func PageWithContent ¶ added in v0.5.0
func Pagination ¶ added in v0.5.0
func Pagination(links []PaginationLink) templ.Component
func Problem ¶ added in v0.5.0
func Problem(vm ProblemViewModel) templ.Component
func ProblemEdit ¶ added in v0.6.0
func ProblemEdit(vm ProblemEditViewModel) templ.Component
func ProblemList ¶ added in v0.5.0
func ProblemList(vm ProblemListViewModel) templ.Component
func ProblemRanklist ¶ added in v0.5.0
func ProblemRanklist(vm ProblemRanklistViewModel) templ.Component
func ProblemStatus ¶ added in v0.5.0
func ProblemStatus(vm SubmissionsViewModel) templ.Component
func ProblemSubmit ¶ added in v0.5.0
func ProblemSubmit(vm ProblemSubmitViewModel) templ.Component
func ProblemsetRanklist ¶ added in v0.6.0
func ProblemsetRanklist(vm ProblemsetRanklistViewModel) templ.Component
func Profile ¶ added in v0.5.0
func Profile(vm ProfileViewModel) templ.Component
func ProfileSettings ¶ added in v0.5.0
func ProfileSettings(vm ProfileSettingsViewModel) templ.Component
func ProfileSubmissions ¶ added in v0.5.0
func ProfileSubmissions(vm ProfileSubmissionsViewModel) templ.Component
func Register ¶ added in v0.5.0
func Register(vm RegisterViewModel) templ.Component
func Status ¶ added in v0.5.0
func Status(vm SubmissionsViewModel) templ.Component
func Submission ¶ added in v0.5.0
func Submission(vm SubmissionViewModel) templ.Component
func SubmissionFeedback ¶ added in v0.5.0
func SubmissionFeedback(s njudge.Submission) templ.Component
func SubmissionFeedbackUpdate ¶ added in v0.5.0
func SubmissionFeedbackUpdate(s njudge.Submission) templ.Component
func SubmissionRow ¶ added in v0.5.0
func SubmissionRow(s njudge.Submission) templ.Component
func SubmissionRowUpdate ¶ added in v0.5.0
func SubmissionRowUpdate(s njudge.Submission) templ.Component
func SubmissionStatusText ¶ added in v0.5.0
func SubmissionStatusText(s njudge.Submission) templ.Component
func Submissions ¶ added in v0.5.0
func Submissions(vm SubmissionsViewModel) templ.Component
func TaskArchive ¶ added in v0.5.0
func TaskArchive(vm TaskArchiveViewModel) templ.Component
Types ¶
type CategoryFilterOption ¶ added in v0.5.0
type ForgotPasswordFormViewModel ¶ added in v0.5.0
type LanguageCompileCommand ¶ added in v0.6.0
type LoginViewModel ¶ added in v0.5.0
type PaginationData ¶ added in v0.5.0
type PaginationData struct { Page int `query:"_page"` PerPage int `query:"_perPage"` SortDir string `query:"_sortDir"` SortField string `query:"_sortField"` }
func ParsePaginationData ¶ added in v0.5.0
func ParsePaginationData(c echo.Context) (*PaginationData, error)
type PaginationLink ¶ added in v0.5.0
func Links ¶ added in v0.5.0
Links generates links for cnt elements such that every page contains perPage elements, and we are on page
func LinksWithCountLimit ¶ added in v0.5.0
func LinksWithCountLimit(page, perPage int, cnt int64, qu url.Values, pageLimit int) ([]PaginationLink, error)
LinksWithCountLimit filters links generated by Links around page in a pageLimit range
type ProblemEditViewModel ¶ added in v0.6.0
type ProblemEditViewModel struct { Categories []CategoryFilterOption Visible bool Author string Tags []ProblemTag }
type ProblemListProblem ¶ added in v0.5.0
type ProblemListViewModel ¶ added in v0.5.0
type ProblemListViewModel struct { Name string Pages []PaginationLink Problems []ProblemListProblem SolverSorter SortColumn Filtered bool Tags []njudge.Tag TitleFilter string TagsFilter string CategoryFilterOptions []CategoryFilterOption }
type ProblemRanklistRow ¶ added in v0.5.0
type ProblemRanklistViewModel ¶ added in v0.5.0
type ProblemRanklistViewModel struct { ScoredProblem bool TimeRows []ProblemRanklistRow MemRows []ProblemRanklistRow SizeRows []ProblemRanklistRow ScoresRows []ProblemRanklistRow }
type ProblemSubmitViewModel ¶ added in v0.5.0
type ProblemTag ¶ added in v0.6.0
type ProblemViewModel ¶ added in v0.5.0
type ProblemViewModel struct { Title string Problemset string Name string DisplayLimits bool TimeLimit int InputFile string OutputFile string MemoryLimit memory.Amount ShowTags bool Tags []njudge.Tag Author string TaskTypeName string CanEdit bool CanAddTags bool LanguageCompileCommands []LanguageCompileCommand Languages []language.Language UserInfo *njudge.ProblemUserInfo Attachments problems.Attachments Statements problems.Contents Statement *problems.LocalizedData TagsToAdd []njudge.Tag }
type ProblemsetRanklistRow ¶ added in v0.6.0
type ProblemsetRanklistViewModel ¶ added in v0.6.0
type ProblemsetRanklistViewModel struct { Rows []ProblemsetRanklistRow Pages []PaginationLink }
type ProfileSettingsViewModel ¶ added in v0.5.0
type ProfileSubmission ¶ added in v0.5.0
type ProfileSubmissionsViewModel ¶ added in v0.5.0
type ProfileSubmissionsViewModel struct { Name templ.SafeURL SubmissionsViewModel SubmissionsViewModel }
type ProfileViewModel ¶ added in v0.5.0
type ProfileViewModel struct { Name templ.SafeURL GravatarHash string Points float64 RanklistPosition int SolvedProblems []ProfileSubmission AttemptedProblems []ProfileSubmission }
type RegisterViewModel ¶ added in v0.5.0
type SortColumn ¶ added in v0.5.0
type SortColumn struct { Order njudge.SortDirection Href string }
type SubmissionViewModel ¶ added in v0.5.0
type SubmissionViewModel struct { CanRejudge bool DisplaySource bool Submission njudge.Submission }
type SubmissionsViewModel ¶ added in v0.5.0
type SubmissionsViewModel struct { Pages []PaginationLink Submissions []njudge.Submission }
type TaskArchiveViewModel ¶ added in v0.5.0
type TaskArchiveViewModel struct { Root njudge.TaskArchiveNode ProblemLinks map[int]Link }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.