Skip to content
Grav 2.0 is officially stable. Read the announcement →
Themes & Styling

Quark blog: replace Hero image with LightSlider

theme

Solved by Jose View solution

Started by Jose 5 years ago · 1 replies · 983 views
5 years ago

Hello,
I was able to place LightSlider script in place of the hero image of Blog Skeleton with Quark theme, unfortunately, for some reason I lose control on the summaries section of Blog page, I must be doing something wrong but I was not able to debug it.

Then I tried to use the LightSlider plugin but it is a modular page and the Blog is not modular, and unfortunately I do not get the way to make it work with the Blog template.

I wonder if is there a tutorial on how to replace the hero image, of Quark Theme, for the LightSlider script.

What I did is in this post, and many more unsuccessful tests afterwards,
/forum/themes-styling/css-in-frontmatter-in-mache-theme-works-but-no-in-quark-theme-t8045

I would appreciate if someone can show me the right way to attach LightSlider, without causing problems to the summaries section of the Blog Skeleton within Quark theme inherited. Thanks.

5 years ago Solution

Hello,
Finally it was not so difficult, as per the documentation in Cookbook > General Recipes
Unfortunately I do not cook 😆
https://learn.getgrav.org/17/cookbook/general-recipes#creating-a-simple-gallery
I quote the information I was missing:

For a modular gallery to be displayed inside another page, remove the following code from the Twig file in order to make it work:

TWIG
{% extends 'partials/base.html.twig' %}

{% block content %}
    {{ page.content|raw }}

and

{% endblock %}

TXT

I removed the extends tag but I let the block tag for the LisghtSlider code, and is working fine now.

I had the task done pretty close since the first time, but I had an extra line, that is in my post describing the replacement of Hero image with LightSlider script, I removed and it worked fine, no more conflicts with the Blog summaries section:

2.- lightslider.html.twig

TWIG
{% extends 'blog.html.twig' %}

/forum/themes-styling/css-in-frontmatter-in-mache-theme-works-but-no-in-quark-theme-t8045

One thing that intrigue me is that I do not see the code of the LightSlider in the source of the blog webpage 🤔, I must keep studying and trying to better understand Grav functioning and Documentation, that is very good, and extensive.
I apologize to all the programmers in this forum for my novice questions.

Thanks and regards.

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 233 2 months ago
Themes & Styling · by Ian, 2 months ago
3 121 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 486 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 74 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 154 3 months ago