Giter Site home page Giter Site logo

getgrav / grav-plugin-lightslider Goto Github PK

View Code? Open in Web Editor NEW
14.0 7.0 15.0 400 KB

Grav LightSlider Plugin

Home Page: https://getgrav.org

License: MIT License

CSS 13.62% JavaScript 77.12% PHP 2.85% HTML 6.42%
grav grav-plugin lightslider slider slideshow jquery

grav-plugin-lightslider's Introduction

Grav lightSlider Plugin

Grav lightSlider

lightslider is a Grav plugin that adds a lightweight, responsive slider to your page. It uses the jQuery plugin lightSlider that provides loads of great features but is still light-weight and responsive.

Main Features

  • Main Features
  • Fully responsive - will adapt to any device.
  • Separate settings per breakpoint.
  • Gallery mode to create an image slideshow with thumbnails
  • Supports swipe and mouseDrag
  • Add or remove slides dynamically.
  • Small file size (9kb) (minified), fully themed, simple to implement.
  • CSS transitions with jQuery fallback.
  • Full callback API and public methods.
  • Auto play and infinite loop to create a content carousel.
  • Keyboard, arrows and dots navigation.
  • Chrome, Safari, Firefox, Opera, IE7+, IOS, Android, windows phone.
  • Slide and Fade Effects.
  • Auto width, Vertical Slide, Adaptiveheight, Rtl support...
  • Multiple instances on one page.
  • Slide anything (youtube, vimeo , google map ...)

Installation

Installing the lightSlider plugin can be done in one of two ways. Our GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file.

GPM Installation (Preferred)

The simplest way to install this plugin is via the Grav Package Manager (GPM) through your system's Terminal (also called the command line). From the root of your Grav install type:

bin/gpm install lightslider

This will install the lightSlider plugin into your /user/plugins directory within Grav. Its files can be found under /your/site/grav/user/plugins/lightslider.

Manual Installation

To install this plugin, just download the zip version of this repository and unzip it under /your/site/grav/user/plugins. Then, rename the folder to lightslider. You can find these files either on GitHub or via GetGrav.org.

You should now have all the plugin files under

/your/site/grav/user/plugins/lightslider

NOTE: This plugin is a modular component for Grav which requires Grav, the Error and Problems plugins, and a theme to be installed in order to operate.

Usage

To best understand how lightSlider works, you should read through the original project documentation.

This plugin is provided as a modular page within Grav. That modular page created should be called lightslider.md so that it will automatically use the lightslider twig template already provided in the plugin.

The plugin has two primary modes. Those are text and image mode.

Text Mode

In this mode you can create content for each slider. Each section of slide content is defined as a single Grav page, but you divide the slides up using the markdown --- syntax to signify a thematic break.

When in text mode, the lightslider template automatically looks for images of the format: image-1.jpg, image-2.jpg, image-3.jpg, etc. It will associate each section of the page content to each image in order.

Image Mode

In image mode, every file in the folder of the page will be picked up and used for the slider in file-order, usually alphabetical. In other words, if you wish a specfic order, prefix your filenames with a numeric value. For example: 01.ducks.jpg, 02.fish.jpg, etc.

Options

The default lightslider.yaml file looks like this:

enabled: true
built_in_css: true
slider_type: text
type_text_height: auto
type_text_vertical_padding: 80px
type_text_horizontal_padding: 50px
type_text_brightness: 0
item: 1
slideMove: 1
slideMargin: 0
centerSlide: 'false'
loop: 'false'
mode: 'fade'
controls: 'true'
keyPress: 'true'
auto: 'false'
pause: 2000
speed: 1000
pager: 'true'
gallery: 'false'
gallery_thumb_width: 100
gallery_thumb_height: 100
gallery_margin: 15
gallery_thumb_margin: 5
enableTouch: 'true'
enableDrag: 'true'
pauseOnHover: 'false'

You can copy this file and override any defaults you wish in a file called user/config/plugins/lightslider.yaml. However, the preferred approach is to set lightslider options directly in the header of your lightslider.md page file that should sit in the same directory as your images. For example you could have a page such as:

---
title: Slider Content
routable: false
visible: false
lightslider:
    slider_type: text
    type_text_vertical_padding: 70px;
    type_text_horizontal_padding: 50px;
    type_text_brightness: -100
    mode: slide
    pager: 'true'
    controls: 'true'
    keyPress: 'true'
    pause: 2000
    speed: 1000
