uikit/uikit-site

Off-canvas menu items not working

sargac opened this issue · 4 comments

When browsing through the offline UIkit 3 version and using buttons and text links, everything works. For example, if I choose Get Started from the intro site, I am successfully redirected to https://uikit.local.dev/docs/introduction and I can see the content.

But, if I try to refresh the page, or use the off-canvas menu item labeled Introduction -- the site won't work, and would be blank.

I discovered, that erroneous off-canvas menu items use dot-slash a href syntax ./introduction while the working links use clean a href values introduction, if that may cause the error.

Besides, there a few errors, listed in a Developer Tools, as:

Any help in the right direction would be appreciated.

Is this resolved with the latest commits?

No, it's all the same. But it might be a problem with my setup -- all files are outside of a shared folder on Linux VBox, and I am accessing a webpage on Windows. I'll try to move files to a shared folder and see if that changes anything.

I've just tested, and it doesn't work this way either. The first problem was the assets/uikit symlink which wasn't working on Windows, so I copied the whole node_modules/uikit folder -- but even with that, the page is blank, and doesn't show even the start page.

There are some MIME type and JS SyntaxErrors displayed in Developer Tools. I'm using the newest Nginx server -- maybe there is a problem with MIME type?

11:03:08.480 The script from “https://uikit.local.dev/assets/uikit/dist/js/uikit.min.js?{{BUILD}}” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.
11:03:08.480 The script from “https://uikit.local.dev/assets/uikit/dist/js/uikit-icons.min.js?{{BUILD}}” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.
--
11:03:08.484 SyntaxError: expected expression, got '<'   uikit.min.js:1
11:03:08.484 SyntaxError: expected expression, got '<'   uikit-icons.min.js:1
11:03:08.486 ReferenceError: UIkit is not defined        main.min.js:1:928

Just to recap:

  • the whole offline uikit-site works flawlessly when using normal navigation links
  • only the off-canvas items don't work, by clicking on which the page turns blank
  • refreshing the page causes the same error -- the page turns blank