Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
davide-casiraghi authored Mar 15, 2019
1 parent 53baf4d commit 50fb880
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Laravel Responsive Gallery
A PHP library to create responsive galleries that are organized into Pinterest like columns.

[![Latest Stable Version](https://img.shields.io/packagist/v/davide-casiraghi/bootstrap-accordion-integrator.svg?style=flat-square)](https://packagist.org/packages/davide-casiraghi/bootstrap-accordion-integrator)
<a href="https://travis-ci.org/davide-casiraghi/bootstrap-accordion-integrator"><img src="https://travis-ci.org/davide-casiraghi/bootstrap-accordion-integrator.svg" alt="Build Status"></a>
[![StyleCI](https://styleci.io/repos/175197548/shield?style=flat-square)](https://styleci.io/repos/175197548)


The library replace all the occurrences of this snippet
```
{# gallery src=[holiday_images/london] width=[400] height=[300] #}
```
With the HTML code of a responsive gallery.
```html
example code here
```


## Installation

To use the package you should import it trough composer.

```bash
composer require davide-casiraghi/laravel-responsive-gallery
```

## Load the CSS and JS files

### With Laravel

#### Publish the JS, CSS and IMAGES
It's possible to customize the scss and the js publishing them in your Laravel application.

```php artisan vendor:publish```

This command will publish in your application this folders:
- /resources/scss/vendor/laravel-responsive-gallery/
- /resources/js/vendor/laravel-responsive-gallery/
- /public/vendor/laravel-responsive-gallery/images/

#### Load the JS file
In your app.js file you can require the accordion.js file before the Vue object get instanciated:

```
require('./bootstrap');
window.Vue = require('vue');
require('./vendor/laravel-responsive-gallery/accordion');
window.myApp = new Vue({
el: '#app'
});
```


## Usage

Import from the vendor folder of the package the SCSS and the JS.

Then to replace all the occurrance of the accordion snippets:

```php
$accordion = new AccordionFactory('caret-svg');
$accordion->replace_accordion_strings_with_template($body);
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://github.com/davide-casiraghi/bootstrap-accordion-integrator/blob/master/LICENSE.md)

0 comments on commit 50fb880

Please sign in to comment.