Skip to content

Commit 303f9ab

Browse files
Add back to top button on all pages!
1 parent 1c409f4 commit 303f9ab

File tree

4 files changed

+95
-42
lines changed

4 files changed

+95
-42
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
---
3+
4+
<button id="backToTop" aria-label="Back to top">&uarr;</button>
5+
6+
<script>
7+
const btn = document.getElementById('backToTop');
8+
if (!btn) {
9+
throw new Error('Back to top button not found');
10+
}
11+
window.addEventListener('scroll', () => {
12+
btn.style.display = window.scrollY > 300 ? 'flex' : 'none';
13+
});
14+
btn.addEventListener('click', () => {
15+
window.scrollTo({ top: 0, behavior: 'smooth' });
16+
});
17+
</script>
18+
19+
<style>
20+
#backToTop {
21+
position: fixed;
22+
bottom: 1.5rem;
23+
right: 1.5rem;
24+
padding: 0.5rem 0.75rem;
25+
font-size: 2rem;
26+
width: 3rem;
27+
height: 3rem;
28+
border: none;
29+
border-radius: 9999px;
30+
cursor: pointer;
31+
display: none;
32+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
33+
z-index: 1000;
34+
align-items: center;
35+
justify-content: center;
36+
background: var(--sl-color-accent-high);
37+
color: var(--sl-color-black);
38+
}
39+
#backToTop:hover {
40+
background: var(--sl-color-accent);
41+
color: var(--sl-color-white);
42+
}
43+
</style>

