My website showcases my personal information, previous courses I took, previous work experiences and projects I have worked on.
The goal of this assignment was to have a website that can be used as my personal portfolio.
To the main webpage, I linked a second webpage I created that list all my skills in detail.
When first opening this website, you will be asked to input your name and organisation, This information will be stored in the cookies.
Below the websites title, 'Annika's Portfolio', is the Information section that includes my contact details.
This section includes my full name, my phone number (I might have rearranged the numbers), my email address and my current location.
Below that is my so called Selection Bar. This includes an introduction to the different parts of my portfolio website.
1. Education
This part displays three courses I took last semester when its corresponding button is pressed.
2. Work experience
This part displays three work experiences of mine. I included my most recent work experiences. Similar to the Education display, a button click is needed to reveal this information.
3. Projects
Upon clicking the corresponding button, it displays one of my three projects. All of which were created within this module.
The first two are parts of Assignment 1, where as the third project is a Lab Assignment from Week 04.
Clicking either of those buttons will reveal a section below that I called MainDiv.
Below it is a clear button that will make the section disappear again. Next to it is a suprise button that will make a random project appear and rotate between them every 30 sec. This can be stopped by clicking the Stop button.
Second to last, is a log out button that will bring you to google.com and delete the saved cookies.
Lastly, is a link to this report.
IMAGES:
All of my images are screenshots from webpages I have created. I retrieved all of them on April 2nd 2023.
OUTSIDE RESOURCES:
Below is the list of code that I copied from outside resources like
W3Schools,
Stock Overflow and
Bootstrap.
This includes the code from my HTML, CSS and JavaScript files. The specific part of the website from where I took the code is linked to the website's name.
INDEX AND SKILL PAGE:
1. From
Bootstrap
I used the Menu items example for my code.
INDEX PAGE:
1. From
Stack Overflow
JAVASCRIPT:
1. From Lab Assignment Week 09
// sets cookies
function setCookie(cname, cvalue, exminutes) {
var d = new Date();
d.setTime(d.getTime() + (exminutes * 60 * 1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
// gets cookies
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i = 0; i
2. From
Tutorials Tonight
//gets JSON file
function showData(){
fetch("JSON/Education.json")
// converts json file to a useful data type
.then(response => response.json())
.then(data => createEduList(data));
fetch("JSON/WorkExperience.json")
// converts json file to a useful data type
.then(response => response.json())
.then(data => createWorkList(data));
fetchProjects();
}
[...]
//gets JSON file
function fetchProjects() {
fetch("JSON/Projects.json")
// converts json file to a useful data type
.then(response => response.json())
.then(data => createProjectsList(data));
}
3. From
Tutorials Tonight
I use this webpage for a second part of my code.
//Education Display
function createEduList(data) {
const eduUL = document.createElement('ol'); //creating a list (displaying json in a list format)
for (let i = 0; i
4. The next part of code is a combination of codes from multiple webpages.
From
Web Developer
From
Web Developer
From
Soft Author
From
Linuxhint
const imageLI = document.createElement("img");
imageLI.src = data.projects[currentProjectIndex].image;
imageLI.style.width = "50%";
imageLI.style.width = "50%";
// Add event listener for "mouseenter" event on image element
imageLI.addEventListener('mouseenter', function() {
hover();
});
// Add event listener for "mouseleave" event on image element
imageLI.addEventListener('mouseleave', function() {
hover();
});
[...]
//displays description on mouse hovering
function hover() {
if (descriptionUL.style.display === "block") {
descriptionUL.style.display = "none"; // shows descriptionUL
} else {
descriptionUL.style.display = "block"; // hides descriptionUL
}
}
5. From
W3Schools
[...]
timeoutId = setTimeout(() => { // store the timeout ID
surprise(max);
}, 30000);
}
//stops 30 sec random rotation between projects
function stop(){
clearTimeout(timeoutId); // clear the timeout using the stored timeout ID
}
JAVASCRIPT FUNCTIONS:
Below is the list of functions I produced.
- function setCookie(cname, cvalue, exminutes)
- function getCookie(cname)
- function checkCookie()
- function deleteCookie()
- function deleteCookieRefresh()
- function deleteCookieRefreshFinal()
- function showSection(id)
- function clearSections()
- function showData()
- function createEduList(data)
- function createWorkList(data)
- function createProjectsList(data)
- function hover()
- function fetchProjects()
- function next()
- function previous()
- function surprise(max)
- function stop()