---

# Shop Geek Stuff
## We have all your **geek** needs covered..
___
# SnipCart Powered
## **Grav** plus **SnipCart** equals easy shopping
___
# A Huge Variety
## A great selection of **bits** and **bobs**

Here is a breakdown of lightSlider's options you can use in this plugin:

Plugin Options

Option Description
slider_type Either text or image. See above for more information
type_text_height CSS attribute for height. Defaults to auto but could be 300px
type_text_vertical_padding CSS attribute for vertical padding. Defaults to 80px
type_text_horizontal_padding CSS attribute for horizontal padding. Defaults to 50px
type_text_brightness Optional brightness value ranging from daker -255 to lighter 255 where 0 is no change

lightSlider Options

Option Description
item The number of slides to show at a time
slideMove This option sets the number of slides moved at a time. The default setting is 1.
slideMargin This option sets the spacing between each slide.
centerSlide This option centers the active slide within the slider, rather than positioning it on the left side of the slider.
mode Sets the transition mode. Your options are slide and fade.
cssEasing Type of easing to be used for css animations. defaults to ease
easing Type of easing to be used for jquery animations. defaults to linear
speed Sets the time (in milliseconds) of the transition between slides.
auto Sets whether or not automatic transitions is enabled. Can be set to 'true' or 'false'.
loop Sets whether or not to loop the slides or stop at the last slide. Can be set to 'true' or 'false'.
pause Sets the time (in milliseconds) between automatic transitions.
controls Enables the front-end controls, giving visitors the ability to switch between slides. Can be set to 'true' or 'false'.
keyPress Enables keyboard navigation between slides. Can be set to 'true' or 'false'.
adaptiveHeight Dynamically adjust slider height based on each slide's height. Can be set to 'true' or 'false'.
vertical change slide's direction from horizontal to Vertical. Can be set to 'true' or 'false'.
verticalHeight set height of slider if vertical mode is active and item more than 1. Defaults to 500
pager Toggles the pagination that appears along with the lightSlider. Can be set to 'true' or 'false'.
gallery Enables gallery style thumbnail pager (will disable standard pager). Can be set to 'true' or 'false'.
galleryMargin Vertical space between the bottom of the slider and the gallery. Defaults to 5
thumbMargin Horizontal space between the gallery thumbnails. Defaults to 5
enableTouch Enables touch support for touch-enabled devices. Can be set to 'true' or 'false'.
enableDrag Enables desktop mouse drag support. Can be set to 'true' or 'false'.
pauseOnHover Sets whether or not it should pause the transitions on hover. Can be set to 'true' or 'false'.

Note: The settings of 'true' and 'false' require single or double quotes in order to work properly.

You can find more variables, as well as information on how to use them on the the original lightSlider project documentation.

This page also contains three sections defined by the ___ separator. Each section will be associated with an image provided alongside this lightslider.md file. For example the first section will be displayed on top of image-1.jpg image file.

Injecting lightSlider into a non-modular Page

Just because lightSlider is designed to run on a modular page, doesn't mean it has to be.

In our Shop Site Skeleton, we faked a modular page by adding a string that tells Grav to find our lightSlider page and load it as page to the included modular/lightslider.html.twig template.

Here is the string we used in the snipcart.html.twig file which acts as the template file for the front page of the Shop Site Skeleton.

{% include 'modular/lightslider.html.twig' with {'page': page.find('/slider')} %}

Our lightSlider page, which was located in /your/site/grav/user/pages/slider, was set up as any other modular lightSlider page.

Note: If you want to see this plugin in action, have a look at our Shop Site Skeleton

Updating

As development for lightSlider continues, new versions may become available that add additional features and functionality, improve compatibility with newer Grav releases, and generally provide a better user experience. Updating lightSlider is easy, and can be done through Grav's GPM system, as well as manually.

GPM Update (Preferred)

The simplest way to update this plugin is via the Grav Package Manager (GPM). You can do this with this by navigating to the root directory of your Grav install using your system's Terminal (also called command line) and typing the following:

bin/gpm update lightslider

This command will check your Grav install to see if your lightSlider plugin is due for an update. If a newer release is found, you will be asked whether or not you wish to update. To continue, type y and hit enter. The plugin will automatically update and clear Grav's cache.

Manual Update

