Difference between revisions of "Template:SYSU-Software/statics/js/navigator.js"

 
(2 intermediate revisions by one other user not shown)
Line 45: Line 45:
 
         'Team Members',
 
         'Team Members',
 
         'Advisors',
 
         'Advisors',
         'Instructors',
+
         'Instructors & Individuals',
 
         'Notebook'],
 
         'Notebook'],
 
     'Attributions': [
 
     'Attributions': [
Line 82: Line 82:
 
     $("#" + page).scrollTop(0);
 
     $("#" + page).scrollTop(0);
 
}
 
}
 
  
 
function jumpToPage(pageId) {
 
function jumpToPage(pageId) {
Line 92: Line 91:
 
         }
 
         }
 
         fkpage.goToSlide(pageId);
 
         fkpage.goToSlide(pageId);
         initTopBar(pageList[pageId - 1]);
+
         let name = pageList[pageId - 1];
         backToTop(pageList[pageId - 1]);
+
        initTopBar(name);
 +
         backToTop(name);
 +
        if (history.pushState) {
 +
            history.pushState(null, null, `https://2018.igem.org/Team:SYSU-Software?${name}`);
 +
        } else {
 +
            history.hash(`https://2018.igem.org/Team:SYSU-Software?${name}`);
 +
        }
 
     }
 
     }
 
}
 
}

Latest revision as of 01:09, 18 October 2018

let data = {

   'Project': [
       'Description',
       'Design',
       'Feature',
       'Techniques',
       'Validation',
       'Demo',
       "Contribution",
       'Improvement',
       'Demostrate'],
   'Modeling': [
       'Overview',
       'Search & Recommendation System',
       'Simulation for Circuits',
       'Directed Evolution Algorithm',
       'Reference'],
   'HumanPractice': [
       'Overview',
       'Silver',
       'Gold',
       'Integrated Human Practice',
       'Public Engagement'],
   'Collaboration': [
       'XMU-China',
       'SCUT-ChinaA',
       'WHU-China',
       'XJTU-China'],
   'Interlab': [
       'Overview',
       'Experiment Design',
       'Material and Methods',
       'Results'],
   "Safety": [
       "Wet Lab Safety",
       "Dry Lab Safety"
   ],
   'Medal': [
       'Overview',
       'Bronze',
       'Silver',
       'Gold'],
   'Team': [
       'Overview',
       'Team Members',
       'Advisors',
       'Instructors & Individuals',
       'Notebook'],
   'Attributions': [
       'Overview',
       'Group Structure',
       'Attribution in Project',
       'Acknowledgement'],

}


// main menu navigator let index = 2; for (ele in data) {

   block_list = ['Demo', 'Integrated Human Practice'];
   let html;
   if (ele == 'HumanPractice') {
html = `
Human Practice