Skip to content

Instantly share code, notes, and snippets.

View maxloncar's full-sized avatar

Max Lončar maxloncar

View GitHub Profile
@maxloncar
maxloncar / different_routes_under_the_same_folder
Created September 15, 2023 12:55
Different routes under the same folder
├── app/
| ├── (auth)/
| | | login/
| | | ├── page.tsx
| | | register/
| | | ├── page.tsx
| | ├── layout.tsx // Auth level layout
| | ├── error.tsx // Auth level error handling page
@maxloncar
maxloncar / layout_files_within_the_tree
Created September 15, 2023 11:22
Layout files within the tree
├── app/
| ├── about/
| | ├── page.tsx
| ├── page.tsx
| ├── contact/
| | ├── layout.tsx // Contact level layout
| | ├── error.tsx // Contact level error handling
| | ├── page.tsx
| ├── dashboard/
| | ├── page.tsx
@maxloncar
maxloncar / new_routing_system
Created September 15, 2023 08:09
New routing system in Next.js 13
├── app/
| ├── about/
| | ├── page.tsx
| ├── page.tsx
| ├── contact/
| | ├── page.tsx
| ├── dashboard/
| | ├── page.tsx
@maxloncar
maxloncar / old_routing_system
Created September 15, 2023 08:02
Old routing system
├── pages/
| ├── about.tsx
| ├── contact.tsx
| └── dashboard.tsx
@maxloncar
maxloncar / PictureImage.html
Created January 9, 2023 08:49
Implementation of raster images within the <picture> tag
<picture>
<source srcset="image_path/image-small.png" media="(max-width: some_breakpoint)" alt="Image">
<source srcset="image_path/image-medium.png" media="(max-width: some_breakpoint)" alt="Image">
<source srcset="image_path/image-large.png" media="(min-width: some_breakpoint)" alt="Image">
<img class="image" src="image_path/image.png" alt="Image">
</picture>
@maxloncar
maxloncar / SvgImage.html
Created January 9, 2023 08:45
Inline implementation of vector images
<svg width="18" height="20" viewBox="0 0 18 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.3224 4.36529L12.2208 3.07125L12.6139 4.72562C12.618" fill="#FF5722"/>
</svg>
@maxloncar
maxloncar / EmbedImage.html
Created January 9, 2023 08:44
Image as an <embed>
<embed src="image_path/image.svg"/>
@maxloncar
maxloncar / IframeImage.html
Created January 9, 2023 08:43
Image as an <iframe>
<iframe src="image_path/image.svg"></iframe>
@maxloncar
maxloncar / BackgroundImage.css
Created January 9, 2023 08:42
Image as a background in CSS
.class {
background-image: url("image_path/image.svg");
}
@maxloncar
maxloncar / ImgAttribute.html
Created January 9, 2023 08:41
Image as an <img> attribute
<figure>
<img class="image" src="image_path/image.svg" alt="Image">
</figure>