Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Blog style portfolio only with Js/Jquerry

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #169324
    PirateStef
    Participant

    Hi guys,

    Soo, I’m working on this school project. The goals is to build a portfolio website. Now as a lazy student I want to have a real easy way of managing the content. The easy’er this will be, the more chance I will use it.

    Is there a way to create a “empty” base page and auto add-in the projects? I’m thinking this:

    File 1 – index.html
    File 2 – Project1.html
    File 3 – Project2.html
    File 4 – Project3.html
    File 5 – Project4.html

    style.css
    script.js

    The script.js would then create a link with the header, a photo and a snippet of text from the project file on the index.html page.

    I think this might be possible but I don’t know where to start and what to search for.

    Thanks!
    Stef

    #169345
    Alen
    Participant

    Hi @PirateStef, I’ve made simple AJAX demo for someone here while back. It does what you’re after. https://gist.github.com/alenabdula/9954542

    You will see list of pages:

    
    <li><a href="product-one.html">Product One</a></li>
    <li><a href="product-two.html">Product Two</a></li>
    <li><a href="product-tri.html">Product Tri</a></li>
    

    here change the product-one.html to the name of the file you wish to load. So in your example above:

    
    <li><a href="Project1.html">Project 1</a></li>
    <li><a href="Project2.html">Project 2</a></li>
    <li><a href="Project3.html">Project 3</a></li>
    <li><a href="Project4.html">Project 4</a></li>
    

    Whatever file you specify in the href= that file will be loaded. So make sure you name your files appropriately. Hope that helps.

    -Alen

    #169346
    PirateStef
    Participant

    Hmm, Interesting! thanks.

    AJAX? guess i’ll have to do some research on that tonight. I think you got me a step further.

    Thanks
    -Stef

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.