Light cleanup

This commit is contained in:
Tobias Berger 2021-09-29 17:40:25 +02:00
parent c4d561ab50
commit a385305127
4 changed files with 15 additions and 20 deletions

View file

@ -1,8 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Welcome to a shark. I hope you enjoy this aquatic organism. -->
<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 property="og:title" itemprop="name" content="Shark Game" />
@ -51,7 +51,7 @@
/>
<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>
<body>
<noscript>

View file

@ -52,12 +52,9 @@
{#each Object.entries(otherHeaderButtons) as [name, onClick]}
<li>
{#if name === "discord"}
<a href={discordLink} target="_blank">{name}</a>
<a href={discordLink} rel="noopener" target="_blank">{name}</a>
{:else}
<a
on:click={name === "discord" ? undefined : onClick}
href={name === "discord" ? discordLink : "javascript:;"}>{name}</a
>
<a on:click={onClick} href={"javascript:;"}>{name}</a>
{/if}
</li>
{/each}
@ -80,6 +77,8 @@
pointer-events: none;
border-bottom: 1px solid var(--color-darker);
> span {
font-weight: bold;
}

View file

@ -38,16 +38,6 @@
addMessage("message" + $messages.length);
}}>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
on:click={() => {
addMessage("warn" + $messages.length, MessageType.warning);
@ -59,12 +49,14 @@
}}>Add Error</button
>
<button on:click={resetMessages}>Clear log</button>
<ol>
<ol id="message-log">
{#each displayMessages as message, i (message)}
{#if i < logLength}
<li
transition:slide={{ easing: expoOut }}
class={(message.isEven ? "even" : "odd") + " " + message.type}
class:even={message.isEven}
class:odd={!message.isEven}
class={message.type}
>
{message}
</li>

View file

@ -16,7 +16,11 @@
</tr>
{#if !collapsed}
{#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>{resource.amount}</td>
<td>{Math.round(100 * (resource.change + Number.EPSILON)) / 100}/s</td>