diff --git a/frontend/ui/src/routes/[theme]/+layout.svelte b/frontend/ui/src/routes/[theme]/+layout.svelte index f283e4ee..cd7d72ab 100644 --- a/frontend/ui/src/routes/[theme]/+layout.svelte +++ b/frontend/ui/src/routes/[theme]/+layout.svelte @@ -11,14 +11,22 @@ import { current_theme } from '$lib/stores/themes'; let heading_image = ""; + let current_authors = ""; $: if ($current_theme) { if ($current_exercice && $current_exercice.image) { heading_image = $current_exercice.image; } else { heading_image = $current_theme.image; } + + if ($current_exercice && $current_exercice.authors) { + current_authors = $current_exercice.authors; + } else { + current_authors = $current_theme.authors; + } } else { heading_image = ""; + current_authors = ""; } @@ -44,7 +52,7 @@

{$current_theme.name}

-

{@html $current_theme.authors}

+

{@html current_authors}

diff --git a/libfic/theme_export.go b/libfic/theme_export.go index 9ecdb29f..131c2e94 100644 --- a/libfic/theme_export.go +++ b/libfic/theme_export.go @@ -12,6 +12,7 @@ var GlobalScoreCoefficient float64 = 1 type exportedExercice struct { Id int64 `json:"id"` Title string `json:"title"` + Authors string `json:"authors,omitempty"` Headline string `json:"headline,omitempty"` Image string `json:"image,omitempty"` URLId string `json:"urlid"` @@ -63,6 +64,7 @@ func ExportThemes() (interface{}, error) { exos = append(exos, exportedExercice{ exercice.Id, exercice.Title, + exercice.Authors, exercice.Headline, exoimgpath, exercice.URLId,