-
-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
174 additions
and
0 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
sites/next.skeleton.dev/src/content/docs/resources/cookbook/image-layouts.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
layout: '@layouts/LayoutDoc.astro' | ||
title: Image Layouts | ||
description: Various layouts for displaying images. | ||
showDocsUrl: true | ||
--- | ||
|
||
export const components = componentSet; | ||
|
||
import ExampleGrid from '@examples/resources/cookbook/image-layouts/ExampleGrid.astro'; | ||
import ExampleGridRaw from '@examples/resources/cookbook/image-layouts/ExampleGrid.astro?raw'; | ||
import ExampleQuad from '@examples/resources/cookbook/image-layouts/ExampleQuad.astro'; | ||
import ExampleQuadRaw from '@examples/resources/cookbook/image-layouts/ExampleQuad.astro?raw'; | ||
import ExampleMasonry from '@examples/resources/cookbook/image-layouts/ExampleMasonry.astro'; | ||
import ExampleMasonryRaw from '@examples/resources/cookbook/image-layouts/ExampleMasonry.astro?raw'; | ||
import ExampleFeatured from '@examples/resources/cookbook/image-layouts/ExampleFeatured.astro'; | ||
import ExampleFeaturedRaw from '@examples/resources/cookbook/image-layouts/ExampleFeatured.astro?raw'; | ||
|
||
## Grid | ||
|
||
<Preview client:load> | ||
<Fragment slot="preview"> | ||
<ExampleGrid /> | ||
</Fragment> | ||
<Fragment slot="code"> | ||
<Code code={ExampleGridRaw} lang="astro" /> | ||
</Fragment> | ||
</Preview> | ||
|
||
## Quad | ||
|
||
<Preview client:load> | ||
<Fragment slot="preview"> | ||
<ExampleQuad /> | ||
</Fragment> | ||
<Fragment slot="code"> | ||
<Code code={ExampleQuadRaw} lang="astro" /> | ||
</Fragment> | ||
</Preview> | ||
|
||
## Masonry | ||
|
||
<Preview client:load> | ||
<Fragment slot="preview"> | ||
<ExampleMasonry /> | ||
</Fragment> | ||
<Fragment slot="code"> | ||
<Code code={ExampleMasonryRaw} lang="astro" /> | ||
</Fragment> | ||
</Preview> | ||
|
||
## Featured | ||
|
||
<Preview client:load> | ||
<Fragment slot="preview"> | ||
<ExampleFeatured /> | ||
</Fragment> | ||
<Fragment slot="code"> | ||
<Code code={ExampleFeaturedRaw} lang="astro" /> | ||
</Fragment> | ||
</Preview> | ||
|
||
## Attribution | ||
Image layout markup and styles based on [Flowbite](https://flowbite.com/docs/components/gallery/#masonry-grid). | ||
Please [view our guide](https://www.skeleton.dev/blog/skeleton-plus-flowbite) to learn more about integrating Flowbite elements and blocks in your Skeleton projects. |
28 changes: 28 additions & 0 deletions
28
sites/next.skeleton.dev/src/examples/resources/cookbook/image-layouts/ExampleFeatured.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- Flex --> | ||
<section class="flex justify-center"> | ||
<!-- Grid --> | ||
<div class="grid gap-4"> | ||
<!-- Featured --> | ||
<div> | ||
<img class="h-auto max-w-full rounded-lg" src="https://images.unsplash.com/photo-1597077962467-be16edcc6a43" alt="" /> | ||
</div> | ||
<!-- Row --> | ||
<div class="grid grid-cols-5 gap-4"> | ||
<div class="w-86 h-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1620005839871-7ac4aed5ddbc" alt="" /> | ||
</div> | ||
<div class="w-86 h-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1553184570-557b84a3a308" alt="" /> | ||
</div> | ||
<div class="w-86 h-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1509130446053-899ae7358ce6" alt="" /> | ||
</div> | ||
<div class="w-86 h-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1510111652602-195fc654aa83" alt="" /> | ||
</div> | ||
<div class="w-86 h-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1597077917598-97ca3922a317" alt="" /> | ||
</div> | ||
</div> | ||
</div> | ||
</section> |
36 changes: 36 additions & 0 deletions
36
sites/next.skeleton.dev/src/examples/resources/cookbook/image-layouts/ExampleGrid.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!-- Flex --> | ||
<section class="flex justify-center"> | ||
<!-- Grid --> | ||
<div class="grid grid-cols-2 gap-6 md:grid-cols-3"> | ||
<!-- Row --> | ||
<div class="h-48 w-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1617296538902-887900d9b592" alt="" /> | ||
</div> | ||
<div class="h-48 w-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1597077962467-be16edcc6a43" alt="" /> | ||
</div> | ||
<div class="h-48 w-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1553184570-557b84a3a308" alt="" /> | ||
</div> | ||
<!-- Row --> | ||
<div class="h-48 w-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1509130446053-899ae7358ce6" alt="" /> | ||
</div> | ||
<div class="h-48 w-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1620005839871-7ac4aed5ddbc" alt="" /> | ||
</div> | ||
<div class="h-48 w-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1597531072931-8fceba101e4e" alt="" /> | ||
</div> | ||
<!-- Row --> | ||
<div class="h-48 w-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1510111652602-195fc654aa83" alt="" /> | ||
</div> | ||
<div class="h-48 w-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1612145342709-eadb6e22acca" alt="" /> | ||
</div> | ||
<div class="h-48 w-48"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1597077917598-97ca3922a317" alt="" /> | ||
</div> | ||
</div> | ||
</section> |
27 changes: 27 additions & 0 deletions
27
sites/next.skeleton.dev/src/examples/resources/cookbook/image-layouts/ExampleMasonry.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- Grid --> | ||
<section class="grid grid-cols-2 gap-4 md:grid-cols-4"> | ||
<!-- Column --> | ||
<div class="grid gap-4"> | ||
<img class="rounded-lg" src="https://images.unsplash.com/photo-1617296538902-887900d9b592" alt="" /> | ||
<img class="rounded-lg" src="https://images.unsplash.com/photo-1597077962467-be16edcc6a43" alt="" /> | ||
<img class="rounded-lg" src="https://images.unsplash.com/photo-1591775161903-497839a443c1" alt="" /> | ||
</div> | ||
<!-- Column --> | ||
<div class="grid gap-4"> | ||
<img class="rounded-lg" src="https://images.unsplash.com/photo-1617296539691-67feaadf389e" alt="" /> | ||
<img class="rounded-lg" src="https://images.unsplash.com/photo-1542835435-4fa357baa00b" alt="" /> | ||
<img class="rounded-lg" src="https://images.unsplash.com/photo-1553184570-557b84a3a308" alt="" /> | ||
</div> | ||
<!-- Column --> | ||
<div class="grid gap-4"> | ||
<img class="rounded-lg" src="https://images.unsplash.com/photo-1603855873822-0931a843ee3a" alt="" /> | ||
<img class="rounded-lg" src="https://images.unsplash.com/photo-1509130446053-899ae7358ce6" alt="" /> | ||
<img class="rounded-lg" src="https://images.unsplash.com/photo-1508931133503-b1944a4ecdd5" alt="" /> | ||
</div> | ||
<!-- Column --> | ||
<div class="grid gap-4"> | ||
<img class="rounded-lg" src="https://images.unsplash.com/photo-1633053663400-655b31fb88ac" alt="" /> | ||
<img class="rounded-lg" src="https://images.unsplash.com/photo-1578170222009-c7893aa20afd" alt="" /> | ||
<img class="rounded-lg" src="https://images.unsplash.com/photo-1610220941077-1ec123e7c043" alt="" /> | ||
</div> | ||
</section> |
18 changes: 18 additions & 0 deletions
18
sites/next.skeleton.dev/src/examples/resources/cookbook/image-layouts/ExampleQuad.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!-- Flex --> | ||
<section class="flex justify-center"> | ||
<!-- Grid --> | ||
<div class="grid grid-cols-2 gap-4"> | ||
<div class="h-96 w-96"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1617296538902-887900d9b592" alt="" /> | ||
</div> | ||
<div class="h-96 w-96"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1597077962467-be16edcc6a43" alt="" /> | ||
</div> | ||
<div class="h-96 w-96"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1553184570-557b84a3a308" alt="" /> | ||
</div> | ||
<div class="h-96 w-96"> | ||
<img class="h-full w-full rounded-lg object-cover" src="https://images.unsplash.com/photo-1509130446053-899ae7358ce6" alt="" /> | ||
</div> | ||
</div> | ||
</section> |