Skip to content

Commit 6961115

Browse files
Merge pull request #1 from AyushSinha2603/v2
V2
2 parents dd43a6c + c5bf840 commit 6961115

6 files changed

Lines changed: 70 additions & 72 deletions

File tree

js/App.vue

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
'is-download-complete': isDownloadComplete,
77
}"
88
>
9-
<div class="text-center">
10-
<h1 class="text-6xl md:text-8xl mb-4">
11-
<a href="/">Rosen Score</a>
9+
<div class="text-center font-black">
10+
<h1 class="text-6xl md:text-8xl mb-4 uppercase bg-yellow-300 inline-block px-8 py-4 border-8 border-black shadow-[16px_16px_0px_0px_rgba(0,0,0,1)] -rotate-2">
11+
<a href="/" class="hover:text-pink-500 transition-colors">Rosen Score</a>
1212
</h1>
13-
<p class="md:text-2xl">How many of these chess accomplishments have you completed?</p>
13+
<p class="md:text-2xl mt-8 bg-black text-white inline-block px-4 py-2 border-4 border-black font-bold">How many of these chess accomplishments have you completed?</p>
1414
</div>
1515

1616
<div
17-
class="my-8 bg-indigo-100 border border-indigo-200 drop-shadow-2xl mx-auto p-4 rounded-lg shadow-indigo-500/50 shadow-lg text-sky-600 md:w-1/2"
17+
class="my-12 bg-blue-400 border-8 border-black mx-auto p-6 md:p-10 shadow-[16px_16px_0px_0px_rgba(0,0,0,1)] text-black font-bold md:w-3/4"
1818
v-if="!isDownloading && !isDownloadComplete"
1919
>
2020
<form @submit.prevent="startDownload">
@@ -24,19 +24,19 @@
2424
<ArrowIcon />
2525
</div>
2626
<div class="basis-3/4">
27-
<div>
27+
<div class="text-xl">
2828
Select which site:
2929

30-
<div class="text-sky-900">
31-
<label class="cursor-pointer">
30+
<div class="text-black mt-2 font-black text-2xl flex gap-4 flex-wrap">
31+
<label class="cursor-pointer bg-white px-4 py-2 border-4 border-black hover:bg-yellow-300">
3232
<input type="radio" name="site" value="lichess" v-model="inputs.type" />
3333
Lichess
3434
</label>
35-
<label class="cursor-pointer ml-4">
35+
<label class="cursor-pointer bg-white px-4 py-2 border-4 border-black hover:bg-yellow-300 ml-0 md:ml-4">
3636
<input type="radio" name="site" value="chesscom" v-model="inputs.type" />
3737
Chess.com
3838
</label>
39-
<label class="cursor-pointer ml-4">
39+
<label class="cursor-pointer bg-white px-4 py-2 border-4 border-black hover:bg-yellow-300 ml-0 md:ml-4">
4040
<input type="radio" name="site" value="both" v-model="inputs.type" />
4141
Both
4242
</label>
@@ -47,30 +47,30 @@
4747

