Widgets

Widgets allow to insert dynamic pieces of content on pages, such as content or problem lists.

List of problems

Use the following syntax to insert a list of problems on a page.

::: {#problem-widget}
# New problems
:::

Text between ::: will be displayed above the list, unless it is empty. If the list of problems is empty, the widget will not be displayed.

You can specify which problems should be displayed in the list by specifying additional parameters.

Parameter

Value

Description

id

line

problem IDs for the list are separated by the space character

topic

line

problem topic identifier

size

number

the maximum number of problems in the list

sort

line

parameter for sorting problems in the list: recent, popular

order

line

order asc (descending) or desc (ascending)

For example, to display a list of selected problems, use the id parameter.

::: {#problem-widget id="tv4r0iklfl1q5bcmp741mpvk63 bcacp8lb5d239fdo7hiqr1fe66"}
# Problems for beginners
:::

Possible values for the parameter to sort:

  • `recent' - by the date the problem was created

  • `popular' - by the number of users who solved the problem

List of competitions

Use the following syntax to list the competitions on the page.

::: {#contest-widget}
# Active competitions
:::

Text between ::: will be displayed above the competition list, unless it is empty.

You can specify which competitions should be displayed in the list by specifying additional parameters.

Parameter

Value

Description

id

line

the competition IDs for the list are separated by the space character

status

line

competition status in the list: SCHEDULED, OPEN, ACTIVE, UPSOLVE, COMPLETE

For example, to display a list of selected competitions, use the id parameter.

::: {#content-widget id="tv4r0iklfl1q5bcmp741mpvk63 bcacp8lb5d239fdo7hiqr1fe66"}
# Competition for beginners
:::

Or, to show active competitions, use the status parameter

::: {#content-widget status="ACTIVE"}
# Active competitions
:::

Possible values for the competition status:

  • SCHEDULED - the competition is scheduled for the future

  • OPEN - the competition has started, participants can join

  • ACTIVE - the participant takes part in the competition

  • UPSOLVE - the participant has finished the competition and is performing a final decision

  • COMPLETE - the competition is over