Manually updating lightSlider is pretty simple. Here is what you will need to do to get this done:

  • Delete the your/site/user/plugins/lightslider directory.
  • Downalod the new version of the lightSlider plugin from either GitHub or GetGrav.org.
  • Unzip the zip file in your/site/user/plugins and rename the resulting folder to lightslider.
  • Clear the Grav cache. The simplest way to do this is by going to the root Grav directory in terminal and typing bin/grav clear-cache.

Note: Any changes you have made to any of the files listed under this directory will also be removed and replaced by the new set. Any files located elsewhere (for example a YAML settings file placed in user/config/plugins) will remain intact.

grav-plugin-lightslider's People

Contributors

flaviocopes avatar hughbris avatar jlehtinen avatar mahagr avatar michael712 avatar nhayward avatar rhukster avatar ryanmpierson avatar samuelstein avatar w00fz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

grav-plugin-lightslider's Issues

Top menu

Top menu won't appear until scrolling to +/- 10% of the lightslider image(s). Any idea how to resolve this? I've tried going over the (s)css which seems to look fine to me. Example can be found at http://www.moerman.cc

EDIT: Found the issue, solved with a custom CSS!

Add shortcode support.

Would you guys be willing/able to add support for shortcodes to this LightSlider plugin?

"Given type (PNG) is not valid" after updated to Grav 1.7.0-rc.10

Hello,

After updated to Grav 1.7.0-rc.10 from rc.8,
I got a error page below,

Server Error
Sorry, something went terribly wrong!

0 - An exception has been thrown during the rendering of a template ("Given type (PNG) is not valid").

The page was written in modular format,
{% include 'modular/lightslider.html.twig' with {'page': page.find('/information/godo/fireservice/_slide')} %}
And I put PNGs into /information/godo/fireservice/_slide Folder.

The error log line is below.
I'm sorry just only a report.

[2020-05-07 10:32:22] grav.CRITICAL: An exception has been thrown during the rendering of a template ("Given type (PNG) is not valid"). - Trace: #0 C:\inetpub\grav\vendor\twig\twig\src\Template.php(422): Twig\Template->displayWithErrorHandling(Array, Array) #1 C:\inetpub\grav\cache\twig\fb\fb84dda545aecd082015d3823be7df6ffbfac6ce2f52a688dadcafd81914e09c.php(36): Twig\Template->display(Array) #2 C:\inetpub\grav\vendor\twig\twig\src\Template.php(455): __TwigTemplate_f1fc81be788204fa9cc3c10c9fb220f5420b1005e6b0759acb204c4670934b68->doDisplay(Array, Array) #3 C:\inetpub\grav\vendor\twig\twig\src\Template.php(422): Twig\Template->displayWithErrorHandling(Array, Array) #4 C:\inetpub\grav\vendor\twig\twig\src\Template.php(434): Twig\Template->display(Array) #5 C:\inetpub\grav\vendor\twig\twig\src\TemplateWrapper.php(47): Twig\Template->render(Array, Array) #6 C:\inetpub\grav\vendor\twig\twig\src\Environment.php(384): Twig\TemplateWrapper->render(Array) #7 C:\inetpub\grav\system\src\Grav\Common\Twig\Twig.php(299): Twig\Environment->render('@Page:D:/inetpu...', Array) #8 C:\inetpub\grav\system\src\Grav\Common\Page\Page.php(903): Grav\Common\Twig\Twig->processPage(Object(Grav\Common\Page\Page), '<h2>\xE6\xB6\x88\xE9\x98\xB2\xE8\xA8\xAD\xE5\x82...') #9 C:\inetpub\grav\system\src\Grav\Common\Page\Page.php(754): Grav\Common\Page\Page->processTwig() #10 C:\inetpub\grav\system\src\Grav\Common\Twig\Twig.php(376): Grav\Common\Page\Page->content() #11 C:\inetpub\grav\system\src\Grav\Common\Service\OutputServiceProvider.php(28): Grav\Common\Twig\Twig->processSite('html') #12 C:\inetpub\grav\vendor\pimple\pimple\src\Pimple\Container.php(118): Grav\Common\Service\OutputServiceProvider->Grav\Common\Service\{closure}(Object(Grav\Common\Grav)) #13 C:\inetpub\grav\system\src\Grav\Common\Processors\RenderProcessor.php(30): Pimple\Container->offsetGet('output') #14 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(45): Grav\Common\Processors\RenderProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #15 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(57): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #16 C:\inetpub\grav\system\src\Grav\Common\Processors\DebuggerAssetsProcessor.php(29): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #17 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(45): Grav\Common\Processors\DebuggerAssetsProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #18 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(57): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #19 C:\inetpub\grav\system\src\Grav\Common\Processors\PagesProcessor.php(71): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #20 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(45): Grav\Common\Processors\PagesProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #21 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(57): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #22 C:\inetpub\grav\system\src\Grav\Common\Processors\TwigProcessor.php(29): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #23 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(45): Grav\Common\Processors\TwigProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #24 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(57): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #25 C:\inetpub\grav\system\src\Grav\Common\Processors\AssetsProcessor.php(30): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #26 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(45): Grav\Common\Processors\AssetsProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #27 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(57): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #28 C:\inetpub\grav\system\src\Grav\Common\Processors\SchedulerProcessor.php(31): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #29 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(45): Grav\Common\Processors\SchedulerProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #30 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(57): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #31 C:\inetpub\grav\system\src\Grav\Common\Processors\BackupsProcessor.php(30): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #32 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(45): Grav\Common\Processors\BackupsProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #33 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(57): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #34 C:\inetpub\grav\system\src\Grav\Common\Processors\TasksProcessor.php(60): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #35 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(45): Grav\Common\Processors\TasksProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #36 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(57): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #37 C:\inetpub\grav\system\src\Grav\Common\Processors\RequestProcessor.php(54): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #38 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(45): Grav\Common\Processors\RequestProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #39 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(57): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #40 C:\inetpub\grav\system\src\Grav\Common\Processors\ThemesProcessor.php(29): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #41 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(45): Grav\Common\Processors\ThemesProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #42 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(57): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #43 C:\inetpub\grav\system\src\Grav\Common\Processors\PluginsProcessor.php(30): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #44 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(45): Grav\Common\Processors\PluginsProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #45 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(57): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #46 C:\inetpub\grav\system\src\Grav\Common\Processors\InitializeProcessor.php(110): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #47 C:\inetpub\grav\system\src\Grav\Common\Debugger.php(529): Grav\Common\Processors\InitializeProcessor::Grav\Common\Processors\{closure}() #48 C:\inetpub\grav\system\src\Grav\Common\Processors\InitializeProcessor.php(111): Grav\Common\Debugger->profile(Object(Closure)) #49 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(45): Grav\Common\Processors\InitializeProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #50 C:\inetpub\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(57): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #51 C:\inetpub\grav\system\src\Grav\Common\Grav.php(249): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #52 C:\inetpub\grav\index.php(58): Grav\Common\Grav->process() #53 {main} [] []

