Hej, I am trying to adjust the default Kirby theme and combine it with the latest Zurb Foundation 6 framework. Is there anybody around who works with Foundation and already tinkered with the update? My actual issue is a sticky top bar whose stickiness is not as reliable as it should be. Any help is appreciated very much.
Here is a link: Testsite
Scroll down, and the top bar vanishes. Or not? No, sometimes not. Click a little bit around and the bug will appear. The source code seems to be okay, but I simply cannot find the reason - maybe I don’t see the forest for the trees, maybe there is a conflict with Kirby.
The Kirby Starterkit does not use any JS, so there shouldn’t be any conflicts there. My guess is, that either your javascript does not work as it should, or maybe the markup is not what it is supposed to be.
@heyallan, actually I only use 2 lines of the existing starterkit CSS, and also the navigation code is readjusted as a new menu.php in the snippet folder. So this does not cause the problem. But thanks for caring anyway!
@abroess, “a little bit” seems to be an understatement ! Thanks so much for having a look at this. I will study your suggestion and come back with a comment.
(Edit: my growing suspicion is that it is a bug in the F6 framework - they are still in their development with the new version, and there are still many bug reports over at the Foundation forums.)
@abroess: Your example does not work for me, alas - I don’t know why.
As the F6 documentation says, you need an anchor to define the point the stickiness relates to. It could be #page in your code, but when I change that in data-options, nothing happens. Also data-options has a margin-top:0 already, so it is not necessary to add it in the style. There are many extras you added, which is wonderful when you need it at some point, thanks for that. For instance it is a good idea to reduce the width of the menu items for big screens so that they don’t appear far to the left and right. But what I want is something as simple as possible, so that it works with the very basics of the F6 documentation.
Anyhow: I am more and more convinced that the bug is rooted somewhere in the F6 framework itself.
In case somebody works with F6 and wants to try it, here is the code for the menu.php:
@Kate
Sorry for the confusion about the extra styles. They are based on the Framework Javascript. I saved your test site via browser and modified it. Anyway I looked at your test site again with Chrome, Firefox and Safari and the problem seems to be solved. Right?