Skip to content

Commit

Permalink
feat: Accept utf8 in json, cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bdelbosc committed Aug 13, 2020
1 parent c47b902 commit 58c44c3
Show file tree
Hide file tree
Showing 14 changed files with 217 additions and 232 deletions.
137 changes: 83 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-livereload": "^1.0.0",
"rollup-plugin-svelte": "^5.0.3",
"rollup-plugin-terser": "^5.1.2",
"rollup-plugin-terser": "^7.0.0",
"standard-version": "^8.0.2",
"svelte": "^3.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/extractData.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def get_value(a, b):
def process_label(label):
if label.startswith('>'):
return "&#8659;<br>" + label[2:]
return label
return label.strip()


class Map:
Expand Down
12 changes: 8 additions & 4 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@
else evaluationEdit();
});
</script>


Expand Down Expand Up @@ -296,10 +295,15 @@

<div class="top" id="top">
<button class="settings" on:click={() => userEdit()}>
<span title="Edit User"><SvgIcon d={userIcon} fill="blue" size="1.5em"/>{user.name}</span>
<div title="Edit User">
<SvgIcon d={userIcon} fill="blue" boxSize="20"/>{user.name}
</div>
</button>
<button class="settings" on:click={() => beerEdit()}>
<span title="Edit Beer"><SvgIcon d={beerIcon} boxSize="2206" fill="orange" size="1.5em"/>{beer.entry}</span>
<div title="Edit Beer">
<SvgIcon d={beerIcon} boxSize="512" fill="#700000"/>
#{beer.entry}
</div>
</button>
<button on:click={() => submit()} class="right">
<span title="Export PDF">PDF</span>
Expand Down Expand Up @@ -334,7 +338,7 @@
{:else if 4 === currentTab}
<Mouthfeel mouthfeel={mouthfeel}/>
{:else if 5 === currentTab}
<Overall overall={overall}/>
<Overall overall={overall} score={totalScore}/>
{/if}
</div>
<div class="footLine">{pkg.name} v{pkg.version}</div>
Expand Down
4 changes: 3 additions & 1 deletion src/Aroma.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@
{/each}
<div class="buttons">
<button on:click={picker}>
<span title="Add new Aroma"><SvgIcon d={addIcon} size="2em" fill="blue"/></span>
<span title="Add new Aroma">
<SvgIcon d={addIcon} size="2em" fill="blue"/>
</span>
</button>
</div>
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/Beer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
}
</style>
<h3>
<SvgIcon d={beerIcon} boxSize="2206" fill="orange"/>
<SvgIcon d={beerIcon} boxSize="512" fill="#700000"/>
Which beer deserves feedback?
</h3>

Expand Down
21 changes: 20 additions & 1 deletion src/Overall.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
DRINKABILITY_OPTIONS
} from './js/Overall';
import Score from "./comp/Score.svelte";
import {getScore, getScoreDescription} from './js/PdfRenderer';
export let overall;
export let score;
function updateHandler() {
overall.updateHandler()
Expand All @@ -24,6 +26,16 @@
input {
width: 10em;
}
div.scoreDescription {
font-size: 0.8em;
font-style: italic;
}
div.score {
margin-top: 1em;
margin-bottom: 1em;
}
</style>

<div>
Expand All @@ -50,12 +62,19 @@
Intangible
</SelectCheck>
</div>
<div>
</div>
<div>
<span class="label">Feedback</span>
<textarea on:change={updateHandler} type=text bind:value={overall.feedback}/>
</div>
<div>
<Score on:change={updateHandler} bind:value={overall.score} max="10" min="1">Score</Score>
</div>

{#if score > 0}
<div class="score">
Total score is <b>{score}</b> which is <b>{getScore(score)}</b>
<div class="scoreDescription">{getScoreDescription(score)}</div>
</div>
{/if}

13 changes: 7 additions & 6 deletions src/User.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,18 @@
}
</style>
<h3>
<SvgIcon d={userIcon} fill="blue"/>
<SvgIcon d={userIcon} fill="blue" boxSize="20"/>
Who are you?
</h3>
<div>
<span class="label">Name</span>
<span class=" label
">Name</span>
<input on:change={updateHandler} type=text bind:value={user.name}/>
</div>
</div>

<div>
<SelectCheck on:change={updateHandler} bind:value={user.rank} options={RANK_OPTIONS} noCheck="true">
Rank
<div>
<SelectCheck on:change={updateHandler} bind:value={user.rank} options={RANK_OPTIONS} noCheck="true">
Rank
</SelectCheck>
</div>

2 changes: 1 addition & 1 deletion src/comp/SvgIcon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</script>

<svg class="icon" width={size} height={size} viewBox="0 0 {boxSize} {boxSize}" fill={fill}
xmlns="http://www.w3.org/2000/svg">
preserveAspectRatio="xMidYMid" xmlns="http://www.w3.org/2000/svg">
<path d={d} stroke="#4A5568" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Expand Down
Loading

0 comments on commit 58c44c3

Please sign in to comment.