diff --git a/_headers b/_headers index 8380d0b8d..ed88e9a22 100644 --- a/_headers +++ b/_headers @@ -1,2 +1,2 @@ -/assets/(.*) - cache-control: public, immutable, max-age=31536000 +/_astro/* + Cache-Control: public, max-age=31536000, immutable diff --git a/astro.config.ts b/astro.config.ts index f168d13bd..4d803f425 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -539,6 +539,7 @@ export default defineConfig({ image: { responsiveStyles: true, layout: "constrained", + domains: ["assets.papermc.io"], }, markdown: { remarkPlugins: [ diff --git a/src/components/overrides/Head.astro b/src/components/overrides/Head.astro index e22e24dc1..65b03bd8e 100644 --- a/src/components/overrides/Head.astro +++ b/src/components/overrides/Head.astro @@ -59,8 +59,6 @@ const base = stripTrailingSlash(import.meta.env.BASE_URL); - - diff --git a/src/components/overrides/SiteTitle.astro b/src/components/overrides/SiteTitle.astro index a8a0e4705..e8d099e47 100644 --- a/src/components/overrides/SiteTitle.astro +++ b/src/components/overrides/SiteTitle.astro @@ -1,14 +1,20 @@ --- +import { Image } from "astro:assets"; + const { siteTitle, siteTitleHref } = Astro.locals.starlightRoute; --- - PaperMC Logo (Light) - PaperMC Logo (Dark) -The result of parsing `<yellow>Hello <blue>World</blue>!`, shown in-game in the Minecraft client's chat window -The result of parsing `<red>This is a <green>test!`, shown in-game in the Minecraft client's chat window +The result of parsing `<yellow>Hello <blue>World</blue>!`, shown in-game in the Minecraft client's chat window +The result of parsing `<red>This is a <green>test!`, shown in-game in the Minecraft client's chat window ### Color (verbose) @@ -122,8 +123,8 @@ Examples
-The result of parsing `<color:yellow>Hello <color:blue>World</color:blue>!`, shown in-game in the Minecraft client's chat window -The result of parsing `<color:#FF5555>This is a <color:#55FF55>test!`, shown in-game in the Minecraft client's chat window +The result of parsing `<color:yellow>Hello <color:blue>World</color:blue>!`, shown in-game in the Minecraft client's chat window +The result of parsing `<color:#FF5555>This is a <color:#55FF55>test!`, shown in-game in the Minecraft client's chat window ### Shadow Color @@ -146,9 +147,9 @@ Examples
-The result of parsing `<shadow:yellow>Hello <shadow:aqua:0.5>World</shadow>!` shown in-game in the Minecraft client's chat window -The result of parsing `<shadow:#FF5555>This is a <shadow:#55FF55>test!` shown in-game in the Minecraft client's chat window -The result of parsing `<shadow:#000000FF><b>Thicc` shown in-game in the Minecraft client's chat window +The result of parsing `<shadow:yellow>Hello <shadow:aqua:0.5>World</shadow>!` shown in-game in the Minecraft client's chat window +The result of parsing `<shadow:#FF5555>This is a <shadow:#55FF55>test!` shown in-game in the Minecraft client's chat window +The result of parsing `<shadow:#000000FF><b>Thicc` shown in-game in the Minecraft client's chat window ### Decoration @@ -174,7 +175,7 @@ Examples ```
-The result of parsing `<underlined>This is <bold>important</bold>!`, shown in-game in the Minecraft client's chat window +The result of parsing `<underlined>This is <bold>important</bold>!`, shown in-game in the Minecraft client's chat window ### Reset @@ -194,7 +195,7 @@ Examples ```
-The result of parsing `<yellow><bold>Hello <reset>world!`, shown in-game in the Minecraft client's chat window +The result of parsing `<yellow><bold>Hello <reset>world!`, shown in-game in the Minecraft client's chat window ### Click @@ -214,7 +215,7 @@ Click this to copy your score! ```
-The result of parsing `<click:run_command:/seed>Click</click> to show the world seed!`, shown in-game in the Minecraft client's chat window +The result of parsing `<click:run_command:/seed>Click</click> to show the world seed!`, shown in-game in the Minecraft client's chat window :::caution @@ -246,7 +247,7 @@ Examples ```
-The result of parsing `<hover:show_text:'<red>test'>TEST`, shown in-game in the Minecraft client's chat window +The result of parsing `<hover:show_text:'<red>test'>TEST`, shown in-game in the Minecraft client's chat window ### Keybind @@ -264,7 +265,7 @@ Press to jump! ```
-The result of parsing `Press <red><key:key.jump> to jump!`, shown in-game in the Minecraft client's chat window +The result of parsing `Press <red><key:key.jump> to jump!`, shown in-game in the Minecraft client's chat window ### Translatable @@ -287,8 +288,8 @@ You should get a ! ```
-The result of parsing `You should get a <lang:block.minecraft.diamond_block>!`, shown in-game in the Minecraft client's chat window in English -The result of parsing `<lang:commands.drop.success.single:'<red>1':'<blue>Stone'>!`, shown in-game in the Minecraft client's chat window in English +The result of parsing `You should get a <lang:block.minecraft.diamond_block>!`, shown in-game in the Minecraft client's chat window in English +The result of parsing `<lang:commands.drop.success.single:'<red>1':'<blue>Stone'>!`, shown in-game in the Minecraft client's chat window in English ### Fallback @@ -332,7 +333,7 @@ Shift-click this to insert! ```
-The result of parsing `Shift-click <insert:test>this</insert> to insert!`, shown in-game in the Minecraft client's chat window +The result of parsing `Shift-click <insert:test>this</insert> to insert!`, shown in-game in the Minecraft client's chat window ### Rainbow @@ -354,7 +355,7 @@ Examples ```
-The result of parsing all four examples in series, shown in-game in the Minecraft client's chat window +The result of parsing all four examples in series, shown in-game in the Minecraft client's chat window ### Gradient @@ -375,7 +376,7 @@ Examples ```
-The result of parsing the examples for the gradient tag, shown in-game in the Minecraft client's chat window +The result of parsing the examples for the gradient tag, shown in-game in the Minecraft client's chat window ### Transition @@ -393,7 +394,7 @@ Examples ```
-The result of parsing `<transition:white:black:red:[phase]>Hello World [phase]</transition>`, shown in-game in the Minecraft client's chat window +The result of parsing `<transition:white:black:red:[phase]>Hello World [phase]</transition>`, shown in-game in the Minecraft client's chat window ### Font @@ -412,7 +413,7 @@ Nothing Uniform Alt Uniform ```
-The result of parsing `Nothing <font:uniform>Uniform <font:alt>Alt  </font> Uniform`, shown in-game in the Minecraft client's chat window +The result of parsing `Nothing <font:uniform>Uniform <font:alt>Alt  </font> Uniform`, shown in-game in the Minecraft client's chat window ### Newline @@ -434,7 +435,7 @@ Let me insert a line break here. ```
-The result of parsing `<hover:show_text:'<red>Hover with a<newline><green>line break'>Text with<newline>line break</hover>`, shown in-game in the Minecraft client's chat window +The result of parsing `<hover:show_text:'<red>Hover with a<newline><green>line break'>Text with<newline>line break</hover>`, shown in-game in the Minecraft client's chat window ### Selector @@ -456,7 +457,7 @@ Hello , I'm ! ```
-The result of parsing `Hello <selector:@e[limit=5]>, I'm <selector:@s>!`, show in-game in the Minecraft client's chat window +The result of parsing `Hello <selector:@e[limit=5]>, I'm <selector:@s>!`, show in-game in the Minecraft client's chat window ### Score diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 8e43c850f..2d9b1c31b 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -8,7 +8,8 @@ hero: title: PaperMC Docs tagline: Documentation for all projects under the PaperMC umbrella, including Paper, Velocity and Folia. image: - html: 'PaperMC Logo' + file: "https://assets.papermc.io/brand/papermc_logo.min.svg" + alt: PaperMC Logo --- import { CardGrid } from "@astrojs/starlight/components"; diff --git a/src/styles/custom.css b/src/styles/custom.css index b1106bde5..4d169d6ce 100644 --- a/src/styles/custom.css +++ b/src/styles/custom.css @@ -24,11 +24,15 @@ .sl-markdown-content img:not(:where(.not-content *)):not([alt="Diagram"]) { width: 100%; } -.sl-markdown-content .img-inline img { +/* except when we want them inline */ +.sl-markdown-content :is(img.img-inline, .img-inline img) { margin: 0; width: auto; } -.sl-markdown-content .img-inline-center img { +.sl-markdown-content img.img-inline { + display: inline-block; +} +.sl-markdown-content :is(img.img-inline-center, .img-inline-center img) { width: auto; } @@ -37,12 +41,8 @@ font-family: var(--__sl-font-mono); } -/* Safari fixes for logo sizing */ -.hero-html > img { - object-fit: contain; +.hero > img { width: min(70%, 20rem); - height: auto; - margin-inline: auto; } /* make index page hero smaller vertically */ @@ -59,6 +59,11 @@ } } +/* magic */ +@view-transition { + navigation: auto; +} + /* Dark mode colors. */ :root { --sl-color-accent-low: #1e3a8a;