dbtek / dbyll

Stylish, minimalistic theme for jekyll.

Home Page:dbtek.github.io/dbyll

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tab not show

souce opened this issue · comments

commented

Hi ,I like this theme you made, but I got some problem,
in "categories" page and "tags" page, I can't switch tabs, they are invisible,
I changed to ,
it works.
you did great job, this is my favorte theme, thank you.

It looks like this is a bug related to app.js not expecting site.BASE_PATH to be set.

The activateTab function looks at the window location to see if it matches /tags.html or /categories.html:

function activateTab() {
      if(['/tags.html', '/categories.html'].indexOf(window.location.pathname) > -1) {

However, if BASE_PATH is defined, then window.location.pathname will be BASE_PATH/tags.html or BASE_PATH/categories.html

The code probably wants to see if the pathname ends with either of these strings, rather than being exact - something like the following (not a JS programmer by trade, so this might not be the best way of doing this, but it does work to prove the bug):

if((window.location.pathname.endsWith('/categories.html')) || (window.location.pathname.endsWith('/tags.html'))) {