4848
<input
4949
type="text"
50-
class="block w-full px-3 py-1.5 text-base font-normal text-gray-700 bg-white bg-clip-padding border border-solid border-gray-300 rounded transition ease-in-out m-0 focus:text-gray-700 focus:bg-white focus:border-blue-600 focus:outline-none"
50+
class="block w-full px-6 py-4 text-xl font-black text-black bg-white border-8 border-black focus:bg-pink-300 focus:outline-none placeholder-gray-500 mt-4 rounded-none shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]"
5151
:placeholder="inputs.type === 'both' ? 'Lichess username here' : 'Username here'"
5252
spellcheck="false"
5353
data-lpignore="true"
5454
v-model="inputs.value"
5555
/>
56-
<div class="mt-4" v-if="inputs.type === 'both'">
56+
<div class="mt-8" v-if="inputs.type === 'both'">
5757
Enter Chess.com username:
5858
<input
5959
type="text"
60-
class="block w-full px-3 py-1.5 text-base font-normal text-gray-700 bg-white bg-clip-padding border border-solid border-gray-300 rounded transition ease-in-out m-0 focus:text-gray-700 focus:bg-white focus:border-blue-600 focus:outline-none"
60+
class="block w-full px-6 py-4 text-xl font-black text-black bg-white border-8 border-black focus:bg-pink-300 focus:outline-none placeholder-gray-500 mt-4 rounded-none shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]"
6161
placeholder="Chess.com Username here"
6262
spellcheck="false"
6363
data-lpignore="true"
6464
v-model="inputs.valueChesscom"
6565
/>
6666
</div>
67-
<div class="text-sm">
67+
<div class="text-lg mt-6 bg-white border-4 border-black p-4 shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] inline-block">
6868
Or
69-
<span class="dotted-underline text-sky-900 cursor-pointer" @click.prevent="formFill('lichess', 'EricRosen')">
69+
<span class="bg-yellow-300 border-b-4 border-black text-black font-black hover:bg-black hover:text-white cursor-pointer px-1 transition-colors" @click.prevent="formFill('lichess', 'EricRosen')">
7070
click here to see EricRosen's on Lichess
7171
</span>
7272
or
73-
<span class="dotted-underline text-sky-900 cursor-pointer" @click.prevent="formFill('chesscom', 'IMRosen')"> his Chess.com </span>
73+
<span class="bg-yellow-300 border-b-4 border-black text-black font-black hover:bg-black hover:text-white cursor-pointer px-1 transition-colors" @click.prevent="formFill('chesscom', 'IMRosen')"> his Chess.com </span>
7474
</div>
7575
</div>
7676
</div>
@@ -92,11 +92,11 @@
9292
<ArrowIcon />
9393
</div>
9494
<div class="basis-3/4">
95-
<div class="text-sm mt-1 mb-2">
95+
<div class="text-xl font-bold mt-1 mb-8 bg-white border-4 border-black p-4 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)] inline-block">
9696
Check games since
9797
<select
9898
v-model.number="inputs.filters.sinceHoursAgo"
99-
class="bg-transparent border-b border-dotted border-sky-900 focus:outline-0 hover:border-dashed text-sky-900 md:w-28"
99+
class="bg-pink-300 border-4 border-black font-black focus:outline-none text-black py-2 px-4 ml-2 cursor-pointer rounded-none hover:bg-pink-400 transition-colors"
100100
>
101101
<option :value="6">6 hours ago</option>
102102
<option :value="24">24 hours ago</option>
@@ -111,13 +111,13 @@
111111

112112
<button
113113
type="submit"
114-
class="px-6 py-2.5 bg-green-500 text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-green-600 hover:shadow-lg focus:bg-green-600 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-green-700 active:shadow-lg transition duration-150 ease-in-out"
114+
class="px-8 py-6 bg-green-400 text-black font-black text-2xl uppercase border-8 border-black shadow-[12px_12px_0px_0px_rgba(0,0,0,1)] hover:translate-x-[4px] hover:translate-y-[4px] hover:shadow-[8px_8px_0px_0px_rgba(0,0,0,1)] hover:bg-green-300 active:translate-x-[12px] active:translate-y-[12px] active:shadow-none transition-all w-full md:w-auto flex items-center justify-center gap-4 rounded-none"
115115
>
116-
<svg xmlns="http://www.w3.org/2000/svg" class="inline h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
116+
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8" fill="none" viewBox="0 0 24 24" stroke="currentColor">
117117
<path
118118
stroke-linecap="round"
119119
stroke-linejoin="round"
120-
stroke-width="2"
120+
stroke-width="4"
121121
d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
122122
/>
123123
</svg>
@@ -152,14 +152,14 @@
152152
@cancel-download="cancelDownload"
153153
></download-progress>
154154

155-
<div v-if="errors.api.message" class="text-center bg-orange-800 p-3">
155+
<div v-if="errors.api.message" class="text-center bg-red-500 border-8 border-black text-white font-black text-xl p-8 shadow-[16px_16px_0px_0px_rgba(0,0,0,1)] mt-12 uppercase">
156156
There was an error from the {{ inputs.type === 'lichess' ? 'Lichess' : 'Chess.com' }} API:
157-
<strong>{{ errors.api }}</strong>
157+
<strong class="bg-black text-white px-2 py-1 ml-2">{{ errors.api }}</strong>
158158

