diff --git a/README.md b/README.md index 066adcf..0f33dd0 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,9 @@ When non existing tailwind class matches the value you need, a custom value can | group | defines a parent element for a group | | group-hover: | adds a class on hover over the parent of the group | | dark: | only apply styling in dark mode | +| md: | media query for desktop devices | +| hidden | display: none; | +| block | display: block; | Tailwind uses a custom spacing scale. The translation table can be found [here](https://gist.github.com/crswll/5d91b14373f53d66317e407bbba6d3dd). @@ -211,6 +214,30 @@ export default function RootLayout({ The same way other fonts can be imported and also just applied on single objects. +## Images +Next.js comes with a built-in image component, which does many image optimizations like serving images as `webp` or `avif` where possible, automatically. + +The componennt is called ``. + +Example usage: +```tsx +import Image from 'next/image'; + +export default function Page() { + return ( + just an example + ); +} +``` + +The `width` and `height` should be specified to prevent layout shift - the values set are just used for defining the right aspect ratio - Next.js decides by itself which size has to be rendered. + ## Ressources - [Next.js Installation](https://nextjs.org/docs/app/getting-started/installation) - [Next.js React Foundations Course](https://nextjs.org/learn/react-foundations) diff --git a/dashboard-app-course/app/page.tsx b/dashboard-app-course/app/page.tsx index 1591b29..4fc1214 100644 --- a/dashboard-app-course/app/page.tsx +++ b/dashboard-app-course/app/page.tsx @@ -2,12 +2,13 @@ import AcmeLogo from '@/app/ui/acme-logo'; import { ArrowRightIcon } from '@heroicons/react/24/outline'; import Link from 'next/link'; import { lusitana } from '@/app/ui/fonts'; +import Image from 'next/image'; export default function Page() { return (
- {} +
@@ -28,6 +29,21 @@ export default function Page() {
{/* Add Hero Images Here */} + Screenshots of the dashboard project on desktop + + Screenshots of the dashboard project on mobile