mirror of
https://github.com/danbulant/heaventaker
synced 2026-05-23 06:18:48 +00:00
slight refactor
This commit is contained in:
parent
8206cf1b5d
commit
a8216e80ac
4 changed files with 42 additions and 33 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rollup -c",
|
"build": "rollup -c",
|
||||||
"dev": "rollup -c -w",
|
"dev": "rollup -w -c",
|
||||||
"start": "sirv public --no-clear"
|
"start": "sirv public --no-clear"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ const production = !process.env.ROLLUP_WATCH;
|
||||||
// List of folders from images/png to convert to webp and save into public/images
|
// List of folders from images/png to convert to webp and save into public/images
|
||||||
const imageFolders = ["angels", "backgrounds", "button", "death", "levels"];
|
const imageFolders = ["angels", "backgrounds", "button", "death", "levels"];
|
||||||
|
|
||||||
|
console.log(production ? "PROD MODE" : "DEV MODE");
|
||||||
|
|
||||||
function serve() {
|
function serve() {
|
||||||
let server;
|
let server;
|
||||||
|
|
||||||
|
|
@ -21,7 +23,9 @@ function serve() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
writeBundle() {
|
writeBundle() {
|
||||||
|
console.log("wb");
|
||||||
if (server) return;
|
if (server) return;
|
||||||
|
console.log("Starting server");
|
||||||
server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev', '--host', '0.0.0.0'], {
|
server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev', '--host', '0.0.0.0'], {
|
||||||
stdio: ['ignore', 'inherit', 'inherit'],
|
stdio: ['ignore', 'inherit', 'inherit'],
|
||||||
shell: true
|
shell: true
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,10 @@
|
||||||
import { gameActive, menuActive } from "../stores/gameActive";
|
import { gameActive, menuActive } from "../stores/gameActive";
|
||||||
import { toRoman } from "../utils";
|
import { toRoman } from "../utils";
|
||||||
import Keypress from "../stores/keypress.svelte";
|
import Keypress from "../stores/keypress.svelte";
|
||||||
|
import Success from "./dialog/success.svelte";
|
||||||
|
|
||||||
export var current;
|
export var current;
|
||||||
export var page;
|
// export var page;
|
||||||
|
|
||||||
/** @type {typeof dialog[number]}*/
|
/** @type {typeof dialog[number]}*/
|
||||||
var d;
|
var d;
|
||||||
|
|
@ -200,7 +201,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if success}
|
{#if success}
|
||||||
<h2>SUCCESS</h2>
|
<Success />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
@ -250,36 +251,6 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
}
|
}
|
||||||
h2 {
|
|
||||||
position: relative;
|
|
||||||
width: 400px;
|
|
||||||
color: white;
|
|
||||||
font-size: 70px;
|
|
||||||
letter-spacing: 12px;
|
|
||||||
text-align: center;
|
|
||||||
margin: 15px auto;
|
|
||||||
text-shadow: 0 0 6px white;
|
|
||||||
animation: shadowAppear .4s ease-out;
|
|
||||||
}
|
|
||||||
h2::before, h2::after {
|
|
||||||
position: absolute;
|
|
||||||
content: "";
|
|
||||||
background: white;
|
|
||||||
box-shadow: 0 0 15px white;
|
|
||||||
border-radius: 50%;
|
|
||||||
top: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
|
||||||
h2::before {
|
|
||||||
animation: successLeft .4s, appear .2s;
|
|
||||||
animation-timing-function: ease-out;
|
|
||||||
animation-delay: .2s, 0;
|
|
||||||
}
|
|
||||||
h2::after {
|
|
||||||
animation: successRight .4s, appear .2s;
|
|
||||||
animation-timing-function: ease-out;
|
|
||||||
animation-delay: .2s, 0;
|
|
||||||
}
|
|
||||||
@keyframes shadowAppear {
|
@keyframes shadowAppear {
|
||||||
0% {
|
0% {
|
||||||
text-shadow: 0 0 20px white;
|
text-shadow: 0 0 20px white;
|
||||||
|
|
|
||||||
34
src/pages/dialog/success.svelte
Normal file
34
src/pages/dialog/success.svelte
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
|
||||||
|
<h2>SUCCESS</h2>
|
||||||
|
<style>
|
||||||
|
h2 {
|
||||||
|
position: relative;
|
||||||
|
width: 400px;
|
||||||
|
color: white;
|
||||||
|
font-size: 70px;
|
||||||
|
letter-spacing: 12px;
|
||||||
|
text-align: center;
|
||||||
|
margin: 15px auto;
|
||||||
|
text-shadow: 0 0 6px white;
|
||||||
|
animation: shadowAppear .4s ease-out;
|
||||||
|
}
|
||||||
|
h2::before, h2::after {
|
||||||
|
position: absolute;
|
||||||
|
content: "";
|
||||||
|
background: white;
|
||||||
|
box-shadow: 0 0 15px white;
|
||||||
|
border-radius: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
h2::before {
|
||||||
|
animation: successLeft .4s, appear .2s;
|
||||||
|
animation-timing-function: ease-out;
|
||||||
|
animation-delay: .2s, 0;
|
||||||
|
}
|
||||||
|
h2::after {
|
||||||
|
animation: successRight .4s, appear .2s;
|
||||||
|
animation-timing-function: ease-out;
|
||||||
|
animation-delay: .2s, 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in a new issue