respond
respond copied to clipboard
Menu creation for single page websites
I think Respond CMS would be a great tool for editing single page websites. Have you considered adding functionality to support this? I guess it would require the option to add anchors as well as to create menu items from anchors in the home page.
I agree. This is definitely possible in Respond today. You can add menu items with hash (#) anchors and you can set the ID on blocks or any element of the page (via the cog icon). It might be good to create a theme and some documentation around it though. I will work on that and update this issue.
I've done this in Respond 5 and it works well. I added a little bit of jQuery that makes it scroll to the target anchor smoothly. Maybe this will be useful for the theme:
/* Animate scrolling to #anchors */
$("a[href^='#']").on('click', function(event) {
var target;
target = this.hash;
event.preventDefault();
var navOffset;
navOffset = $('.navbar-header').height();
/* console.log(navOffset); */
return $('html, body').animate({
scrollTop: $(this.hash).offset().top - navOffset
}, 300, function() {
return window.history.pushState(null, null, target);
});
});