From ad3412ee10d02eb363829c6eb47f7fbc14fd70a7 Mon Sep 17 00:00:00 2001
From: Ossian <857984597@qq.com>
Date: Tue, 27 May 2025 07:40:17 +0800
Subject: [PATCH] fix: playground layout broken
---
apps/website/app/layout.jsx | 46 +++++++++++++++--------
apps/website/content/playground/index.mdx | 2 +-
apps/website/styles.css | 7 ++++
3 files changed, 39 insertions(+), 16 deletions(-)
diff --git a/apps/website/app/layout.jsx b/apps/website/app/layout.jsx
index 72567774..3b4f8d40 100644
--- a/apps/website/app/layout.jsx
+++ b/apps/website/app/layout.jsx
@@ -1,5 +1,5 @@
-import { Footer, Layout, Navbar } from "nextra-theme-docs";
-import { Banner, Head } from "nextra/components";
+import { Layout, Navbar } from "nextra-theme-docs";
+import { Head } from "nextra/components";
import { getPageMap } from "nextra/page-map";
import "nextra-theme-docs/style.css";
import "../styles.css";
@@ -13,6 +13,34 @@ const Vercel = ({ height = 20 }) => (
);
+const LastUpdated = ({ date }) => (
+
+ Powered by
+
+
+
+
+ Last updated on
+
+
+
+);
+
export default async function RootLayout({ children }) {
return (
@@ -101,19 +129,7 @@ export default async function RootLayout({ children }) {
chatLink="https://discord.gg/GnHbXTdZz6"
/>
}
- footer={
-
- Powered by
-
-
-
-
- }
+ lastUpdated={}
>
{children}
diff --git a/apps/website/content/playground/index.mdx b/apps/website/content/playground/index.mdx
index 9acaca0d..6b6461e9 100644
--- a/apps/website/content/playground/index.mdx
+++ b/apps/website/content/playground/index.mdx
@@ -6,7 +6,7 @@ title: SWC Playground
src="https://play.swc.rs"
style={{
width: '100%',
- height: 'calc(100vh - 64px)',
+ height: 'calc(100vh - 64px - 6px - 20px - 10rem)',
border: 0,
overflow: 'hidden',
background: 'rgb(21, 21, 21)'
diff --git a/apps/website/styles.css b/apps/website/styles.css
index f1d8c73c..357c8561 100644
--- a/apps/website/styles.css
+++ b/apps/website/styles.css
@@ -1 +1,8 @@
@import "tailwindcss";
+
+@layer base {
+ body {
+ --nextra-content-width: 100vw;
+ --nextra-menu-height: 4rem;
+ }
+}