getgrav / grav-plugin-lightslider Goto Github PK
View Code? Open in Web Editor NEWGrav LightSlider Plugin
Home Page: https://getgrav.org
License: MIT License
Grav LightSlider Plugin
Home Page: https://getgrav.org
License: MIT License
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 puts transparent dark layer by default over images. Couldn't find the corresponding css code or plugin settings.
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.
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,
});
});
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
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
in the shop skeleton site, changing:
controls: true
to
controls: false
in ../user/pages/slider/lightslider.md
does not disable the controls.
How reduce speed slide changes - in config dont work
Hello,
i couldn't find a way to overwrite the properties speed and auto. I changed the values on the slider content page at the user/config/plugins page.
Would you guys be willing/able to add support for shortcodes to this LightSlider plugin?
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.
Hi, how can I set slider to responsively stick to bottom of viewport?
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!
I'm aware of an issue where the default plugin configuration is not being merged properly with the modular page configuration. This needs to be investigated as currently the page settings are the only settings that are taking effect.
Hi,
I'm initialization the function on true condition on select drop down, but not able to destroy the same on else condition.
pls help me.
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 ;-)
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 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?
in the shop skeleton site, changing:
pager: true
to
pager: false
in ../user/pages/slider/lightslider.md
does not disable the 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
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!
Gravs standard theme has a fixed menu bar at the top with a z-index of 2. The pager dots have a z-index of 100 and overlay it while scrolling.
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
In main features you have mentioned "Full callback API and public methods". How to use that API?
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.
This causes multiple lightsliders to break. Should be generated automatically.
Latest release 1.5.2
https://getgrav.org/downloads/plugins#
download link points to release 1.5.1 (changelog shows 1.5.2)
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.
When opening the demo site https://demo.getgrav.org/shop-skeleton/ the following error is thrown:
0 - Property 'grav\common\assets\css_pipeline_before_excludes' does not exist in the object!
The links in Injecting lightSlider into a non-modular Page point to http://github.com/grav/grav-skeleton-shop-site/archive/master.zip
and they should point to http://github.com/getgrav/grav-skeleton-shop-site/archive/master.zip
.
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} [] []
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.