Hide question description when correcting to gain screen space
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1e332942fc
commit
cee08fdb94
@ -10,6 +10,7 @@
|
|||||||
export let question = null;
|
export let question = null;
|
||||||
export let qid = null;
|
export let qid = null;
|
||||||
export let edit = false;
|
export let edit = false;
|
||||||
|
export let nodescription = false;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="card-header {className}">
|
<div class="card-header {className}">
|
||||||
@ -43,7 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<textarea class="form-control mb-2" bind:value={question.desc_raw} placeholder="Description de la question"></textarea>
|
<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>
|
<p class="card-text mt-2">{@html question.description}</p>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,8 +48,14 @@
|
|||||||
}
|
}
|
||||||
cts = cts;
|
cts = cts;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let nodescription = false;
|
||||||
|
let y = 0;
|
||||||
|
$: nodescription = y > 10;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:window bind:scrollY={y} />
|
||||||
|
|
||||||
{#await surveyP then survey}
|
{#await surveyP then survey}
|
||||||
{#await getQuestion(rid)}
|
{#await getQuestion(rid)}
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@ -82,6 +88,7 @@
|
|||||||
<div class="card sticky-top">
|
<div class="card sticky-top">
|
||||||
<QuestionHeader
|
<QuestionHeader
|
||||||
{question}
|
{question}
|
||||||
|
nodescription={nodescription}
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="btn btn-sm btn-link float-start"
|
class="btn btn-sm btn-link float-start"
|
||||||
|
Reference in New Issue
Block a user