web/src/data/animations.ts

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2795,13 +2795,13 @@ export const animationDescriptions: Record<string, string> = {
27952795
"RAP_C_Loop": "Rapping animation loop",
27962796
"Carhit_Hangon": "Cop hanging on a windshield",
27972797
"Carhit_Tumble": "Cop hanging on a windshield",
2798-
"donutdrop": "Blank animation",
2799-
"Fen_Choppa_L1": "Blank animation",
2800-
"Fen_Choppa_L2": "Blank animation",
2801-
"Fen_Choppa_L3": "Blank animation",
2802-
"Fen_Choppa_R1": "Blank animation",
2803-
"Fen_Choppa_R2": "Blank animation",
2804-
"Fen_Choppa_R3": "Blank animation",
2798+
"donutdrop": "",
2799+
"Fen_Choppa_L1": "",
2800+
"Fen_Choppa_L2": "",
2801+
"Fen_Choppa_L3": "",
2802+
"Fen_Choppa_R1": "",
2803+
"Fen_Choppa_R2": "",
2804+
"Fen_Choppa_R3": "",
28052805
"Hangon_Stun_loop": "Stunned while hanging on a windshield",
28062806
"Hangon_Stun_Turn": "Turning while hanging on a windshield",
28072807
"MD_BIKE_2_HANG": "Tumbling and hanging on a car's bumper",
@@ -2841,20 +2841,20 @@ export const animationDescriptions: Record<string, string> = {
28412841
"bng_wndw": "Banging on a window",
28422842
"bng_wndw_02": "Talking through a window",
28432843
"Case_pickup": "Picking up a case",
2844-
"door_jet": "Blank animation",
2844+
"door_jet": "",
28452845
"GRAB_L": "Grabbing from the left",
28462846
"GRAB_R": "Grabbing from the right",
28472847
"Hiker_Pose": "Signalling for a taxi from the right",
28482848
"Hiker_Pose_L": "Signalling for a taxi from the left",
28492849
"Idle_Chat_02": "Idle chat",
28502850
"KAT_Throw_K": "Throwing a katana and challenging to a fight",
2851-
"KAT_Throw_O": "Blank animation",
2851+
"KAT_Throw_O": "",
28522852
"KAT_Throw_P": "Getting a katana and preparing for a fight",
2853-
"PASS_Rifle_O": "Blank animation",
2853+
"PASS_Rifle_O": "",
28542854
"PASS_Rifle_Ped": "Passing a rifle",
28552855
"PASS_Rifle_Ply": "Receiving a rifle",
28562856
"pickup_box": "Picking up a box",
2857-
"Plane_door": "Blank animation",
2857+
"Plane_door": "",
28582858
"Plane_exit": "CJ's plane exit animation",
28592859
"Plane_hijack": "Hijacking a plane",
28602860
"Plunger_01": "Detonating a bomb with a plunger",
@@ -2866,8 +2866,8 @@ export const animationDescriptions: Record<string, string> = {
28662866
"Seat_talk_01": "Talking while sitting down",
28672867
"Seat_talk_02": "Talking while sitting down",
28682868
"SEAT_watch": "Checking watch while sitting down",
2869-
"smalplane_door": "Blank animation",
2870-
"smlplane_door": "Blank animation",
2869+
"smalplane_door": "",
2870+
"smlplane_door": "",
28712871
"MTB_back": "mtn, mountain, bike, bicycle",
28722872
"MTB_bunnyhop": "Muntain bike bunny hop",
28732873
"MTB_drivebyFT": "Mountain bike drive by front",
@@ -3294,24 +3294,24 @@ export const animationDescriptions: Record<string, string> = {
32943294
"POOL_ChalkCue": "Chalking pool cue",
32953295
"POOL_Idle_Stance": "Idle with a pool cue",
32963296
"POOL_Long_Shot": "Pool long shot",
3297-
"POOL_Long_Shot_O": "Blank animation",
3297+
"POOL_Long_Shot_O": "",
32983298
"POOL_Long_Start": "Start of long shot pool",
3299-
"POOL_Long_Start_O": "Blank animation",
3299+
"POOL_Long_Start_O": "",
33003300
"POOL_Med_Shot": "Medium pool shot",
3301-
"POOL_Med_Shot_O": "Blank animation",
3301+
"POOL_Med_Shot_O": "",
33023302
"POOL_Med_Start": "Start of medium pool shot",
3303-
"POOL_Med_Start_O": "Blank animation",
3303+
"POOL_Med_Start_O": "",
33043304
"POOL_Place_White": "Placing the white ball",
33053305
"POOL_Short_Shot": "Short pool shot",
3306-
"POOL_Short_Shot_O": "Blank animation",
3306+
"POOL_Short_Shot_O": "",
33073307
"POOL_Short_Start": "Start of short pool shot",
3308-
"POOL_Short_Start_O": "Blank animation",
3308+
"POOL_Short_Start_O": "",
33093309
"POOL_Walk": "Pool walking",
33103310
"POOL_Walk_Start": "Start of pool walking",
33113311
"POOL_XLong_Shot": "Extra long pool shot",
3312-
"POOL_XLong_Shot_O": "Blank animation",
3312+
"POOL_XLong_Shot_O": "",
33133313
"POOL_XLong_Start": "Start of extra long pool shot",
3314-
"POOL_XLong_Start_O": "Blank animation",
3314+
"POOL_XLong_Start_O": "",
33153315
"WINWASH_Start": "Washing window at an intersection",
33163316
"WINWASH_Wash2Beg": "Washing window at an intersection",
33173317
"python_crouchfire": "Deagle crouch fire",
@@ -3564,61 +3564,61 @@ export const animationDescriptions: Record<string, string> = {
35643564
"TANK_getin_LHS": "Getting into a tank from the left",
35653565
"TANK_getout_LHS": "Getting out of a tank from the left",
35663566
"TANK_open_LHS": "Opening the tank hatch from the left",
3567-
"TAT_ArmL_In_O": "Bugged animation",
3567+
"TAT_ArmL_In_O": "",
35683568
"TAT_ArmL_In_P": "Pulling left sleeve down",
35693569
"TAT_ArmL_In_T": "Examining tattoo on left lower arm",
3570-
"TAT_ArmL_Out_O": "Bugged animation",
3570+
"TAT_ArmL_Out_O": "",
35713571
"TAT_ArmL_Out_P": "Pulling left sleeve up",
35723572
"TAT_ArmL_Out_T": "Stopping to examine tattoo",
3573-
"TAT_ArmL_Pose_O": "Bugged animation",
3573+
"TAT_ArmL_Pose_O": "",
35743574
"TAT_ArmL_Pose_P": "Posing with left shoulder out",
35753575
"TAT_ArmL_Pose_T": "Posing with left arm stretched out",
3576-
"TAT_ArmR_In_O": "Bugged animation",
3576+
"TAT_ArmR_In_O": "",
35773577
"TAT_ArmR_In_P": "Pulling right sleeve down",
35783578
"TAT_ArmR_In_T": "Examining tattoo on right lower arm",
3579-
"TAT_ArmR_Out_O": "Bugged animation",
3579+
"TAT_ArmR_Out_O": "",
35803580
"TAT_ArmR_Out_P": "Pulling right sleeve up",
35813581
"TAT_ArmR_Out_T": "Stopping to examine tattoo",
3582-
"TAT_ArmR_Pose_O": "Bugged animation",
3582+
"TAT_ArmR_Pose_O": "",
35833583
"TAT_ArmR_Pose_P": "Posing with right shoulder out",
35843584
"TAT_ArmR_Pose_T": "Posing with right arm stretched out",
3585-
"TAT_Back_In_O": "Bugged animation",
3585+
"TAT_Back_In_O": "",
35863586
"TAT_Back_In_P": "Posing with back",
35873587
"TAT_Back_In_T": "Posing with back",
3588-
"TAT_Back_Out_O": "Bugged animation",
3588+
"TAT_Back_Out_O": "",
35893589
"TAT_Back_Out_P": "Admiring back tattoo",
35903590
"TAT_Back_Out_T": "End of admiring back tattoo animation",
3591-
"TAT_Back_Pose_O": "Bugged animation",
3591+
"TAT_Back_Pose_O": "",
35923592
"TAT_Back_Pose_P": "Posing with back",
35933593
"TAT_Back_Pose_T": "Posing with back",
35943594
"TAT_Back_Sit_In_P": "Correcting position while sitting",
35953595
"TAT_Back_Sit_Loop_P": "Sitting loop",
35963596
"TAT_Back_Sit_Out_P": "End of sitting loop",
3597-
"TAT_Bel_In_O": "Bugged animation",
3597+
"TAT_Bel_In_O": "",
35983598
"TAT_Bel_In_T": "Posing with back",
3599-
"TAT_Bel_Out_O": "Bugged animation",
3599+
"TAT_Bel_Out_O": "",
36003600
"TAT_Bel_Out_T": "End of back tattoo animation",
3601-
"TAT_Bel_Pose_O": "Bugged animation",
3601+
"TAT_Bel_Pose_O": "",
36023602
"TAT_Bel_Pose_T": "Getting tattoo on the chest",
3603-
"TAT_Che_In_O": "Bugged animation",
3603+
"TAT_Che_In_O": "",
36043604
"TAT_Che_In_P": "Start of tattoo animation",
36053605
"TAT_Che_In_T": "Start of tattoo animation",
3606-
"TAT_Che_Out_O": "Bugged animation",
3606+
"TAT_Che_Out_O": "",
36073607
"TAT_Che_Out_P": "Admiring chest tattoo",
36083608
"TAT_Che_Out_T": "End of chest tattoo",
3609-
"TAT_Che_Pose_O": "Bugged animation",
3609+
"TAT_Che_Pose_O": "",
36103610
"TAT_Che_Pose_P": "Posing with chest tattoo",
36113611
"TAT_Che_Pose_T": "Tattooing a body part",
3612-
"TAT_Drop_O": "Bugged animation",
3613-
"TAT_Idle_Loop_O": "Bugged animation",
3612+
"TAT_Drop_O": "",
3613+
"TAT_Idle_Loop_O": "",
36143614
"TAT_Idle_Loop_T": "Sitting on a chair loop",
3615-
"TAT_Sit_In_O": "Bugged animation",
3615+
"TAT_Sit_In_O": "",
36163616
"TAT_Sit_In_P": "Walking and sitting on a chair",
36173617
"TAT_Sit_In_T": "Tattoo artist getting a customer",
3618-
"TAT_Sit_Loop_O": "Bugged animation",
3618+
"TAT_Sit_Loop_O": "",
36193619
"TAT_Sit_Loop_P": "Browsing for tattoos",
36203620
"TAT_Sit_Loop_T": "Waiting for tattoo order",
3621-
"TAT_Sit_Out_O": "Bugged animation",
3621+
"TAT_Sit_Out_O": "",
36223622
"TAT_Sit_Out_P": "Getting off the chair and walking",
36233623
"TAT_Sit_Out_T": "Tattoo artist wishing customer well",
36243624
"TEC_crouchfire": "Tec9 crouch fire",

web/src/overrides/Pagination.astro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
import { CardGrid } from '@astrojs/starlight/components';
33
import IconLinkCard from '@src/components/IconLinkCard.astro';
4+
5+
import BackToTopButton from '@src/components/BackToTopButton.astro';
46
---
57
<div data-pagefind-ignore>
68
<CardGrid>
@@ -51,4 +53,6 @@ import IconLinkCard from '@src/components/IconLinkCard.astro';
5153

5254
</CardGrid>
5355

54-
</div>
56+
</div>
57+
58+
<BackToTopButton />

web/src/pages/Incomplete_Pages.astro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
33
import { getUnfinishedPages } from '@src/utils/general';
44
5+
import NoteBox from '@src/components/NoteBox.astro';
6+
57
const unfinishedFunctions = getUnfinishedPages('functions');
68
const unfinishedEvents = getUnfinishedPages('events');
79
---
@@ -17,6 +19,10 @@ const unfinishedEvents = getUnfinishedPages('events');
1719
class="guidelines-link">Contribution guidelines</a></p>
1820

1921
<h3>Unfinished Function Pages</h3>
22+
<NoteBox type="info">
23+
We are working on migrating these pages from <code>wiki.multitheftauto.com</code> using <strong>web scraping</strong>.
24+
<br>Stay up to date with the progress using our Development Discord server.
25+
</NoteBox>
2026
<section data-pagefind-ignore>
2127
{unfinishedFunctions.length === 0 ? (
2228
<p>There are currently no unfinished function pages 😄</p>

0 commit comments

Comments
 (0)