esthetic work

This commit is contained in:
Yanick Champoux 2023-01-15 17:34:39 -05:00
parent bd5ba3ff7a
commit e2dbe8364f
3 changed files with 62 additions and 36 deletions

View File

@ -27,7 +27,7 @@
<dt>wave</dt> <dt>wave</dt>
<dd>{wave === 2 ? 'second' : 'first'}</dd> <dd>{wave === 2 ? 'second' : 'first'}</dd>
{/if} {/if}
<dt>city</dt> <dt><i>home</i></dt>
<dd> <dd>
{#if typeof city === 'string'} {#if typeof city === 'string'}
{city} {city}
@ -41,17 +41,17 @@
/> />
{/if} {/if}
</dd> </dd>
<dt>scenario</dt> <dt><i>view_kanban</i></dt>
<dd>{scenario}</dd> <dd>{scenario}</dd>
{#if character} {#if character}
<dt>character</dt> <dt><i>person</i></dt>
<dd>{character}</dd> <dd>{character}</dd>
{/if} {/if}
{#if additionalCharacters} {#if additionalCharacters}
{#each additionalCharacters as c, i (c.selection)} {#each additionalCharacters as c, i (c.selection)}
<dt>add. character</dt> <dt><i>person</i><i>star</i></dt>
<dd> <dd>
<AdditionalCharacter <AdditionalCharacter
on:change={changeCharacter(i)} on:change={changeCharacter(i)}
@ -66,7 +66,7 @@
<dt>difficulty</dt> <dt>difficulty</dt>
<dd> <dd>
<div class="field border"> <div class="field ">
<input <input
type="number" type="number"
step="0.5" step="0.5"
@ -99,12 +99,16 @@
</dd> </dd>
</dl> </dl>
<div class="actions">
{#if status === 'upcoming'} {#if status === 'upcoming'}
<button>Start battle</button> <button>Start battle</button>
{:else if status === 'ongoing'} {:else if status === 'ongoing'}
<button on:click={battleVerdict('won')}>Battle won</button> <button on:click={battleVerdict('won')}>Battle won</button>
<button on:click={battleVerdict('lost')}>Battle lost</button> <button class="tertiary" on:click={battleVerdict('lost')}
>Battle lost</button
>
{/if} {/if}
</div>
<footer class="fixed"> <footer class="fixed">
<nav> <nav>
@ -187,6 +191,7 @@
<style> <style>
article { article {
height: 100vh; height: 100vh;
min-height: 100vh;
} }
h5 { h5 {
flex: 1; flex: 1;
@ -231,4 +236,7 @@
header nav { header nav {
max-width: 100%; max-width: 100%;
} }
.actions {
text-align: center;
}
</style> </style>

View File

@ -1,12 +1,15 @@
{#if choices.length === 0} {#if choices.length === 0}
{selection} {selection}
{:else} {:else}
<div class="field suffix">
<select on:change> <select on:change>
<option>{selection}</option> <option>{selection}</option>
{#each choices as c (c)} {#each choices as c (c)}
<option>{c}</option> <option>{c}</option>
{/each} {/each}
</select> </select>
<i>arrow_drop_down</i>
</div>
{/if} {/if}
<script> <script>
@ -14,3 +17,12 @@
export let choices; export let choices;
$: console.log(choices); $: console.log(choices);
</script> </script>
<style>
select {
/*width: 90%;*/
}
.field {
margin-bottom: 0px;
}
</style>

View File

@ -19,9 +19,11 @@
</h6> </h6>
<p> <p>
{#if campaign.battles} {#if campaign.battles}
<a href={`#/campaign/${campaign._id}`}>
chapter {currentChapter(campaign)}, battle of {currentCity( chapter {currentChapter(campaign)}, battle of {currentCity(
campaign, campaign,
)}. )}.
</a>
{/if} {/if}
</p> </p>
</div> </div>
@ -34,6 +36,7 @@
{#if showNewCampaign} {#if showNewCampaign}
<div class="modal active"> <div class="modal active">
<form>
<h5>New campaign</h5> <h5>New campaign</h5>
<div> <div>
<div class="field border"> <div class="field border">
@ -46,11 +49,13 @@
</div> </div>
</div> </div>
<nav class="right-align"> <nav class="right-align">
<button class="border" on:click={() => (showNewCampaign = false)} <button
>Cancel</button class="border"
on:click={() => (showNewCampaign = false)}>Cancel</button
> >
<button type="submit" on:click={saveNewCampaign}>Create</button> <button on:click={saveNewCampaign}>Create</button>
</nav> </nav>
</form>
</div> </div>
{/if} {/if}
@ -83,6 +88,7 @@
}; };
const saveNewCampaign = () => { const saveNewCampaign = () => {
console.log('sent');
api.event.addCampaign(newCampaignName); api.event.addCampaign(newCampaignName);
newCampaignName = ''; newCampaignName = '';
showNewCampaign = false; showNewCampaign = false;