ui: Mark locked theme as « Confidential »
continuous-integration/drone/push Build is failing Details

This commit is contained in:
nemunaire 2023-03-20 15:56:56 +01:00
parent 8038407b07
commit 975544e157
2 changed files with 38 additions and 27 deletions

View File

@ -19,33 +19,44 @@
<Card class="niceborder text-indent mt-2 mb-4">
<CardBody class="bg-dark text-light">
<Row>
<Col>
<p class="mt-4 mx-3 card-text lead text-justify">{@html $current_theme.headline}</p>
<p class="mb-4 mx-3 card-text text-justify">{@html $current_theme.intro}</p>
</Col>
{#if $current_theme.partner_txt || $current_theme.partner_img || $current_theme.partner_href}
<Col md="2" lg="3" class="d-none d-md-block">
<Card class="pt-3 px-3">
{#if $current_theme.partner_img}
<img src="{$current_theme.partner_img}" alt="En-tête du scénario" class="card-img-top">
{/if}
{#if $current_theme.partner_txt || $current_theme.partner_href}
<CardBody class="p-0 mt-3">
{#if $current_theme.partner_txt}
{@html $current_theme.partner_txt}
{/if}
{#if $current_theme.partner_href}
<Button tag="a" color="primary" href="{$current_theme.partner_href}">
Visiter le site
</Button>
{/if}
</CardBody>
{/if}
</Card>
</Col>
<div style="position: relative; display: inline-block;">
{#if $current_theme.locked}
<div style="position: absolute; z-index: 0; top: 0; bottom: 0; left: 0; right: 0;" class="d-flex justify-content-center align-items-center">
<div style="transform: rotate(-25deg)">
<div class="display-3 font-weight-bolder border border-danger text-danger px-3 py-1" style="opacity: 0.5; border-radius: 20px; border-width: 5px !important; font-family: 'Courier New'">
CONFIDENTIEL
</div>
</div>
</div>
{/if}
</Row>
<Row>
<Col>
<p class="mt-4 mx-3 card-text lead text-justify">{@html $current_theme.headline}</p>
<p class="mb-4 mx-3 card-text text-justify">{@html $current_theme.intro}</p>
</Col>
{#if $current_theme.partner_txt || $current_theme.partner_img || $current_theme.partner_href}
<Col md="2" lg="3" class="d-none d-md-block">
<Card class="pt-3 px-3">
{#if $current_theme.partner_img}
<img src="{$current_theme.partner_img}" alt="En-tête du scénario" class="card-img-top">
{/if}
{#if $current_theme.partner_txt || $current_theme.partner_href}
<CardBody class="p-0 mt-3">
{#if $current_theme.partner_txt}
{@html $current_theme.partner_txt}
{/if}
{#if $current_theme.partner_href}
<Button tag="a" color="primary" href="{$current_theme.partner_href}">
Visiter le site
</Button>
{/if}
</CardBody>
{/if}
</Card>
</Col>
{/if}
</Row>
</div>
</CardBody>
{#if $current_theme.exercices}

View File

@ -49,7 +49,7 @@ func ExportThemes() (interface{}, error) {
return nil, err
} else {
for _, exercice := range exercices {
if exercice.Disabled {
if exercice.Disabled && theme.Locked {
continue
}