159-
<p>Try only running 1 Rosen Score report at a time. You may have to wait before trying again.</p>
159+
<p class="mt-4 text-black bg-yellow-300 border-4 border-black p-4 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)] inline-block">Try only running 1 Rosen Score report at a time. You may have to wait before trying again.</p>
160160
</div>
161161

162-
<div v-if="player.username" class="mt-8 bg-sky-800 p-4 text-center rounded-lg">
162+
<div v-if="player.username" class="mt-16 bg-pink-400 p-10 text-center border-8 border-black shadow-[16px_16px_0px_0px_rgba(0,0,0,1)] mb-12 font-black text-black">
163163
<h2 class="text-2xl">
164164
<username-formatter :title="player.title" :username="player.username"></username-formatter>
165165
has
@@ -181,9 +181,9 @@
181181

182182
<div class="mb-1" v-if="sinceDateFormatted">since {{ sinceDateFormatted }}</div>
183183

184-
<trophy-collection :count="trophyCount" size="large"></trophy-collection>
184+
<trophy-collection :count="trophyCount" size="large" class="mt-8 mb-8"></trophy-collection>
185185

186-
<div class="text-sm mt-2">
186+
<div class="text-xl mt-8 font-black bg-white border-4 border-black p-4 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)] inline-block">
187187
<strong>{{ counts.totalMoves.toLocaleString() }}</strong>
188188
positions and
189189
<strong>{{ counts.downloaded.toLocaleString() }}</strong>

js/components/AccomplishmentScore.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<template>
22
<div
3-
class="px-3 py-2 rounded text-center"
3+
class="px-4 py-3 text-center border-4 border-black font-bold rounded-none transition-all shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]"
44
:class="{
5-
'bg-green-600': hasTrophies,
6-
'bg-yellow-300 text-yellow-800 accomplishment-does-not-have-games': !hasTrophies,
5+
'bg-cyan-300 text-black hover:bg-cyan-400 hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[4px_4px_0px_0px_rgba(0,0,0,1)]': hasTrophies,
6+
'bg-gray-100 text-gray-500 hover:bg-gray-200 accomplishment-does-not-have-games': !hasTrophies,
77
}"
88
>
99
<span @click.prevent="isExpanded = !isExpanded" class="hover:underline cursor-pointer">{{ title }}</span>
@@ -15,10 +15,10 @@
1515
<template v-if="isExpanded">
1616
<div
1717
v-if="hasExpandableContent"
18-
class="rounded p-2"
18+
class="p-4 mt-4 text-sm font-bold border-4 border-black text-left rounded-none shadow-[4px_4px_0px_0px_rgba(0,0,0,1)]"
1919
:class="{
20-
'bg-green-700': hasTrophies,
21-
'bg-yellow-200': !hasTrophies,
20+
'bg-white text-black': hasTrophies,
21+
'bg-gray-50 text-gray-600': !hasTrophies,
2222
}"
2323
>
2424
{{ desc }}
@@ -44,7 +44,7 @@
4444
</div>
4545

4646
<template v-if="hasTrophies">
47-
<h4 class="font-bold">
47+
<h4 class="font-black text-2xl mt-6 text-black uppercase bg-yellow-300 border-4 border-black inline-block px-4 py-2 shadow-[4px_4px_0px_0px_rgba(0,0,0,1)]">
4848
{{ trophyCount }}
4949
<template v-if="trophyCount === 1"> {{ units[0] }} </template>
5050
<template v-else> {{ units[1] }} </template>

js/components/DownloadProgress.vue

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
2-
<div class="my-8 bg-orange-400 drop-shadow-2xl p-4 rounded-lg text-orange-800 mx-auto">
2+
<div class="my-8 bg-purple-400 border-8 border-black shadow-[16px_16px_0px_0px_rgba(0,0,0,1)] p-8 text-black font-black mx-auto rounded-none transition-all">
33
<div class="text-lg font-medium text-center">
44
Downloading and analyzing
55
{{ title }}&rsquo;s games
66
</div>
77

