Skip to content

Commit

Permalink
image size and kramdown
Browse files Browse the repository at this point in the history
  • Loading branch information
BTWS2 committed Jan 12, 2024
1 parent d65b0b3 commit c20d137
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions en/references/exercise-description/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ order: 1

> Dodona supports exercise descriptions and reading activities in HTML and Markdown with several additional features such as support for mathematical formulas.
::: tip Kramdown
Dodona uses [kramdown](https://kramdown.gettalong.org) to render Markdown, which supports a lot of extensions to the standard Markdown. For more explanation on how this formatting works, you can find in [this overview](https://kramdown.gettalong.org/quickref.html).
:::

These features are available for both exercises and reading activities. They are rendered in exactly the same way. The only difference is that exercises have a text editor at the bottom of the exercise description, where a reading activity has a `Mark as read` button.

## Markdown
Expand Down Expand Up @@ -80,6 +84,18 @@ Which results in:

To use images in your description, be sure to put the images in the `description/media/` [directory](/en/references/exercise-directory-structure) of your exercise.

### Set size

It is possible to set the size of the image using both HTML and kramdown.

```html
<img src="https://dodona.be/icon.png" alt="Dodona logo" width="25%">
```

```markdown
![Dodona logo](https://dodona.be/icon.png){:width="25%"}
```

### Lightboxes

Dodona automatically adds [lightbox support](https://en.wikipedia.org/wiki/Lightbox_(JavaScript)) to all images in descriptions. If you click on an image, the image will open in a lightbox. It is possible to specify a caption for an image and to set an alternative (high-resolution) version for use in the lightbox.
Expand Down
16 changes: 16 additions & 0 deletions nl/references/exercise-description/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ order: 1

> Dodona ondersteunt oefeningbeschrijvingen en leesactiviteiten in HTML en Markdown met verschillende extra features zoals ondersteuning voor wiskundige formules.
::: tip Kramdown
Dodona maakt voor de weergave van Markdown gebruik van [kramdown](https://kramdown.gettalong.org) waardoor heel wat uitbreidingen van de standaard Markdown ondersteund worden. Voor meer uitleg over hoe deze formattering werkt, kan je in [dit overzicht](https://kramdown.gettalong.org/quickref.html) vinden.
:::

De features die op deze pagina beschreven worden zijn beschikbaar voor zowel oefeningen als leesactiviteiten. Ze worden op exact dezelfde manier weergegeven. Het enige verschil is dat oefeningen onderaan de beschrijving een tekst editor hebben, terwijl leesactiviteiten een `Markeer als gelezen` knop hebben.

## Markdown
Expand Down Expand Up @@ -79,6 +83,18 @@ Opsommingen werken heel natuurlijk in Markdown. Afhankelijk of je een genummerde

Om afbeeldingen te gebruiken in je opgave, dien je de afbeeldingen in de `description/media/` [map](/nl/references/exercise-directory-structure) te plaatsen.

### Grootte instellen

Het is mogelijk om zowel met HTML als kramdown de grootte van de afbeelding in te stellen.

```html
<img src="https://dodona.be/icon.png" alt="Dodona logo" width="25%">
```

```markdown
![Dodona logo](https://dodona.be/icon.png){:width="25%"}
```

### Lightboxes

Dodona voegt automatisch een [lightbox](https://en.wikipedia.org/wiki/Lightbox_(JavaScript)) toe aan alle afbeeldingen in een opgave. Dat wil zeggen dat als je op een afbeelding klikt, deze zal openen in een lightbox. Het is ook mogelijk om zo een onderschrift toe te voegen en om een alternatieve (hoge-resolutie) versie van de afbeelding te tonen.
Expand Down

0 comments on commit c20d137

Please sign in to comment.