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 Issues

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.

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.

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,
});
});

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

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

Add shortcode support.

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

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.

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!

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 ;-)

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

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?

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

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!

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

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.

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.

"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} [] []

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.