88
<template v-if="hideProgressBar">
9-
<svg class="animate-spin my-2 mx-auto h-10 w-10 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
9+
<svg class="animate-spin my-4 mx-auto h-16 w-16 text-black" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
1010
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
1111
<path
1212
class="opacity-75"
@@ -16,40 +16,40 @@
1616
</svg>
1717
</template>
1818
<template v-else>
19-
<div class="w-full my-2 h-6 bg-orange-200">
20-
<div class="h-6 bg-orange-800" :style="`width: ${percentDownloaded}%`"></div>
19+
<div class="w-full my-6 h-8 bg-white border-4 border-black overflow-hidden rounded-none shadow-[8px_8px_0px_0px_rgba(0,0,0,1)] relative">
20+
<div class="h-8 bg-green-400 border-r-4 border-black transition-all duration-300 relative z-10" :style="`width: ${percentDownloaded}%`"></div>
2121
</div>
2222

2323
<div class="flex flex-row">
2424
<div class="basis-1/4 text-center">
25-
<h4 class="text-xl md:text-4xl">
25+
<h4 class="text-2xl md:text-5xl text-black bg-white border-4 border-black px-2 py-1 shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] inline-block">
2626
{{ positions.toLocaleString() }}
2727
</h4>
28-
Positions Analyzed
28+
<span class="text-sm font-black uppercase text-white bg-black mt-4 block p-1 border-2 border-black">Positions Analyzed</span>
2929
</div>
3030
<div class="basis-1/4 text-center">
31-
<h4 class="text-xl md:text-4xl">
31+
<h4 class="text-2xl md:text-5xl text-black bg-white border-4 border-black px-2 py-1 shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] inline-block">
3232
{{ downloaded.toLocaleString() }}
3333
</h4>
34-
Games Analyzed
34+
<span class="text-sm font-black uppercase text-white bg-black mt-4 block p-1 border-2 border-black">Games Analyzed</span>
3535
</div>
3636
<div class="basis-1/4 text-center">
37-
<h4 class="text-xl md:text-4xl">
37+
<h4 class="text-2xl md:text-5xl text-black bg-white border-4 border-black px-2 py-1 shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] inline-block">
3838
{{ total.toLocaleString() }}
3939
</h4>
40-
Total Games
40+
<span class="text-sm font-black uppercase text-white bg-black mt-4 block p-1 border-2 border-black">Total Games</span>
4141
</div>
4242
<div class="basis-1/4 text-center">
43-
<h4 class="text-xl md:text-4xl">{{ percentDownloadedDisplay }}%</h4>
44-
Complete
43+
<h4 class="text-2xl md:text-5xl text-black bg-yellow-300 border-4 border-black px-2 py-1 shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] inline-block">{{ percentDownloadedDisplay }}%</h4>
44+
<span class="text-sm font-black uppercase text-white bg-black mt-4 block p-1 border-2 border-black">Complete</span>
4545
</div>
4646
</div>
4747

4848
<div class="text-center mt-4">
4949
<button
5050
@click="cancelDownload"
5151
type="button"
52-
class="px-6 py-2.5 bg-red-600 text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-red-700 hover:shadow-lg focus:bg-red-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-red-800 active:shadow-lg transition duration-150 ease-in-out"
52+
class="px-8 py-4 mt-8 bg-red-500 text-white font-black text-xl uppercase border-8 border-black shadow-[8px_8px_0px_0px_rgba(0,0,0,1)] hover:translate-x-[4px] hover:translate-y-[4px] hover:shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] hover:bg-red-400 active:translate-x-[8px] active:translate-y-[8px] active:shadow-none transition-all rounded-none"
5353
>
5454
<svg xmlns="http://www.w3.org/2000/svg" class="inline h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
5555
<path

js/components/LichessLogin.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
</svg>
1212
Logged in as
1313
<strong>{{ username }}</strong>
14-
<span class="dotted-underline text-xs text-sky-900 cursor-pointer" @click.prevent="logout"> (Logout) </span>
14+
<span class="bg-yellow-300 border-b-4 border-black text-black font-black hover:bg-black hover:text-white cursor-pointer px-1 ml-2 transition-colors" @click.prevent="logout"> Logout </span>
1515
</div>
1616
</template>
1717
<template v-else>
1818
<span class="uppercase text-xs">Optional:</span>
1919

