#5 Active page does not work, but even if it did the template has no style class for it

Atvērta
vaeringjar atvēra 6 gadi atpakaļ · 4 komentāri

Basically two problems, though minor:

  • pagePrime does not actually detect the current page.
  • The style sheet has no class named "active"
$ grep -in "pagePrime\|active" themes/pelican/templates/*
themes/pelican/templates/base.html:52:            <li{% if page == pagePrime %} class="active"{% endif %}><a href="{{ link }}">{{ title }}</a></li>
themes/pelican/templates/base.html:64:            <li{% if page == pagePrime %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
themes/pelican/templates/base.html:70:            <li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>

Basically two problems, though minor: * pagePrime does not actually detect the current page. * The style sheet has no class named "active" ``` $ grep -in "pagePrime\|active" themes/pelican/templates/* themes/pelican/templates/base.html:52: <li{% if page == pagePrime %} class="active"{% endif %}><a href="{{ link }}">{{ title }}</a></li> themes/pelican/templates/base.html:64: <li{% if page == pagePrime %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li> themes/pelican/templates/base.html:70: <li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li> ```
zPlus komentēja 6 gadi atpakaļ
Īpašnieks

What are the "expected behavior" and "actual/current behavior"?

What are the "expected behavior" and "actual/current behavior"?
vaeringjar komentēja 6 gadi atpakaļ
Īpašnieks

The original template, which was a fork itself, had a way alter the menu to highlight or underline the text/link for the current page.

The original template, which was a fork itself, had a way alter the menu to highlight or underline the text/link for the current page.
zPlus komentēja 6 gadi atpakaļ
Īpašnieks

There are only two pages, "TODO" and "Why ?", correct?

There are only two pages, "TODO" and "Why ?", correct?
vaeringjar komentēja 6 gadi atpakaļ
Īpašnieks

This might not make any sense anymore for this template. The original template before the fork didn't really have it either. I'll think about it for a few more days, but I think just removing the references makes more sense.

This might not make any sense anymore for this template. The original template before the fork didn't really have it either. I'll think about it for a few more days, but I think just removing the references makes more sense.
Pierakstieties, lai pievienotos šai sarunai.
Nav etiķešu
Nav atskaites punktu
Nav atbildīgā
2 dalībnieki
Notiek ielāde...
Atcelt
Saglabāt
Vēl nav satura.