minify
This commit is contained in:
parent
04e0155e04
commit
041a8167ea
6 changed files with 3247 additions and 46 deletions
9
Makefile
9
Makefile
|
@ -1,6 +1,6 @@
|
|||
.PHONY: build serve clean scp
|
||||
|
||||
build: chess.js main.js Makefile
|
||||
build: chess.min.js main.min.js gchessboard.min.js Makefile
|
||||
|
||||
serve: build
|
||||
python -m http.server
|
||||
|
@ -12,11 +12,16 @@ upload: build
|
|||
full-upload: build
|
||||
scp * root@pyrope.net:/var/www/mysite/elo-worldle/
|
||||
|
||||
# https://unix.stackexchange.com/questions/153862/remove-all-files-directories-except-for-one-file
|
||||
clean:
|
||||
rm *.js
|
||||
find . -name "*.js" ! -name "gchessboard*" -exec rm {} +
|
||||
|
||||
# main.js: main.ts
|
||||
# tsc main.ts
|
||||
|
||||
%.min.js: %.js
|
||||
npx uglify-js $< | sed s/chess\.js/chess.min.js/g > $@
|
||||
|
||||
%.js: %.ts tsconfig.json
|
||||
tsc
|
||||
|
||||
|
|
1
chess.min.js
vendored
Normal file
1
chess.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3120
gchessboard.js
Normal file
3120
gchessboard.js
Normal file
File diff suppressed because one or more lines are too long
1
gchessboard.min.js
vendored
Normal file
1
gchessboard.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
156
index.html
156
index.html
|
@ -2,21 +2,34 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Elo Worldle</title>
|
||||
<script>var exports = {};</script>
|
||||
<script>
|
||||
var exports = {};
|
||||
</script>
|
||||
<!-- <script defer src="chess.js"></script> -->
|
||||
<script type="module" src="main.js"></script>
|
||||
<script type="module" src="https://unpkg.com/gchessboard"></script>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!-- You can still access the unminified files! Just go to,
|
||||
e.g, https://elo-worldle.pyrope.net/main.js -->
|
||||
<script type="module" src="main.min.js"></script>
|
||||
<script type="module" src="gchessboard.min.js"></script>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta content="Elo Worldle" property="og:title" />
|
||||
<meta content="A game where you guess what bad chess algorithm you are playing against." property="og:description" />
|
||||
<meta content="https://elo-worldle.pyrope.net/" property="og:url" />
|
||||
<meta content="https://elo-worldle.pyrope.net/favicon.png" property="og:image" />
|
||||
<meta
|
||||
content="A game where you guess what bad chess algorithm you are playing against."
|
||||
property="og:description"
|
||||
/>
|
||||
<meta content="https://elo-worldle.pyrope.net/" property="og:url" />
|
||||
<meta
|
||||
content="https://elo-worldle.pyrope.net/favicon.png"
|
||||
property="og:image"
|
||||
/>
|
||||
<meta content="#538d4e" data-react-helmet="true" name="theme-color" />
|
||||
|
||||
<meta name="description" content="A Wordle-like game where you guess what bad chess algorithm you are playing against." />
|
||||
<meta
|
||||
name="description"
|
||||
content="A Wordle-like game where you guess what bad chess algorithm you are playing against."
|
||||
/>
|
||||
|
||||
<link rel="stylesheet" href="./main.css"></link>
|
||||
<!-- <link rel="stylesheet" href="./main.css"></link> -->
|
||||
<style>
|
||||
html {
|
||||
background-color: #002121;
|
||||
|
@ -27,16 +40,21 @@
|
|||
#board {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: calc(min(90vw, 90vh));
|
||||
width: calc(min(90vw, 90vh));
|
||||
height: calc(min(90vw, 90vh));
|
||||
}
|
||||
#game-over, #stats, #copy-stats, #play-again, #win-count {
|
||||
#game-over,
|
||||
#stats,
|
||||
#copy-stats,
|
||||
#play-again,
|
||||
#win-count {
|
||||
display: none;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#game-over, #win-count {
|
||||
#game-over,
|
||||
#win-count {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -49,7 +67,8 @@
|
|||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#copy-stats, #play-again {
|
||||
#copy-stats,
|
||||
#play-again {
|
||||
color: black;
|
||||
}
|
||||
|
||||
|
@ -60,12 +79,13 @@
|
|||
}
|
||||
|
||||
:host {
|
||||
--square-color-dark: #86A666;
|
||||
--square-color-light: #FFFFDD;
|
||||
--square-color-dark: #86a666;
|
||||
--square-color-light: #ffffdd;
|
||||
}
|
||||
|
||||
h1, pre {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
h1,
|
||||
pre {
|
||||
font-family: "Courier New", Courier, monospace;
|
||||
}
|
||||
|
||||
h1 {
|
||||
|
@ -73,10 +93,11 @@
|
|||
}
|
||||
|
||||
p {
|
||||
font-family: 'Times New Roman', Times, serif;
|
||||
font-family: "Times New Roman", Times, serif;
|
||||
}
|
||||
|
||||
#players, .player {
|
||||
#players,
|
||||
.player {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: center;
|
||||
|
@ -114,51 +135,98 @@
|
|||
color: white;
|
||||
}
|
||||
|
||||
g-chess-board::part(piece-wb) { background-image: url("./piece-wb.png"); image-rendering: pixelated; }
|
||||
g-chess-board::part(piece-wr) { background-image: url("./piece-wr.png"); image-rendering: pixelated; }
|
||||
g-chess-board::part(piece-wp) { background-image: url("./piece-wp.png"); image-rendering: pixelated; }
|
||||
g-chess-board::part(piece-wn) { background-image: url("./piece-wn.png"); image-rendering: pixelated; }
|
||||
g-chess-board::part(piece-wk) { background-image: url("./piece-wk.png"); image-rendering: pixelated; }
|
||||
g-chess-board::part(piece-wq) { background-image: url("./piece-wq.png"); image-rendering: pixelated; }
|
||||
g-chess-board::part(piece-wb) {
|
||||
background-image: url("./piece-wb.png");
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
g-chess-board::part(piece-wr) {
|
||||
background-image: url("./piece-wr.png");
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
g-chess-board::part(piece-wp) {
|
||||
background-image: url("./piece-wp.png");
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
g-chess-board::part(piece-wn) {
|
||||
background-image: url("./piece-wn.png");
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
g-chess-board::part(piece-wk) {
|
||||
background-image: url("./piece-wk.png");
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
g-chess-board::part(piece-wq) {
|
||||
background-image: url("./piece-wq.png");
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
||||
g-chess-board::part(piece-bb) { background-image: url("./piece-bb.png"); image-rendering: pixelated; }
|
||||
g-chess-board::part(piece-br) { background-image: url("./piece-br.png"); image-rendering: pixelated; }
|
||||
g-chess-board::part(piece-bp) { background-image: url("./piece-bp.png"); image-rendering: pixelated; }
|
||||
g-chess-board::part(piece-bn) { background-image: url("./piece-bn.png"); image-rendering: pixelated; }
|
||||
g-chess-board::part(piece-bk) { background-image: url("./piece-bk.png"); image-rendering: pixelated; }
|
||||
g-chess-board::part(piece-bq) { background-image: url("./piece-bq.png"); image-rendering: pixelated; }
|
||||
g-chess-board::part(piece-bb) {
|
||||
background-image: url("./piece-bb.png");
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
g-chess-board::part(piece-br) {
|
||||
background-image: url("./piece-br.png");
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
g-chess-board::part(piece-bp) {
|
||||
background-image: url("./piece-bp.png");
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
g-chess-board::part(piece-bn) {
|
||||
background-image: url("./piece-bn.png");
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
g-chess-board::part(piece-bk) {
|
||||
background-image: url("./piece-bk.png");
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
g-chess-board::part(piece-bq) {
|
||||
background-image: url("./piece-bq.png");
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<g-chess-board
|
||||
id="board" fen="start" interactive turn="white"
|
||||
id="board"
|
||||
fen="start"
|
||||
interactive
|
||||
turn="white"
|
||||
></g-chess-board>
|
||||
<button style="display: none" id="finish">show me the answer please i toootally guessed already</button>
|
||||
<button style="display: none" id="finish">
|
||||
show me the answer please i toootally guessed already
|
||||
</button>
|
||||
<h1 id="game-over"></h1>
|
||||
<button title="or press `r`" id="play-again">> play again <</button>
|
||||
<button title="or press `r`" id="play-again">
|
||||
> play again <
|
||||
</button>
|
||||
<pre id="stats"></pre>
|
||||
<button title="or press `c`" id="copy-stats">^ copy ^</button>
|
||||
<br>
|
||||
<br />
|
||||
<h1>Players: (click name to toggle strikethrough)</h1>
|
||||
<div id="players">
|
||||
</div>
|
||||
<div id="players"></div>
|
||||
<footer>
|
||||
<a href="https://www.youtube.com/watch?v=DpXy041BIlA">Tutorial</a><br>
|
||||
<a href="http://tom7.org/chess">Piece sprites, board colors, algorithms, etc.</a>
|
||||
<a href="https://www.youtube.com/watch?v=DpXy041BIlA">Tutorial</a
|
||||
><br />
|
||||
<a href="http://tom7.org/chess"
|
||||
>Piece sprites, board colors, algorithms, etc.</a
|
||||
>
|
||||
&
|
||||
<a href="https://sourceforge.net/p/tom7misc/svn/HEAD/tree/trunk/chess/">Original implementations</a>
|
||||
<a
|
||||
href="https://sourceforge.net/p/tom7misc/svn/HEAD/tree/trunk/chess/"
|
||||
>Original implementations</a
|
||||
>
|
||||
&
|
||||
<a href="http://tom7.org/chess/weak.pdf">Original paper</a>
|
||||
by
|
||||
<a href="http://tom7.org">tom7</a>
|
||||
<br>
|
||||
<br />
|
||||
<a href="https://git.pyrope.net/mbk/elo-worldle">Code</a>
|
||||
&
|
||||
<a href="https://elo-worldle.pyrope.net/paper.pdf">Paper</a>
|
||||
by
|
||||
<a href="https://pl.pyrope.net/terezi">me</a>
|
||||
<div id="win-count"></div>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
<div id="win-count"></div>
|
||||
</html>
|
||||
|
|
6
main.min.js
vendored
Normal file
6
main.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue