esthetic work
This commit is contained in:
parent
bd5ba3ff7a
commit
e2dbe8364f
@ -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>
|
||||||
|
|
||||||
{#if status === 'upcoming'}
|
<div class="actions">
|
||||||
<button>Start battle</button>
|
{#if status === 'upcoming'}
|
||||||
{:else if status === 'ongoing'}
|
<button>Start battle</button>
|
||||||
<button on:click={battleVerdict('won')}>Battle won</button>
|
{:else if status === 'ongoing'}
|
||||||
<button on:click={battleVerdict('lost')}>Battle lost</button>
|
<button on:click={battleVerdict('won')}>Battle won</button>
|
||||||
{/if}
|
<button class="tertiary" on:click={battleVerdict('lost')}
|
||||||
|
>Battle lost</button
|
||||||
|
>
|
||||||
|
{/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>
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
{#if choices.length === 0}
|
{#if choices.length === 0}
|
||||||
{selection}
|
{selection}
|
||||||
{:else}
|
{:else}
|
||||||
<select on:change>
|
<div class="field suffix">
|
||||||
<option>{selection}</option>
|
<select on:change>
|
||||||
{#each choices as c (c)}
|
<option>{selection}</option>
|
||||||
<option>{c}</option>
|
{#each choices as c (c)}
|
||||||
{/each}
|
<option>{c}</option>
|
||||||
</select>
|
{/each}
|
||||||
|
</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>
|
||||||
|
@ -19,9 +19,11 @@
|
|||||||
</h6>
|
</h6>
|
||||||
<p>
|
<p>
|
||||||
{#if campaign.battles}
|
{#if campaign.battles}
|
||||||
chapter {currentChapter(campaign)}, battle of {currentCity(
|
<a href={`#/campaign/${campaign._id}`}>
|
||||||
campaign,
|
chapter {currentChapter(campaign)}, battle of {currentCity(
|
||||||
)}.
|
campaign,
|
||||||
|
)}.
|
||||||
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -34,23 +36,26 @@
|
|||||||
|
|
||||||
{#if showNewCampaign}
|
{#if showNewCampaign}
|
||||||
<div class="modal active">
|
<div class="modal active">
|
||||||
<h5>New campaign</h5>
|
<form>
|
||||||
<div>
|
<h5>New campaign</h5>
|
||||||
<div class="field border">
|
<div>
|
||||||
<input
|
<div class="field border">
|
||||||
autofocus
|
<input
|
||||||
type="text"
|
autofocus
|
||||||
bind:value={newCampaignName}
|
type="text"
|
||||||
placeholder="Campaign name"
|
bind:value={newCampaignName}
|
||||||
/>
|
placeholder="Campaign name"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<nav class="right-align">
|
||||||
<nav class="right-align">
|
<button
|
||||||
<button class="border" on:click={() => (showNewCampaign = false)}
|
class="border"
|
||||||
>Cancel</button
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user