(Created page with "let data = { 'Project': [ 'Description', 'Design', 'Feature', 'Techniques', 'Validation', 'Demo'], 'Modeling': [...") |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
'Techniques', | 'Techniques', | ||
'Validation', | 'Validation', | ||
− | 'Demo'], | + | 'Demo', |
+ | "Contribution", | ||
+ | 'Improvement', | ||
+ | 'Demostrate'], | ||
'Modeling': [ | 'Modeling': [ | ||
'Overview', | 'Overview', | ||
− | ' | + | 'Search & Recommendation System', |
'Simulation for Circuits', | 'Simulation for Circuits', | ||
'Directed Evolution Algorithm', | 'Directed Evolution Algorithm', | ||
Line 21: | Line 24: | ||
'Collaboration': [ | 'Collaboration': [ | ||
'XMU-China', | 'XMU-China', | ||
− | 'SCUT- | + | 'SCUT-ChinaA', |
'WHU-China', | 'WHU-China', | ||
− | ' | + | 'XJTU-China'], |
'Interlab': [ | 'Interlab': [ | ||
'Overview', | 'Overview', | ||
Line 29: | Line 32: | ||
'Material and Methods', | 'Material and Methods', | ||
'Results'], | 'Results'], | ||
+ | "Safety": [ | ||
+ | "Wet Lab Safety", | ||
+ | "Dry Lab Safety" | ||
+ | ], | ||
'Medal': [ | 'Medal': [ | ||
'Overview', | 'Overview', | ||
Line 38: | Line 45: | ||
'Team Members', | 'Team Members', | ||
'Advisors', | 'Advisors', | ||
− | 'Instructors', | + | 'Instructors & Individuals', |
'Notebook'], | 'Notebook'], | ||
'Attributions': [ | 'Attributions': [ | ||
Line 46: | Line 53: | ||
'Acknowledgement'], | 'Acknowledgement'], | ||
} | } | ||
+ | |||
// main menu navigator | // main menu navigator | ||
let index = 2; | let index = 2; | ||
for (ele in data) { | for (ele in data) { | ||
+ | block_list = ['Demo', 'Integrated Human Practice']; | ||
let html; | let html; | ||
if (ele == 'HumanPractice') { | if (ele == 'HumanPractice') { | ||
Line 58: | Line 67: | ||
} | } | ||
for (x in data[ele]) { | for (x in data[ele]) { | ||
− | html += `<div class="item" style="color: white !important;" data-value="${index}">${data[ele][x]}</div>` | + | if (block_list.indexOf(data[ele][x]) !== -1) { |
+ | // console.log('hit!!') | ||
+ | html += `<div class="item" style="display: none;" data-value="${index}">${data[ele][x]}</div>` | ||
+ | } else { | ||
+ | html += `<div class="item" style="color: white !important;" data-value="${index}">${data[ele][x]}</div>` | ||
+ | } | ||
index += 1; | index += 1; | ||
} | } | ||
Line 65: | Line 79: | ||
} | } | ||
− | $( | + | function backToTop(page) { |
− | if ($( | + | $("#" + page).scrollTop(0); |
− | fkpage.goToSlide( | + | } |
+ | |||
+ | function jumpToPage(pageId) { | ||
+ | if (pageId != undefined) { | ||
+ | if (pageId == 1) { | ||
+ | $(".side-bar").hide(); | ||
+ | } else { | ||
+ | $(".side-bar").show(); | ||
+ | } | ||
+ | fkpage.goToSlide(pageId); | ||
+ | let name = 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}`); | ||
+ | } | ||
} | } | ||
+ | } | ||
+ | |||
+ | $('.menu .item').on('click', function () { | ||
+ | jumpToPage($(this).attr('data-value')); | ||
+ | }); | ||
+ | |||
+ | $('.nextpage').on('click', function () { | ||
+ | jumpToPage($(this).attr('data-value')); | ||
+ | }); | ||
+ | |||
+ | $('.top').on('click', function () { | ||
+ | backToTop($(this).attr('data-value')); | ||
+ | }); | ||
+ | |||
+ | $('.lastpage').on('click', function () { | ||
+ | jumpToPage($(this).attr('data-value')); | ||
+ | }); | ||
+ | $('#home-video').on('click', function() { | ||
+ | jumpToPage('2'); | ||
}); | }); |
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