|
1 | 1 | # Silverstripe Elemental Carousel |
2 | 2 |
|
3 | | -A block to implement dynamic/silverstripe-carousel, a simple carousel for Silverstripe in Bootstrap |
4 | | - |
5 | | -[](https://github.com/dynamic/silverstripe-elemental-carousel/actions/workflows/ci.yml) |
6 | | -[](https://codecov.io/gh/dynamic/silverstripe-elemental-carousel) |
7 | | - |
8 | | -[](https://packagist.org/packages/dynamic/silverstripe-elemental-carousel) |
9 | | -[](https://packagist.org/packages/dynamic/silverstripe-elemental-carousel) |
10 | | -[](https://packagist.org/packages/dynamic/silverstripe-elemental-carousel) |
11 | | -[](https://packagist.org/packages/dynamic/silverstripe-elemental-carousel) |
| 3 | +An Elemental block to implement [dynamic/silverstripe-carousel](https://github.com/dynamic/silverstripe-carousel), allowing you to add a carousel to your Silverstripe CMS website. This module integrates with [Silverstripe Elemental](https://github.com/silverstripe/silverstripe-elemental), providing a flexible way to display multiple images or videos in a dynamic and customizable carousel format. |
| 4 | + |
| 5 | +[](https://github.com/dynamic/silverstripe-elemental-carousel/actions/workflows/ci.yml) |
| 6 | +[](https://packagist.org/packages/dynamic/silverstripe-elemental-carousel) |
| 7 | +[](https://packagist.org/packages/dynamic/silverstripe-elemental-carousel) |
| 8 | +[](https://packagist.org/packages/dynamic/silverstripe-elemental-carousel) |
| 9 | + |
| 10 | +## Table of Contents |
| 11 | + |
| 12 | +- [Requirements](#requirements) |
| 13 | +- [Installation](#installation) |
| 14 | +- [Configuration](#configuration) |
| 15 | +- [Usage](#usage) |
| 16 | + - [Adding an Elemental Carousel Block](#adding-an-elemental-carousel-block) |
| 17 | + - [Working with Images and Videos](#working-with-images-and-videos) |
| 18 | +- [Customization](#customization) |
| 19 | + - [Creating Custom Templates](#creating-custom-templates) |
| 20 | +- [Related Modules](#related-modules) |
| 21 | +- [Maintainers](#maintainers) |
| 22 | +- [Bugtracker](#bugtracker) |
| 23 | +- [Development and Contribution](#development-and-contribution) |
| 24 | +- [License](#license) |
12 | 25 |
|
13 | 26 | ## Requirements |
14 | 27 |
|
15 | | -* Silverstripe CMS ^5.0 |
16 | | -* dnadesign/silverstripe-elemental: ^5.0 |
17 | | -* dynamic/silverstripe-carousel: ^2.0 |
| 28 | +- Silverstripe CMS ^5.0 |
| 29 | +- [dnadesign/silverstripe-elemental](https://github.com/dnadesign/silverstripe-elemental) ^5.0 |
| 30 | +- [dynamic/silverstripe-carousel](https://github.com/dynamic/silverstripe-carousel) ^2.0 |
18 | 31 |
|
19 | 32 | ## Installation |
20 | 33 |
|
21 | | -`composer require dynamic/silverstripe-elemental-carousel` |
| 34 | +Install via Composer: |
22 | 35 |
|
23 | | -## License |
| 36 | +```sh |
| 37 | +composer require dynamic/silverstripe-elemental-carousel |
| 38 | +``` |
| 39 | + |
| 40 | +Run a dev/build to regenerate the manifest: |
| 41 | + |
| 42 | +```sh |
| 43 | +./vendor/bin/sake dev/build |
| 44 | +``` |
| 45 | + |
| 46 | +## Configuration |
24 | 47 |
|
25 | | -See [License](LICENSE.md) |
| 48 | +After installation, the `ElementCarouselBlock` will be available for use within the Silverstripe Elemental editor. |
26 | 49 |
|
27 | 50 | ## Usage |
28 | 51 |
|
29 | | -An Elemental block to display an image with a title, caption and link. The image can be a single image or a carousel of images. |
| 52 | +### Adding an Elemental Carousel Block |
30 | 53 |
|
31 | | -### Template Notes |
| 54 | +1. In the CMS, navigate to a page where Elemental blocks are enabled. |
| 55 | +2. Click **Add Block** and select **Carousel Block**. |
| 56 | +3. Use the block settings to configure the carousel. |
32 | 57 |
|
33 | | -The default template assumes you are using [Bootstrap 5](https://getbootstrap.com/), and requires no additional javascript. If you are not using Bootstrap, you can use a custom template and include your own javascript. |
| 58 | +### Working with Images and Videos |
34 | 59 |
|
35 | | -## Getting more elements |
| 60 | +The block supports two types of content: |
36 | 61 |
|
37 | | -See [Elemental modules by Dynamic](https://github.com/orgs/dynamic/repositories?q=elemental&type=all&language=&sort=) |
| 62 | +- **Images**: Upload and display a sequence of images. |
| 63 | +- **Videos**: Embed video links from YouTube, Vimeo, or other platforms. |
38 | 64 |
|
39 | | -## Configuration |
| 65 | +To add content: |
| 66 | +1. Open the **Carousel Block** in the CMS. |
| 67 | +2. Click **Add Slide** and select an Image or Video. |
| 68 | +3. If adding an Image: |
| 69 | + - Upload an image. |
| 70 | + - Optionally, add a caption or link. |
| 71 | +4. If adding a Video: |
| 72 | + - Provide the video URL. |
| 73 | + - Optionally, add a caption. |
| 74 | + |
| 75 | +## Customization |
| 76 | + |
| 77 | +### Creating Custom Templates |
| 78 | + |
| 79 | +The default template assumes you are using [Bootstrap 5](https://getbootstrap.com/). If you are not using Bootstrap, you can create a custom template: |
| 80 | + |
| 81 | +1. **Locate the Default Template** |
| 82 | + The default template is located at: |
| 83 | + ``` |
| 84 | + templates/Dynamic/ElementalCarousel/Includes/CarouselBlock.ss |
| 85 | + ``` |
| 86 | + |
| 87 | +2. **Copy to Your Theme** |
| 88 | + Copy the `CarouselBlock.ss` file to your theme’s directory: |
| 89 | + ``` |
| 90 | + themes/your-theme/templates/Dynamic/ElementalCarousel/Includes/CarouselBlock.ss |
| 91 | + ``` |
40 | 92 |
|
41 | | -See [SilverStripe Elemental Configuration](https://github.com/silverstripe/silverstripe-elemental#configuration) |
| 93 | +3. **Modify the Template** |
| 94 | + Edit the copied `CarouselBlock.ss` file to: |
| 95 | + - Adjust the HTML structure. |
| 96 | + - Modify CSS classes. |
| 97 | + - Add or remove elements. |
| 98 | + |
| 99 | +4. **Include Necessary Assets** |
| 100 | + Ensure your project includes JavaScript or CSS required for the carousel. |
| 101 | + |
| 102 | +For more details, refer to the [Silverstripe CMS Documentation](https://docs.silverstripe.org/en/5/developer_guides/templates/). |
| 103 | + |
| 104 | +## Related Modules |
| 105 | + |
| 106 | +This module is part of a suite of Elemental modules. Other modules that use `silverstripe-carousel` include: |
| 107 | + |
| 108 | +- [Silverstripe Carousel](https://github.com/dynamic/silverstripe-carousel) |
| 109 | +- [Silverstripe Elemental Blocks](https://github.com/dnadesign/silverstripe-elemental) |
| 110 | + |
| 111 | +For additional Elemental modules, see [Dynamic’s Elemental Modules](https://github.com/orgs/dynamic/repositories?q=elemental&type=all&language=&sort=). |
42 | 112 |
|
43 | 113 | ## Maintainers |
44 | 114 |
|
45 | | - * [Dynamic ](https://www.dynamicagency.com) ( <[email protected]>) |
| 115 | +- [Dynamic ](https://www.dynamicagency.com) ( <[email protected]>) |
46 | 116 |
|
47 | 117 | ## Bugtracker |
48 | | -Bugs are tracked in the issues section of this repository. Before submitting an issue please read over |
49 | | -existing issues to ensure yours is unique. |
50 | 118 |
|
51 | | -If the issue does look like a new bug: |
| 119 | +Bugs are tracked in the issues section of this repository. Before submitting an issue, please review existing issues to ensure yours is unique. |
52 | 120 |
|
53 | | - - Create a new issue |
54 | | - - Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots |
55 | | - and screencasts can help here. |
56 | | - - Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, |
57 | | - Operating System, any installed SilverStripe modules. |
| 121 | +If the issue appears to be new: |
| 122 | + |
| 123 | +- Create a new issue. |
| 124 | +- Describe the steps required to reproduce your issue and the expected outcome. Unit tests, screenshots, and screencasts can help here. |
| 125 | +- Provide details about your environment: |
| 126 | + - Silverstripe version |
| 127 | + - Browser and version |
| 128 | + - PHP version |
| 129 | + - Operating system |
| 130 | + - Any installed Silverstripe modules |
| 131 | + |
| 132 | +**Security Issues:** |
| 133 | +Please report security issues to the module maintainers directly. Avoid filing security issues in the bugtracker. |
| 134 | + |
| 135 | +## Development and Contribution |
| 136 | + |
| 137 | +We welcome contributions! Please ensure you raise a pull request and discuss with the module maintainers. |
| 138 | + |
| 139 | +## License |
58 | 140 |
|
59 | | -Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker. |
| 141 | +This module is licensed under the BSD-3-Clause License. See the [LICENSE](LICENSE.md) file for details. |
60 | 142 |
|
61 | | -## Development and contribution |
62 | | -If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers. |
|
0 commit comments