Widgets allow to insert dynamic pieces of content on pages, such as content or problem lists.
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 |
|---|---|---|
| line | problem IDs for the list are separated by the space character |
| line | problem topic identifier |
| number | the maximum number of problems in the list |
| line | parameter for sorting problems in the list: |
| line | order |
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
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 |
|---|---|---|
| line | the competition IDs for the list are separated by the space character |
| line | competition status in the list: |
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