An open API service indexing awesome lists of open source software.

https://github.com/atomjoy/parsedown-gallery

Parsedown image gallery markdown.
https://github.com/atomjoy/parsedown-gallery

Last synced: 2 months ago
JSON representation

Parsedown image gallery markdown.

Awesome Lists containing this project

README

          

# Parsedown image gallery

Create an image gallery from a Markdown file (splide slider).

## Install

```sh
composer require atomjoy/parsedown-gallery
```

## How to ParsedownGallery

Install Parsedown and copy this class to your project.

```php
text("%%%\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\n%%%");

// Custom class .gallery-box
echo $p->text("%%%box\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\n%%%");
```

### Created ParsedownGallery html

```html


```

## How to ParsedownGallerySplide

Install Parsedown and copy this class to your project.

```php
text("&&&\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\n&&&");

echo $p->text("&&&box\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\n&&&");
```

### Created ParsedownGallerySplide html

```html





  • Image


  • Image


  • Image


  • Image


  • Image




```

### Add Splide slider plugin and css

```html

/* Required */
onload = (event) => {
new Splide('.splide').mount();
};

.splide {
background: #fafafa;
width: 100%;
height: 400px;
/* aspect-ratio: 16/9; */
}

.splide__image {
object-fit: cover;
width: 100%;
height: 400px;
/* aspect-ratio: 16/9; */
}

```

## Secure input (optional)

```php
$p = new ParsedownGallery();

$p->setSafeMode(true);
```