esthetic work

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

View File

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

View File

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