Skip to content

Commit 0354e99

Browse files
authored
Merge pull request #23 from funkyFangs/more-qol-improvements
💄 improve styling, add dates to history
2 parents 00d4712 + de6d347 commit 0354e99

File tree

10 files changed

+268
-238
lines changed

10 files changed

+268
-238
lines changed

src/app.less

Lines changed: 53 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,6 @@
66
@import 'style/palette';
77
@import 'style/positioning';
88

9-
:root {
10-
/* Palette */
11-
--primary-darkest: black;
12-
--primary-darker: #17252b;
13-
--primary-dark: #25353d;
14-
--primary-medium: #2f4550;
15-
--primary-light: #3f606e;
16-
--primary-lighter: #586f7c;
17-
--font-color: #f4f4f9;
18-
--accent: #b8d8d9;
19-
20-
--error: #a84432;
21-
--info: #4a6af7;
22-
--warning: #fcc81c;
23-
--success: #38c750;
24-
25-
/* Positioning */
26-
--border-radius: 8px;
27-
--padding-length: 5px;
28-
}
29-
309
body {
3110
background-color: @indigo;
3211

@@ -68,6 +47,10 @@ tr {
6847
user-select: none;
6948
}
7049

50+
.invisible {
51+
display: none;
52+
}
53+
7154
/* ============================================================================================ *\
7255
* Buttons *
7356
\* ============================================================================================ */
@@ -85,38 +68,20 @@ button {
8568

8669
input,
8770
select,
88-
button,
89-
input:hover,
90-
select:hover,
91-
button:hover {
92-
/* Transitions */
93-
transition-property: background-color;
94-
transition-duration: @transition-duration;
95-
transition-timing-function: @transition-timing-function;
96-
}
97-
98-
input:disabled,
99-
select:disabled,
100-
button:disabled,
101-
input:active,
102-
select:active,
103-
button:active {
104-
/* Transitions */
105-
transition: none;
106-
}
107-
108-
a,
109-
a:hover {
110-
/* Transitions */
111-
transition-property: color;
112-
transition-duration: @transition-duration;
113-
transition-timing-function: @transition-timing-function;
114-
}
71+
button {
72+
&,
73+
&:hover {
74+
/* Transitions */
75+
transition-property: background-color;
76+
transition-duration: @transition-duration;
77+
transition-timing-function: @transition-timing-function;
78+
}
11579

116-
a:active,
117-
a:disabled {
118-
/* Transitions */
119-
transition: none;
80+
&:active,
81+
&:disabled {
82+
/* Transitions */
83+
transition: none;
84+
}
12085
}
12186

12287
/* ============================================================================================ *\
@@ -157,22 +122,20 @@ a {
157122

158123
/* Decoration */
159124
text-decoration: none;
160-
}
161-
162-
/* ============================================================================================ *\
163-
* Help *
164-
\* ============================================================================================ */
165125

166-
.help {
167-
/* Cursor */
168-
cursor: help;
169-
}
126+
&,
127+
&:hover {
128+
/* Transitions */
129+
transition-property: color;
130+
transition-duration: @transition-duration;
131+
transition-timing-function: @transition-timing-function;
132+
}
170133

171-
.help:hover {
172-
/* Transition */
173-
transition-property: color;
174-
transition-duration: @transition-duration;
175-
transition-timing-function: @transition-timing-function;
134+
&:active,
135+
&:disabled {
136+
/* Transitions */
137+
transition: none;
138+
}
176139
}
177140

178141
/* ============================================================================================ *\
@@ -187,21 +150,31 @@ table {
187150
border-radius: @border-radius;
188151
overflow: hidden;
189152
table-layout: fixed;
190-
}
191-
192-
thead > tr {
193-
background-color: @shark;
194-
color: contrast($background-color);
195-
}
196-
197-
tbody > tr:nth-of-type(odd) {
198-
background-color: @darkest-indigo;
199-
color: contrast($background-color);
200-
}
201153

202-
tbody > tr:nth-of-type(even) {
203-
background-color: @darker-indigo;
204-
color: contrast($background-color);
154+
> thead > tr {
155+
background-color: @shark;
156+
color: contrast($background-color);
157+
158+
> th {
159+
font-weight: bold;
160+
}
161+
}
162+
163+
> tbody {
164+
> tr > th {
165+
font-weight: bold;
166+
}
167+
168+
> tr:nth-of-type(odd) {
169+
background-color: @darkest-indigo;
170+
color: contrast($background-color);
171+
}
172+
173+
> tr:nth-of-type(even) {
174+
background-color: @darker-indigo;
175+
color: contrast($background-color);
176+
}
177+
}
205178
}
206179

207180
th,

src/lib/api/HuntTracker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export interface HuntTracker {
1515
max: number
1616
}
1717
complete: boolean
18+
startDate?: string
19+
endDate?: string
1820

1921
// Shiny Rates
2022
method: HuntingMethod
@@ -25,7 +27,7 @@ export interface HuntTracker {
2527
versionGroup?: string
2628
version: string
2729

28-
// Pokemon Details
30+
// Pokémon Details
2931
pokemonSpecies: string
3032
pokemon?: string
3133
pokemonForm?: string

src/lib/api/HuntingMethod.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -64,29 +64,6 @@ export function getSupportedHuntingMethods(
6464
return [HuntingMethod.FULL_ODDS, HuntingMethod.MASUDA_METHOD]
6565
}
6666

67-
export function getToolTip(huntingMethod: HuntingMethod) {
68-
switch (huntingMethod) {
69-
case HuntingMethod.FULL_ODDS:
70-
return 'This is the default method of shiny hunting with the default odds of finding a shiny Pokémon.'
71-
case HuntingMethod.ODD_EGG:
72-
return 'The Odd Egg in Pokémon Crystal has a 14% chance of hatching as a shiny Pokémon as opposed to the default odds.'
73-
case HuntingMethod.MASUDA_METHOD:
74-
return 'Eggs produced by two Pokémon from different regions have a significantly increased chance of being shiny.'
75-
case HuntingMethod.POKE_RADAR:
76-
return 'The Poké Radar provides an increased chance of a shiny Pokémon with consecutive encounters of the same species.'
77-
case HuntingMethod.FRIEND_SAFARI:
78-
return 'Pokémon found in the Friend Safari have an increased chance of being shiny.'
79-
case HuntingMethod.CONSECUTIVE_FISHING:
80-
return 'When fishing in the same area, reeling in the same Pokémon consecutively increases the likelihood of it being shiny.'
81-
case HuntingMethod.HIDDEN_POKEMON:
82-
return 'In Omega Ruby and Alpha Sapphire, Pokémon will partially reveal themselves in certain tiles. These Pokémon will have an increased chance of being shiny depending on their Search Level in the Pokédex.'
83-
case HuntingMethod.SOS_BATTLE:
84-
return 'In an SOS battle, the chance of an ally Pokémon being shiny increases with each consecutive ally called in.'
85-
case HuntingMethod.ULTRA_WARP_RIDE:
86-
return 'In the Ultra Warp Ride in Ultra Sun and Ultra Moon, the chance of finding a shiny Pokémon increases with the distance travelled and the rarity of the ring.'
87-
}
88-
}
89-
9067
export const CHAIN_HUNTING_METHODS = new Set([
9168
HuntingMethod.POKE_RADAR,
9269
HuntingMethod.CONSECUTIVE_FISHING,

src/lib/menu/FooterMenu.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
@import '../../style/positioning';
2525
2626
footer {
27-
position: absolute;
27+
position: fixed;
2828
width: 100%;
2929
height: @top-bar-height;
3030
bottom: 0;

src/lib/menu/HeaderMenu.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ If you wanted to display a header menu titled "My Application" with an anchor ca
6464
6565
header {
6666
/* Positioning */
67-
position: absolute;
67+
position: fixed;
6868
width: 100%;
6969
height: @top-bar-height;
7070
top: 0;

src/lib/menu/controls/ToolTip.svelte

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/lib/menu/tracker/create/SelectHuntingMethod.svelte

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script lang="ts">
2-
import { getSupportedHuntingMethods, getToolTip, HuntingMethod } from '$lib/api/HuntingMethod.js'
3-
import ToolTip from '$lib/menu/controls/ToolTip.svelte'
2+
import { getSupportedHuntingMethods, HuntingMethod } from '$lib/api/HuntingMethod.js'
43
import type { Generation } from '$lib/api/GenerationResource'
54
import type { VersionGroup } from '$lib/api/VersionGroupResource'
65
import type { Version } from '$lib/api/VersionResource'
@@ -46,12 +45,6 @@
4645
{/each}
4746
</select>
4847
{/if}
49-
50-
{#if selectedHuntingMethod}
51-
<ToolTip title={getToolTip(selectedHuntingMethod)}>
52-
<span class="info">i</span>
53-
</ToolTip>
54-
{/if}
5548
</div>
5649

5750
<style lang="less">
@@ -71,15 +64,20 @@
7164
text-align: center;
7265
background-color: @indigo;
7366
color: contrast($background-color);
74-
}
7567
76-
select:hover {
77-
background-color: lighten(@indigo, 5%);
78-
color: contrast($background-color);
79-
}
68+
&:hover {
69+
background-color: lighten(@indigo, 5%);
70+
color: contrast($background-color);
71+
}
8072
81-
select:active {
82-
background-color: lighten(@indigo, 10%);
83-
color: contrast($background-color);
73+
&:active {
74+
background-color: lighten(@indigo, 10%);
75+
color: contrast($background-color);
76+
}
77+
78+
&:disabled {
79+
background-color: desaturate(@indigo, 25%);
80+
color: contrast($background-color);
81+
}
8482
}
8583
</style>

0 commit comments

Comments
 (0)