Admin plugin does not find lightslider template

This plugin is provided as a modular page within Grav. That modular page created should be called lightslider.md so that it will automatically use the lightslider twig template already provided in the plugin.

When I add photos to the lightslider.md file with the admin plugin, the file gets renamed to features.md and therefore the slider does not work anymore :(
This is due the admin plugin dos not find the lightslider template, it is not offered in the dropdown menu where one can select the site template.

Can't disable pager

Hi, I can't disable the pager indicators in the settings and I think it would be good if they could also be moved to overlay the image

Use grav Image.html() function to create slideshow-image

Instead of hard-coding the html in lightslider.html.twig it would be better to insert something like
{{image.html(image.basename,image.basename)}} more flexible and the slider's img-tag gets a title-value and alt-value ontop ;-)

Autoplay stops after clicking the pager

Clicking the next/prev pager works, but autoplay stops working. I've checked the plugin configurations, but seems like there's no configuration there like "enable/disable pause on controls". Is there any other way to continue the slider upon clicking the pager?

Below is my current configuration:

$(document).ready(function() {
$("#Slider-ID").lightSlider({
item: 1,
slideMove: 1,
slideMargin: 0,
mode: 'fade',
cssEasing: 'ease',
easing: '',
speed: 1500,
auto: true,
loop: true,
pause: 6000,
controls: true,
keyPress: true,
adaptiveHeight: true,
vertical: false,
verticalHeight: 500,
pager: false,
gallery: false,
galleryMargin: 15,
thumbMargin: 5,
enableTouch: true,
enableDrag: false,
});
});

addint text and buttons

Hi guys,
not an issue per say but...

I'm struggling with adding text and buttons with specific links to the twig file.

any ideas / shortcuts are appreciated a lot.

thanks in advance

Error 404, Woops. Looks like this page doesn't exist. Or 400 - Template "lightslider.html.twig" is not defined.

I cannot get it to show a page. It is one of main pages, listed on the front/home page. It is accessible only by a permission iaw. Login plugin.
When I have in page code routable: false it shows 404, no logon attempt is made.
When I have in page code routable: true it shows 400 after logon.
I have tried putting the template in various places, but it still doesn't work. Not sure if that is the problem, or there is something wrong with the modular necessity to further configure manually, which could of course be done automatically.
The best result I got was by putting lightslider.html.twig into grav/user/themes/antimatter/templates. But then I just had a small top portion (header module) of one of my images I had placed in all three modules subfolders of the page.
It should be more clearly documented, what has to be moved where for what endresult. Or even better - scripted to be done at install or confugurable via admin interface.

jQuery 3 not working

This is an easy fix, it just needs to be updated the lightslider.js to version 1.1.6 which fixes the issues with jQuery 3.1 and I checked it works with the latest 3.5.1 as well.
I updated it on my local version of the plugin but it would be nice to have the official version updated as well.

Disable lightslider

Hello,

Is there a method or a property or a way to disable (de-initializa) lightslider once is inisalized ? I whant to disable the slider for small resolutions (mobileview).

Thank you

z-index issue when using fade mode

Hi,

when using the antimatter grav theme and the lightslider I found that using fade mode on a modular page results in some weird issue where the images fade in on top of the navigation menu when scrolling down.

The entire system is a fresh install with no modifications to any of the twig files except a slight change to modular which detected if the current page is home() and then shows the siblings in the menu.

Slider images darkening

Is there any way to instruct plugin not to preprocess slider images making it much darker than originals?

It is hard to control the final look of the slider this way, and if we wish to achieve the result as in the mockups sent by our designers we need to overexpose their images and degrade it significantly this way just to be able to get closer to our initial idea.

Please advise as I am sure there is a lot of other users frustrated by this particular plugin's feature.

Thanks!

plugin fails to perform after latest Grav Core update

Hi,
The plugin had been working fine before I updated Grav Core. After that I created a fresh instance using Agency Skeleton and enabled the plugin again without creating any slider and could see that simply enabling the plugin results in following error on console:

ReferenceError: jQuery is not defined[Learn More] lightslider.min.js:4:1
    <anonymous> https://www.tld.com/user/plugins/lightslider/js/lightslider.min.js:4

I am not sure what I should do to fix this and as it is even happening on a fresh install as well I think this may have something to do with the latest Grav update that may have broken something on this plugin.

lightslider only works after reloading the page

Hello,

I installed the lightslider plugin on my Grav page and I have to reload the page everytime for the lightslider to show up. I am fairly new to coding and took the page over from our coder who left the company.

Please tell me if you need additional information.

Kind regards
Tristan

Example header has semicolons, twig template does not.

Hi - nice work on the slider. Just installed and playing about with it a little.

I am using a slider type of 'text' and the demo header information from the read me and the skeleton.

I notice these files have the following options:

type_text_vertical_padding: 70px;
type_text_horizontal_padding: 50px;

Using the provided template, this gives:

<div class="panel-padding " style=" padding: 70px; 50px; ">
Which causes an error.

Removing the semi-colons from the header, and changing the twig file from:

<div class="panel-padding {{ settings.type_text_css_class }}" style="
padding: {{ settings.type_text_vertical_padding|default(0) }} {{ settings.type_text_horizontal_padding|default(0) }}
">

to:

<div class="panel-padding {{ settings.type_text_css_class }}" style="
padding: {{ settings.type_text_vertical_padding|default(0) }} {{ settings.type_text_horizontal_padding|default(0) }};
">
(eg. adding a semicolon to the end of the second line. Or third line as rendered here )
seems to work without complications.

Cheers

Lightslider shows static images but no slider

Lightslider is installed correctly, and I'm trying it with the sample code so everything should be working. It displays the sample images and text as a static vertical list. But there's no slider. I checked Google Chrome's console and it shows this error:

`Uncaught TypeError: $(...).lightSlider is not a function

at HTMLDocument.<anonymous> (mod-page-test:106)

at i (jquery-2.x.min.js:2)

at Object.fireWith [as resolveWith] (jquery-2.x.min.js:2)

at Function.ready (jquery-2.x.min.js:2)

at HTMLDocument.J (jquery-2.x.min.js:2)`

Why is it generating this error? And how can I fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.