Single Page App

Forums Help and How To Single Page App

This topic contains 7 replies, has 4 voices, and was last updated by  tk 4 months, 3 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • JeffM
    Member

    What’s the easiest way to create a single page app with bs?
    Thanks for any help.

    Larsene
    Member

    hmmmmn what is exactly a “single page app” ? I really have no idea what you mean…

    JeffM
    Member

    google it, but essentially instead of multiple pages in a website, it’s only 1 page that appears as several by showing/hiding ui modules.

    I suppose I could build it as one page and write my own code to show/hide, but wanting to know if there is support for this already?

    Chris Hackwood
    Member
    Valued

    Not possible as would require a is framework like angular to get it to work but angular is not supported

    JeffM
    Member

    So your saying you can only create a SPA with a framework like angular? I figured it could be done with some JavaScript files.

    JeffM
    Member

    I found this with a 30-second google search, did not have time to look into detail, but it sounds like it could work. SPA with no framework. My thinking is something that just uses jquery or similar that BST would support.

    https://tutorialzine.com/2015/02/single-page-app-without-a-framework

    tk
    Member

    Glad you brought this up, JeffM. I’d always assumed that BS was for SPAs due to its origins in Twitter. Lately I am inclining towards SPA design myself since efficiency on small devices is vital to companies whose web viewers are using tablets and smartphones – if the site drags reloading, users lose patience. Balling all html pages into a one won’t mean that much more kB in the file size either. A simple implementation might be similar to that for a CSS/JS slideshow, i.e. have all article page content on different z-indexes, show the one referenced by the navbar pointer and make transparent the others. Header (including logo, navbar, sign-in/login buttons) and footer content would be the same for all pages barring the navbar pointer and dead link on the current page.

    tk
    Member

    Here’s a simple SPA on CodePen

    Note that the HTML class styles that would normally change on clicking another nav link do not change in the HTML frame in CodePen. Don’t know why . . .

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.