ui: Avoid some hard coded strings
This commit is contained in:
parent
6e684436d1
commit
b3c207d07d
2 changed files with 8 additions and 3 deletions
|
@ -50,8 +50,8 @@
|
||||||
<div style="background-image: url({heading_image})" class="page-header">
|
<div style="background-image: url({heading_image})" class="page-header">
|
||||||
<Container class="text-primary">
|
<Container class="text-primary">
|
||||||
<h1 class="display-2">
|
<h1 class="display-2">
|
||||||
{#if $current_theme.urlid == "_"}
|
{#if $current_theme.urlid == "_" && $current_exercice}
|
||||||
<a href="{$current_theme.urlid}">{#if $current_exercice}{$current_exercice.title}{:else}Défis indépendants{/if}</a>
|
<a href="{$current_theme.urlid}">{$current_exercice.title}</a>
|
||||||
{:else}
|
{:else}
|
||||||
<a href="{$current_theme.urlid}">{$current_theme.name}</a>
|
<a href="{$current_theme.urlid}">{$current_theme.name}</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -43,7 +43,12 @@ func ExportThemes() (interface{}, error) {
|
||||||
if themes, err := GetThemes(); err != nil {
|
if themes, err := GetThemes(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
} else {
|
} else {
|
||||||
themes = append(themes, &Theme{URLId: "_", Path: "exercices"})
|
// Append standalone exercices fake-themes
|
||||||
|
themes = append(themes, &Theme{
|
||||||
|
Name: "Défis indépendants",
|
||||||
|
URLId: "_",
|
||||||
|
Path: "exercices",
|
||||||
|
})
|
||||||
|
|
||||||
ret := map[string]exportedTheme{}
|
ret := map[string]exportedTheme{}
|
||||||
for _, theme := range themes {
|
for _, theme := range themes {
|
||||||
|
|
Reference in a new issue