diff --git a/examples/simple/components/Header.tsx b/examples/simple/components/Header.tsx index 45533089..68d611ef 100644 --- a/examples/simple/components/Header.tsx +++ b/examples/simple/components/Header.tsx @@ -1,5 +1,6 @@ import Head from 'next/head' import type { FC } from 'react' +import Link from 'next/link' type Props = { heading: string @@ -16,7 +17,7 @@ export const Header: FC = ({ heading, title }) => (

{heading}

- + diff --git a/examples/simple/pages/index.tsx b/examples/simple/pages/index.tsx index 4bca0a8d..72ccfe88 100644 --- a/examples/simple/pages/index.tsx +++ b/examples/simple/pages/index.tsx @@ -26,7 +26,7 @@ const Homepage = ( // eslint-disable-next-line @typescript-eslint/no-unused-vars const clientSideLanguageChange = (newLocale: string) => { - i18n.changeLanguage(newLocale); + i18n.changeLanguage(newLocale) } const changeTo = router.locale === 'en' ? 'de' : 'en' @@ -36,30 +36,30 @@ const Homepage = ( <>
-
-
-

+
+
+

{t('blog.appDir.question')}

-

+

Then check out - this blog post - . + this blog post.

-
-

+ +
+

{t('blog.optimized.question')}

-

+

Then you may have a look at this blog post @@ -68,16 +68,14 @@ const Homepage = (

-
-

- {t('blog.ssg.question')} -

-

+

+

{t('blog.ssg.question')}

+

Then you may have a look at this blog post. @@ -85,7 +83,7 @@ const Homepage = (

diff --git a/examples/simple/public/app.css b/examples/simple/public/app.css index 90b96478..61378a55 100644 --- a/examples/simple/public/app.css +++ b/examples/simple/public/app.css @@ -16,6 +16,10 @@ min-width: 100vw; } +* body { + overflow-x: hidden; /* Hide x-axis overflow */ +} + h1, h2 { font-family: 'Oswald', sans-serif; @@ -35,6 +39,87 @@ h3 { opacity: 0.5; } +.mainBox { + display: grid; + gap: 20px; + width: 90%; + grid-template-columns: 1fr; + grid-auto-rows: auto; +} + +.card { + background-color: #fff; + border-radius: 10px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + overflow: hidden; + text-align: center; + box-sizing: border-box; + transition: box-shadow 0.3s ease; /* Smooth transition for the hover effect */ + display: grid; + grid-template-rows: auto 1fr auto; +} + +.card:hover { + box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Increased shadow on hover */ +} + +.card-title { + padding-top: 11px; + min-height: 70px; + font-size: 1.5em; + margin: 0 0 10px; +} + +.card-text { + font-size: 1em; + color: #666; + margin-bottom: 15px; + padding: 0 10px; /* Add padding for text inside the card */ +} + +.card-text a { + color: #007bff; + text-decoration: none; +} + +.card-text a:hover { + text-decoration: underline; +} + +.card-img { + width: 100%; /* Full width of the parent div */ + height: auto; /* Maintain aspect ratio */ + border-radius: 0 0 10px 10px; /* Rounded corners on the bottom only */ + display: block; /* Prevent extra space below the image */ + transition: + transform 0.5s ease, + box-shadow 0.5s ease; /* Smooth transition for hover effects with longer duration */ +} + +.card-img:hover { + transform: scale(1.05); /* Slightly scale up the image */ + box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */ +} + +/* Media queries for responsive design */ +@media (min-width: 600px) { + .mainBox { + grid-template-columns: repeat( + 2, + 1fr + ); /* Show 2 cards per row on medium screens */ + } +} + +@media (min-width: 900px) { + .mainBox { + grid-template-columns: repeat( + 3, + 1fr + ); /* Show 3 cards per row on large screens */ + } +} + p { line-height: 1.65em; } @@ -73,6 +158,7 @@ button { min-height: 40px; padding: 0 0.8em; border: 0; + border-radius: 5px; color: inherit; position: relative; transform: translateZ(0);