2020
<button
2121
type="button"
22-
class="block px-4 py-2 bg-slate-400 text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-slate-500 hover:shadow-lg focus:bg-slate-500 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-slate-600 active:shadow-lg transition duration-150 ease-in-out"
22+
class="block px-8 py-4 mt-2 bg-blue-500 border-4 border-black text-white font-black text-xl uppercase shadow-[8px_8px_0px_0px_rgba(0,0,0,1)] hover:translate-x-[4px] hover:translate-y-[4px] hover:shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] hover:bg-blue-400 active:translate-x-[8px] active:translate-y-[8px] active:shadow-none transition-all rounded-none w-full md:w-auto"
2323
@click="login"
2424
>
2525
<svg xmlns="http://www.w3.org/2000/svg" class="inline h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
@@ -38,7 +38,7 @@
3838
<strong>3x</strong> faster when downloading your own games, <strong>1.5x</strong> faster for all others
3939
<br />
4040
You can learn more about this
41-
<a href="https://lichess.org/api#operation/apiGamesUser" target="_blank" class="text-sky-900 dotted-underline">here</a>
41+
<a href="https://lichess.org/api#operation/apiGamesUser" target="_blank" class="bg-yellow-300 border-b-4 border-black text-black font-black hover:bg-black hover:text-white px-1 transition-colors">here</a>
4242
</p>
4343
</template>
4444
</div>

js/components/RecentUpdates.vue

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<template>
2-
<div class="border-t border-gray-300 mt-4 text-bold font-bold pt-2">Recent Updates</div>
3-
<ul class="text-sm">
4-
<li>
5-
<changelog-date :year="2024" :month="11" :day="13"></changelog-date>
6-
- Added <strong>Mona Lisa Checkmate</strong> trophy
7-
<br />
8-
&nbsp; Credit to
9-
<span class="dotted-underline text-sky-900 cursor-pointer" @click.prevent="formFill('chesscom', 'KNVB')">GM Aman Hambleton</span>
10-
from Chessbrah. <a href="https://youtu.be/XAlcDWQ6iTM?t=387" class="dotted-underline text-sky-900" target="_blank">See video here</a>
11-
</li>
12-
</ul>
2+
<div class="border-t-8 border-black mt-12 pt-4 text-black font-black text-2xl bg-pink-300 p-6 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]">Recent Updates
3+
<ul class="text-lg text-black mt-4 font-bold border-t-4 border-black pt-4">
4+
<li>
5+
<changelog-date :year="2024" :month="11" :day="13"></changelog-date>
6+
- Added <strong class="bg-yellow-300 px-1 border-2 border-black">Mona Lisa Checkmate</strong> trophy
7+
<br />
8+
&nbsp; Credit to
9+
<span class="bg-white border-b-4 border-black hover:bg-black hover:text-white px-1 cursor-pointer transition-colors" @click.prevent="formFill('chesscom', 'KNVB')">GM Aman Hambleton</span>
10+
from Chessbrah. <a href="https://youtu.be/XAlcDWQ6iTM?t=387" class="bg-white border-b-4 border-black hover:bg-black hover:text-white px-1 transition-colors" target="_blank">See video here</a>
11+
</li>
12+
</ul>
13+
</div>
1314
</template>
1415

1516
<script lang="ts">

styles/index.css

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
}
88

99
html {
10-
@apply bg-sky-700 text-white;
10+
@apply bg-white text-black;
11+
}
12+
13+
body {
14+
@apply min-h-screen selection:bg-pink-500 selection:text-white font-mono;
1115
}
1216

1317
h1 {
@@ -23,20 +27,13 @@ h1 {
2327
}
2428

2529
.heading {
26-
@apply bg-sky-900
27-
text-center
28-
text-sm
29-
uppercase
30-
text-slate-100
31-
mb-1
32-
mt-2;
30+
@apply bg-black text-white text-center text-xl uppercase font-black border-4 border-black mb-4 mt-6 py-2 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)];
3331
}
3432

3533
.is-download-complete .accomplishment-does-not-have-games {
36-
@apply bg-slate-400
37-
text-white;
34+
@apply bg-gray-200 text-gray-500 border-4 border-gray-400 opacity-60;
3835
}
3936

4037
.is-download-complete .accomplishment-does-not-have-games div {
41-
@apply bg-[#7c8ca3];
38+
@apply bg-gray-300;
4239
}

0 commit comments

Comments
 (0)