Three issues with Learn2 theme

Hi,

I did install the latest release of the learn2 theme for my site, but the menu leftside menu is not behaving as expected:

  • menu scroll is not present/active
  • checks on the sections/subsections already read is not present/active
    I looked through the config files but found no way to activate them. Is there something special to be done ?

Also, in several of my docs.md, I want to ingrate <input> fields. It works great, but the system systematically places these inputs on separate lines, which is not what I want.

For instance, this code in docs.md:

This is an example of a texte with an input <input type="number" style="color:#20b030; width: 80px" value="10"> to be manipulated by the user.

results in this:

I’d like/need for the text and the inut to remain on a single line… How can I enforce that ?

Thanks,
Xavier

Menu scrolls and checks were due to me including a newer version of jquery in base.html.twig. It does obviously break something.

For your ‘input’ problem, try adding elements around them and see if they stay in the same line or not :slight_smile: (they should)

Thanks, RobLui. But isn’t it what I do when writing all the text on a single MD line.

E.g. this is the full docs.md of my section:

---
title: Explanation
taxonomy:
    category: docs
---

With an initial test of one variables:
Enter the value you need in the field <input style="width: 80px" type="number" id="amount" onchange="valueUpdate('amount')"> and then see what happens.
When you leave the input field, a function is triggered which automatically memorizes the value.
And so be it

It results in:

So, what else should I put around ? Thanks for any hint…
Xavier


This is how it renders out for me, is your class around it too small for it to fully display on the same line?

This is my own code: (didn’t make a difference tho with or without the span element)

With an initial test of one variables:
Enter the value you need in the field <span><input style=“width: 80px” type=“number” id=“amount” onchange=“valueUpdate(‘amount’)”> </span> and then see what happens.
When you leave the input field, a function is triggered which automatically memorizes the value.
And so be it

How weird. With or without span, me it keeps making it on a separate line.
And I’ve not defined any specific class, I simply use the Learn2 theme.

I just tried on another site I have with the Tessellate theme, and there is no problem there.

The example you showed me, is it also within a Learn2 theme ? If yes, this is puzzling. If not, then it could mean that it is an issue with some classes defined by the theme…
Thanks for your help,
Xavier

Tested it with the learn2 theme wich seems to give style elements from within the the itself, a way to surpass this is with just adding the ‘inline-block’ style to your element :slight_smile:

Tested & working bypass:

With an initial test of one variables:
Enter the value you need in the field <input style=“width: 80px; display:inline-block;” type=“number” id=“amount” onchange=“valueUpdate(‘amount’)”> and then see what happens.
When you leave the input field, a function is triggered which automatically memorizes the value.
And so be it

Thanks a lot.
It does indeed solve the issue and keep the input field in the text. It creates a larger line space before and after the line though, but I’m sure this is a matter of also playing with other style parameters.
Thanks again, @RobLui

1 Like