Skip to content

Commit

Permalink
image layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
kmalloy24 committed Aug 1, 2024
1 parent 5283d4c commit f5d50de
Show file tree
Hide file tree
Showing 5 changed files with 174 additions and 0 deletions.
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.
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>
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>
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>
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>

0 comments on commit f5d50de

Please sign in to comment.