Skip to content

Commit

Permalink
Adding inzage helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit-Welsch committed Apr 16, 2024
1 parent 2bccaa4 commit e425392
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
import Question from './template/Question.svelte';
import { ThemeWrapper, ToggleSwitch } from '@lv00/sveltelib';
import { compareMode, showMenu, questions, oldQuestions } from './store';
import { compareMode, showMenu, questions, oldQuestions, inzage } from './store';
import Log from './lib/Log.svelte';
let titleHeader = '';
let rrnHeader = '';
</script>

<header>
Expand Down Expand Up @@ -55,6 +58,15 @@
{/if}

<div class="questions">
{#if $inzage}
<div class="header">
<input type="text" bind:value={titleHeader} class="hide-print" placeholder="Test name">
<p class="show-print">{titleHeader}</p>
<input type="text" bind:value={rrnHeader} class="hide-print" placeholder="RRN">
<p class="show-print">{rrnHeader}</p>
</div>
{/if}

{#if $questions.length > 0}
{#each $questions as question}
<Question bind:question />
Expand Down Expand Up @@ -118,6 +130,17 @@
font-size: 0.95rem;
}
.questions > .header {
padding: 5px;
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: center;
}
.questions > .header > *{
margin: auto;
}
@media print {
header {
background-color: #ddd;
Expand Down
7 changes: 7 additions & 0 deletions src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ body {
.hidePrint {
display: none !important;
}
.show-print {
display: block !important;
}
}

.show-print {
display: none;
}

@page {
Expand Down

0 comments on commit e425392

Please sign in to comment.