-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.js
97 lines (89 loc) · 4.43 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
var lab1 = {
name: "Лабораторная работа №1",
name2: "Знакомство с основными инструментами и нотациями",
link: "https://aggink.github.io/LaboratoryWorks_IT/",
code: "https://github.com/aggink/LaboratoryWorks_IT",
about: "GITHUB - информационная система коллективной разработки программных средств. В рамках данной лабораторной работы необходимо зарегистрироваться на github.com, создать личный репозиторий, создать личную веб-страницу с описанием выполнения лабораторных работ, разместить код веб-страницы в репозитории, а также разместить ее на хостинге."
};
var lab2 = {
name: "Лабораторная работа №2",
name2: "IT Проект",
link: "https://kxenki.github.io/IT_Project/",
code: "https://github.com/kxenki/IT_Project",
about: "В рамках данной лабораторной работы необходимо в команде разработать проект и создать Landing page с описанием самого проекта."
};
var lab3 = {
name: "Лабораторная работа №3",
name2: "Работа с Сisco Packet Tracer",
link: "https://github.com/aggink/LaboratoryWorks_IT",
code: "https://inlnk.ru/G6MvYK",
about: "В рамках данной лабораторной работы необходимо настроить сеть в Сisco Packet Tracer. Packet Tracer — симулятор сети передачи данных, выпускаемый фирмой Cisco Systems. Позволяет делать работоспособные модели сети, настраивать маршрутизаторы и коммутаторы, взаимодействовать между несколькими пользователями."
};
var Index = 1;
showSlides(Index);
function showSlides(n) {
var i;
var slides = document.getElementsByClassName("Slides");
var buttons = document.getElementsByClassName("buttons");
var person = document.getElementsByClassName("person");
var code = document.getElementById("code");
var web = document.getElementById("web");
if (n > slides.length) {
Index = 1
}
if (n < 1) {
Index = slides.length
}
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
for (i = 0; i < buttons.length; i++) {
buttons[i].className = buttons[i].className.replace(" active", "");
}
slides[Index - 1].style.display = "block";
buttons[Index - 1].className += " active";
switch(Index){
case 1:
for(i = 0; i < person.length; i++){
person[0].textContent = lab1.name;
person[1].textContent = lab1.name2;
code.href = lab1.code;
code.innerText = lab1.code;
person[2].textContent = "Landing Page";
web.href = lab1.link;
web.innerText = lab1.link;
person[3].textContent = lab1.about;
}
break;
case 2:
for(i = 0; i < person.length; i++){
person[0].textContent = lab2.name;
person[1].textContent = lab2.name2;
code.href = lab2.code;
code.innerText = lab2.code;
person[2].textContent = "Landing page";
web.href = lab2.link;
web.innerText = lab2.link;
person[3].textContent = lab2.about;
}
break;
case 3:
for(i = 0; i < person.length; i++){
person[0].textContent = lab3.name;
person[1].textContent = lab3.name2;
code.href = lab3.code;
code.innerText = lab3.code;
person[2].textContent = "Репозиторий";
web.href = lab3.link;
web.innerText = lab3.link;
person[3].textContent = lab3.about;
}
break;
}
}
function go(n) {
showSlides(Index += n);
}
function show(n) {
showSlides(Index = n);
}