Skip to content

Commit 57b37e6

Browse files
committed
Use starlight-scroll-to-top for BackToTop button
1 parent 84e8352 commit 57b37e6

File tree

5 files changed

+24
-46
lines changed

5 files changed

+24
-46
lines changed

web/astro.config.mjs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,27 @@ import { defineConfig } from "astro/config";
33
import starlight from "@astrojs/starlight";
44
import mtasaStarlightThemePlugin from "@multitheftauto/starlight-theme-mtasa";
55
import { SITE_TITLE, SITE_URL } from "./src/content.constants";
6+
import starlightScrollToTop from 'starlight-scroll-to-top'
67

78
export default defineConfig({
89
site: SITE_URL,
910
i18n: {
10-
locales: ["en", "es", "fr"],
11+
locales: ["en", "es", "fr", "pl"],
1112
defaultLocale: "en",
1213
routing: {
1314
prefixDefaultLocale: false,
1415
},
1516
},
1617
integrations: [
1718
starlight({
18-
plugins: [mtasaStarlightThemePlugin()],
19+
plugins: [mtasaStarlightThemePlugin(), starlightScrollToTop({
20+
tooltipText: {
21+
"en": "Scroll to top",
22+
"pl": "Na górę",
23+
},
24+
showTooltip: true,
25+
showProgressRing: false,
26+
})],
1927
favicon: "favicon.ico",
2028
title: SITE_TITLE,
2129
logo: {

web/package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"node-html-parser": "^7.0.1",
2222
"pagefind": "^1.3.0",
2323
"sharp": "^0.32.5",
24+
"starlight-scroll-to-top": "^0.4.0",
2425
"tm-themes": "^1.10.6"
2526
},
2627
"optionalDependencies": {

web/src/components/BackToTopButton.astro

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

web/src/overrides/Pagination.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,3 @@ import BackToTopButton from '@src/components/BackToTopButton.astro';
5555

5656
</div>
5757

58-
<BackToTopButton />

0 commit comments

Comments
 (0)