Hide question description when correcting to gain screen space
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-09-23 09:59:23 +02:00
parent 1e332942fc
commit cee08fdb94
2 changed files with 9 additions and 1 deletions

View File

@ -10,6 +10,7 @@
export let question = null;
export let qid = null;
export let edit = false;
export let nodescription = false;
</script>
<div class="card-header {className}">
@ -43,7 +44,7 @@
</div>
<textarea class="form-control mb-2" bind:value={question.desc_raw} placeholder="Description de la question"></textarea>
{:else if question.description}
{:else if question.description && !nodescription}
<p class="card-text mt-2">{@html question.description}</p>
{/if}
</div>

View File

@ -48,8 +48,14 @@
}
cts = cts;
});
let nodescription = false;
let y = 0;
$: nodescription = y > 10;
</script>
<svelte:window bind:scrollY={y} />
{#await surveyP then survey}
{#await getQuestion(rid)}
<div class="text-center">
@ -82,6 +88,7 @@
<div class="card sticky-top">
<QuestionHeader
{question}
nodescription={nodescription}
>
<button
class="btn btn-sm btn-link float-start"