diff --git a/package.json b/package.json index bba0b39..095f917 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,8 @@ "zod": "^3.23.8" }, "devDependencies": { - "@actcoding/eslint-config": "^0.0.8", + "@actcoding/eslint-config": "^0.0.9", + "@tailwindcss/typography": "^0.5.15", "@tanstack/eslint-plugin-query": "^5.61.4", "@tanstack/react-query-devtools": "^5.61.5", "@tanstack/router-devtools": "^1.70.0", @@ -61,7 +62,7 @@ "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.3.2", "autoprefixer": "^10.4.20", - "eslint": "^9.11.1", + "eslint": "^9.16.0", "postcss": "^8.4.47", "tailwindcss": "^3.4.14", "type-fest": "^4.26.1", diff --git a/src/components/AppLogo.tsx b/src/components/AppLogo.tsx new file mode 100644 index 0000000..0a39fa6 --- /dev/null +++ b/src/components/AppLogo.tsx @@ -0,0 +1,16 @@ +import { asset } from '@/lib/url' +import { cn } from '@/lib/utils' +import { HTMLAttributes } from 'react' + +type Props = HTMLAttributes + +export default function AppLogo(props: Props) { + return ( + mjml.app logo + ) +} diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx new file mode 100644 index 0000000..7021462 --- /dev/null +++ b/src/components/layout/Header.tsx @@ -0,0 +1,34 @@ +import { Link } from '@tanstack/react-router' +import AppLogo from '../AppLogo' +import AppSettingsDialog from '../AppSettingsDialog' +import AppTemplatesDialog from '../AppTemplatesDialog' + +export default function Header() { + return ( +
+
+ +

+ mjml.app +

+ + + Editor + + + About + + +
+ + + + {/* */} + +

+ Not affiliated with Mailjet or mjml.io +

+
+
+ ) +} diff --git a/src/pages/PageAbout.tsx b/src/pages/PageAbout.tsx new file mode 100644 index 0000000..5681207 --- /dev/null +++ b/src/pages/PageAbout.tsx @@ -0,0 +1,40 @@ +import AppLogo from '@/components/AppLogo' +import pkg from '@/package' + +export default function PageAbout() { + return ( +
+
+ + +
+

{pkg.name}

+

{pkg.version}

+
+ +
{pkg.description}
+ +
+ +

+ This playground was crafted out of the need for rapid MJML prototyping. +

+ +

+ While the official editor technically works, + it is limited to the html/xml syntax. I'm working with the json syntax at work and + didn't find a editor that suited my likings. So I decided to build my own editor. +

+ +

Lorem ipsum

+

Lorem ipsum

+

Lorem ipsum

+

Lorem ipsum

+

Lorem ipsum

+

Lorem ipsum

+

Lorem ipsum

+

Lorem ipsum

+
+
+ ) +} diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index 2d807bf..b0b47e2 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -1,30 +1,11 @@ -import AppSettingsDialog from '@/components/AppSettingsDialog' -import AppTemplatesDialog from '@/components/AppTemplatesDialog' import Devtools from '@/components/Devtools' +import Header from '@/components/layout/Header' import { Toaster } from '@/components/ui/toaster' -import { asset } from '@/lib/url' import { createRootRoute, Outlet } from '@tanstack/react-router' export const Route = createRootRoute({ component: () => (<> -
-
- -

- mjml.app -

- -
- - - - {/* */} - -

- Not affiliated with Mailjet or mjml.io -

-
-
+
diff --git a/src/routes/about.lazy.tsx b/src/routes/about.lazy.tsx new file mode 100644 index 0000000..a832300 --- /dev/null +++ b/src/routes/about.lazy.tsx @@ -0,0 +1,6 @@ +import PageAbout from '@/pages/PageAbout' +import { createLazyFileRoute } from '@tanstack/react-router' + +export const Route = createLazyFileRoute('/about')({ + component: () => , +}) diff --git a/tailwind.config.js b/tailwind.config.js index 5efeb69..66f87b5 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,4 +1,5 @@ import pluginAnimate from 'tailwindcss-animate' +import pluginTypography from '@tailwindcss/typography' /** @type {import('tailwindcss').Config} */ export default { @@ -73,5 +74,6 @@ export default { }, plugins: [ pluginAnimate, + pluginTypography, ], }