- Object must have next structure:
{
name: string,
lastName: string,
img: string, // url of img for your avatar
coverImg: string, //url of img for your cover photo
email: string,
skills: array
}
example:
{
name: 'Taras',
lastName: 'Kliushta',
img: 'https://cdn.pixabay.com/photo/2014/03/29/09/17/cat-300572_960_720.jpg',
coverImg: 'https://static.pexels.com/photos/9135/sky-clouds-blue-horizon.jpg',
email: 'tarasklyushta@gmail.com',
skills: ['JavaScript','CSS', 'HTML']
}
- go https://docs.google.com/document/d/1mKa5dQ46jndVHrs9yqfKjSQV3BynrAw0SIEV6-CSVDg/edit
- replace string of your lastName with object you've just created
- now just wait
- populate index.html with content from https://raw.githubusercontent.com/ktv18/BOM-practices/master/index.html
- populate script.js with content from https://raw.githubusercontent.com/ktv18/BOM-practices/master/script.js
- populate style.css with content from https://raw.githubusercontent.com/ktv18/BOM-practices/master/style.css
- take a look on line 26
- create variable
students
which contains array of all students objects (copy from https://docs.google.com/document/d/1mKa5dQ46jndVHrs9yqfKjSQV3BynrAw0SIEV6-CSVDg/edit) - write function
findStudentByLastName(lastName)
which accepts string of lastName, finds and returns object from array of studens with this lastName - Add event listener for hash changes (window.addEventListener('hashchange', function(){})
- app displays all students on the main page (when
location.hash
is empty) - app displays information about particular student on student related page (when hash contains lastName of student)
- when student is not found by hash value you shoud be redirected on the main page
- each time page is changed, animation should be shown during 2 seconds
- behind animation nothing should be shown (except for header)
renderStudents(students)
- function which accepts an array of students objects and render it on the pagerenderStudentInfo(studentInfo)
- functions which accepts a student object and render it on the pageshowLoader(show)
- function which accepts a boolean value and depending on true/false show/hide animation on the pageclearStudentsList()
- function which removes all students information from the pageclearStudentInfo()
- function which remove student info from the page- NOTE when you click on link in header
location.hash
will be empty - NOTE when you click on 'view student'
location.hash
will contain student lastName