import { projects } from "./shrimpjects.js";

export function getProjectData(project){
    const leftImage = document.getElementById("image-left");
    const rightImage = document.getElementById("image-right");
    const centralImage = document.getElementById("image-central");
    const projectContent = document.getElementById("project-content");
    const projectData = projects[project];
    projectContent.innerHTML = projectData.content;

    const assetPath = "assets/"

    leftImage.src = assetPath + projectData.images.left.src;
    leftImage.alt = "altleft";
    rightImage.src = assetPath + projectData.images.right.src;
    centralImage.src = assetPath + projectData.images.central.src;

    return;
}


export function scrollToProjects(){
    const projects = document.getElementsByClassName("shrimp-projects")[0];
    projects.scrollIntoView({behavior:"smooth"});
}

export function createShrimpFooter() {
    const footer = document.getElementById("shrimp-gif");
    footer.innerHTML = "<img src='./assets/dance-shrimp-dance.gif'>".repeat(10);
}