Progress bar animation

Mehr
4 Wochen 1 Tag her #168977 von krosser
krosser erstellte das Thema Progress bar animation
Hi guys,

I am trying to animate the progress bar similar to this...





Since the Vanilla template is based on Bootstrap, it should work. But in the progress_bar.twig file the class is set in a different way.


class="{{ aSurveyInfo.class.progressbar }}" {{ aSurveyInfo.attr.progressbar }}
<div class="{{ aSurveyInfo.class.progressbar  }}" {{ aSurveyInfo.attr.progressbar  }} role="progressbar" aria-valuenow="{{ progressValue }}" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: {{ progressValue }}%;">
                        {{ progressValue }}%


I cannot even experiment with different codes, as when I add anything to aSurveyInfo.class.progressbar, I get an error - Unexpected token "name" of value "aSurveyInfo" ("end of print statement" expected) - and cannot access the extended theme anymore.


So, if anyone has done this before, please share what should be added and where. Thanks.

I'm using the latest LS 3.12 hosted by LS team, not installed locally.
Anhang:

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Wochen 1 Tag her #168981 von tpartner
tpartner antwortete auf das Thema: Progress bar animation
You can hard-code your own classes outside of the Twig tag.

<div class="{{ aSurveyInfo.class.progressbar  }} progress-bar-striped progress-bar-animated krossers-custom-class" {{ aSurveyInfo.attr.progressbar  }} role="progressbar" aria-valuenow="{{ progressValue }}" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: {{ progressValue }}%;">

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Folgende Benutzer bedankten sich: LouisGac, krosser

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Wochen 1 Tag her - 4 Wochen 1 Tag her #168985 von krosser
krosser antwortete auf das Thema: Progress bar animation

tpartner schrieb: You can hard-code your own classes outside of the Twig tag.

<div class="{{ aSurveyInfo.class.progressbar  }} progress-bar-striped progress-bar-animated krossers-custom-class" {{ aSurveyInfo.attr.progressbar  }} role="progressbar" aria-valuenow="{{ progressValue }}" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: {{ progressValue }}%;">


Oh my! So that is the reason - placing the code outside the Twig tag! :)

I wonder why I need to add my-custom-class too? Because just by adding progress-bar-striped progress-bar-animated it works...

I'm using the latest LS 3.12 hosted by LS team, not installed locally.
Letzte Änderung: 4 Wochen 1 Tag her von krosser.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Wochen 1 Tag her #168986 von tpartner
tpartner antwortete auf das Thema: Progress bar animation

I wonder why I need to add my-custom-class too?

You don't, I was just demonstrating that you can add any class.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Folgende Benutzer bedankten sich: krosser

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Wochen 1 Tag her #168997 von krosser
krosser antwortete auf das Thema: Progress bar animation
Alright, so for anyone who might need this in the future, follow these steps:

1. Change this line in progress_bar.twig:



<div class="{{ aSurveyInfo.class.progressbar  }} progress-bar-striped progress-bar-animated" {{ aSurveyInfo.attr.progressbar  }} role="progressbar" aria-valuenow="{{ progressValue }}" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: {{ progressValue }}%;">

2. In custom.css add this:
.progress-bar-animated {
  -webkit-animation: progress-bar-stripes 2s linear infinite;
          animation: progress-bar-stripes 2s linear infinite;
}

I'm using the latest LS 3.12 hosted by LS team, not installed locally.
Anhang:

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Wochen 1 Tag her #168998 von krosser
krosser antwortete auf das Thema: Progress bar animation
My only fear is that this change would be negated when the LS team updates the themes and twig files would be updated. I would have to keep an eye on that.

I'm using the latest LS 3.12 hosted by LS team, not installed locally.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Wochen 1 Tag her #169001 von holch
holch antwortete auf das Thema: Progress bar animation
If you make the chances in a copy of the theme (or better extend the theme) you should be fine. Changes should only be applied to the standard theme which is then overwritten with your extended theme information where necessary.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Folgende Benutzer bedankten sich: krosser

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Wochen 1 Tag her #169003 von tpartner
tpartner antwortete auf das Thema: Progress bar animation
Yes, exactly. Never edit the core theme files. Extend the theme and copy any required Twig files to your new theme directory. Twig files in your extended theme directory will not be affected by updates.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Wochen 20 Stunden her #169011 von krosser
krosser antwortete auf das Thema: Progress bar animation
Okay, that is what I do - extend themes and make changes there. Actually, when you use the LS on their servers, the editor does not allow you to edit a theme without extending it first.
I just thought that any updates to the core themes would rewrite twig files in the extended ones. Good to know that it is not an issue.
Thank you guys!

I'm using the latest LS 3.12 hosted by LS team, not installed locally.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Wochen 13 Stunden her #169044 von LouisGac
LouisGac antwortete auf das Thema: Progress bar animation
just to say: we're using Bootstrap 3, not Bootstrap 4
getbootstrap.com/docs/3.3/

so Bootstrap 4 snippets will not work...
Folgende Benutzer bedankten sich: tpartner

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Wochen 12 Stunden her - 4 Wochen 12 Stunden her #169049 von krosser
krosser antwortete auf das Thema: Progress bar animation
Thanks for the reminder but for some reason that code worked. I will have a look at how it is done in 3.3.

I'm using the latest LS 3.12 hosted by LS team, not installed locally.
Letzte Änderung: 4 Wochen 12 Stunden her von krosser.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Wochen 12 Stunden her #169050 von LouisGac
LouisGac antwortete auf das Thema: Progress bar animation
For anyone interested:

"Add .active to .progress-bar-striped to animate the stripes right to left. "

getbootstrap.com/docs/3.3/components/#progress
Folgende Benutzer bedankten sich: tpartner, krosser

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
3 Wochen 6 Tage her #169065 von krosser
krosser antwortete auf das Thema: Progress bar animation

LouisGac schrieb: For anyone interested:

"Add .active to .progress-bar-striped to animate the stripes right to left. "

getbootstrap.com/docs/3.3/components/#progress


Works :)
In this case, the CSS code for custom.css would be
.progress.active .progress-bar,
.progress-bar.active {
  -webkit-moz-animation: progress-bar-stripes 1s linear infinite;
  -o-animation: progress-bar-stripes 1s linear infinite;
  animation: progress-bar-stripes 1s linear infinite;
}

I'm using the latest LS 3.12 hosted by LS team, not installed locally.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha