Light cleanup
This commit is contained in:
parent
c4d561ab50
commit
a385305127
4 changed files with 15 additions and 20 deletions
|
@ -1,8 +1,8 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- Welcome to a shark. I hope you enjoy this aquatic organism. -->
|
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
<!-- Welcome to a shark. I hope you enjoy this aquatic organism. -->
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||||
|
|
||||||
<meta property="og:title" itemprop="name" content="Shark Game" />
|
<meta property="og:title" itemprop="name" content="Shark Game" />
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="./build/bundle.css" />
|
<link rel="stylesheet" type="text/css" href="./build/bundle.css" />
|
||||||
<script defer src="./build/bundle.js"></script>
|
<script defer type="module" src="./build/bundle.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
|
|
@ -52,12 +52,9 @@
|
||||||
{#each Object.entries(otherHeaderButtons) as [name, onClick]}
|
{#each Object.entries(otherHeaderButtons) as [name, onClick]}
|
||||||
<li>
|
<li>
|
||||||
{#if name === "discord"}
|
{#if name === "discord"}
|
||||||
<a href={discordLink} target="_blank">{name}</a>
|
<a href={discordLink} rel="noopener" target="_blank">{name}</a>
|
||||||
{:else}
|
{:else}
|
||||||
<a
|
<a on:click={onClick} href={"javascript:;"}>{name}</a>
|
||||||
on:click={name === "discord" ? undefined : onClick}
|
|
||||||
href={name === "discord" ? discordLink : "javascript:;"}>{name}</a
|
|
||||||
>
|
|
||||||
{/if}
|
{/if}
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
|
@ -80,6 +77,8 @@
|
||||||
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
||||||
|
border-bottom: 1px solid var(--color-darker);
|
||||||
|
|
||||||
> span {
|
> span {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,16 +38,6 @@
|
||||||
addMessage("message" + $messages.length);
|
addMessage("message" + $messages.length);
|
||||||
}}>Add Message</button
|
}}>Add Message</button
|
||||||
>
|
>
|
||||||
<button
|
|
||||||
on:click={() => {
|
|
||||||
addMessage("message".repeat(100) + $messages.length);
|
|
||||||
}}>Add Long Message</button
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
on:click={() => {
|
|
||||||
addMessage("message ".repeat(100) + $messages.length);
|
|
||||||
}}>Add Long Message (spaced)</button
|
|
||||||
>
|
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
addMessage("warn" + $messages.length, MessageType.warning);
|
addMessage("warn" + $messages.length, MessageType.warning);
|
||||||
|
@ -59,12 +49,14 @@
|
||||||
}}>Add Error</button
|
}}>Add Error</button
|
||||||
>
|
>
|
||||||
<button on:click={resetMessages}>Clear log</button>
|
<button on:click={resetMessages}>Clear log</button>
|
||||||
<ol>
|
<ol id="message-log">
|
||||||
{#each displayMessages as message, i (message)}
|
{#each displayMessages as message, i (message)}
|
||||||
{#if i < logLength}
|
{#if i < logLength}
|
||||||
<li
|
<li
|
||||||
transition:slide={{ easing: expoOut }}
|
transition:slide={{ easing: expoOut }}
|
||||||
class={(message.isEven ? "even" : "odd") + " " + message.type}
|
class:even={message.isEven}
|
||||||
|
class:odd={!message.isEven}
|
||||||
|
class={message.type}
|
||||||
>
|
>
|
||||||
{message}
|
{message}
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -16,7 +16,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
{#if !collapsed}
|
{#if !collapsed}
|
||||||
{#each resources as [resourceName, resource], index}
|
{#each resources as [resourceName, resource], index}
|
||||||
<tr transition:fade class={index % 2 === 0 ? "even" : "odd"}>
|
<tr
|
||||||
|
transition:fade
|
||||||
|
class:even={index % 2 === 0}
|
||||||
|
class:odd={index % 2 === 1}
|
||||||
|
>
|
||||||
<td colspan="2">{resourceName}</td>
|
<td colspan="2">{resourceName}</td>
|
||||||
<td>{resource.amount}</td>
|
<td>{resource.amount}</td>
|
||||||
<td>{Math.round(100 * (resource.change + Number.EPSILON)) / 100}/s</td>
|
<td>{Math.round(100 * (resource.change + Number.EPSILON)) / 100}/s</td>
|
||||||
|
|
Reference in a new issue