Skip to content

Commit 6f1291d

Browse files
authored
ft: egg/hatchling jump links (#102)
1 parent 4328a3f commit 6f1291d

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

pages/index.vue

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,7 @@
100100
</p>
101101
</div>
102102
</div>
103-
<p>Hidden dragons are not shown and will be regularly removed.</p>
104-
<p class="text-sm">
105-
Your dragons have received
106-
<b class="font-bold">{{
107-
Intl.NumberFormat().format(scroll.details.clicksToday)
108-
}}</b>
109-
clicks in the last 24 hours from other gardeners.
110-
</p>
111-
<div class="text-sm">
103+
<div class="text-sm space-y-1">
112104
<p v-if="eggClosestToHatching">
113105
<template v-if="eggClosestToHatching.hoursleft <= 96">
114106
Next egg can hatch now.
@@ -118,6 +110,7 @@
118110
{{ eggClosestToHatching.hoursleft - 96 }}
119111
{{ pluralise('hour', eggClosestToHatching.hoursleft - 96) }}.
120112
</template>
113+
<NuxtLink to="#eggs" class="underline">[Jump]</NuxtLink>
121114
</p>
122115
<p v-if="hatchlingClosestToGrowing">
123116
<template v-if="hatchlingClosestToGrowing.hoursleft <= 96">
@@ -129,8 +122,19 @@
129122
{{
130123
pluralise('hour', hatchlingClosestToGrowing.hoursleft - 96)
131124
}}.
125+
<NuxtLink to="#hatchlings" class="underline">[Jump]</NuxtLink>
132126
</template>
133127
</p>
128+
<p class="text-xs">
129+
Hidden dragons are not shown and will be regularly removed.
130+
</p>
131+
<aside class="text-xs">
132+
Your dragons have received
133+
<b class="font-bold">{{
134+
Intl.NumberFormat().format(scroll.details.clicksToday)
135+
}}</b>
136+
clicks in the last 24 hours from other gardeners.
137+
</aside>
134138
</div>
135139
</template>
136140
</div>
@@ -146,7 +150,7 @@
146150
'order-3': userSettings.sectionOrder === 'eggs,hatchlings',
147151
}"
148152
>
149-
<legend class="text-sm font-bold">Hatchlings</legend>
153+
<legend id="hatchlings" class="text-sm font-bold">Hatchlings</legend>
150154
<div
151155
class="grid gap-6 pr-2"
152156
:style="{
@@ -178,7 +182,7 @@
178182
'order-2': userSettings.sectionOrder === 'eggs,hatchlings',
179183
}"
180184
>
181-
<legend class="text-sm font-bold">Eggs</legend>
185+
<legend id="eggs" class="text-sm font-bold">Eggs</legend>
182186
<div
183187
class="grid gap-6 pr-2"
184188
:style="{
@@ -220,15 +224,27 @@
220224
#default="{ hiddenColumns }"
221225
>
222226
<ScrollTableTbody
227+
id="hatchlings"
223228
:dragons="hatchlings"
224229
header="Hatchlings"
225230
:hidden-columns
226231
/>
227-
<ScrollTableTbody :dragons="eggs" header="Eggs" :hidden-columns />
232+
<ScrollTableTbody
233+
id="eggs"
234+
:dragons="eggs"
235+
header="Eggs"
236+
:hidden-columns
237+
/>
228238
</template>
229239
<template v-else #default="{ hiddenColumns }">
230-
<ScrollTableTbody :dragons="eggs" header="Eggs" :hidden-columns />
231240
<ScrollTableTbody
241+
id="eggs"
242+
:dragons="eggs"
243+
header="Eggs"
244+
:hidden-columns
245+
/>
246+
<ScrollTableTbody
247+
id="hatchlings"
232248
:dragons="hatchlings"
233249
header="Hatchlings"
234250
:hidden-columns

0 commit comments

Comments
 (0)