Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 64b1c51

Browse files
committed
5th Update
1 parent 79e07f1 commit 64b1c51

File tree

9 files changed

+862
-60
lines changed

9 files changed

+862
-60
lines changed

‎.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"[python]": {
3+
"editor.defaultFormatter": "ms-python.autopep8"
4+
},
5+
"python.formatting.provider": "none"
6+
}

‎bichi.py

Whitespace-only changes.

‎index.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@
1010
</head>
1111

1212
<body class="body">
13-
<marquee>Learn DSA Using Python || Chapter 01 - Introduction || Code
13+
<marquee>Learn DSA Using Python || Lesson 01 - Introduction || Code
1414
Explorer</marquee>
1515
<div class="main-body">
1616
<div class="left">
17-
<!-- <a href="https://explorecode.newsgoogle.org"> -->
1817
<div class="logo">
1918
<img src="images/code.png" alt="" height="100px" width="100px" class="logo-img" />
2019
<div class="logo-div">
2120
<span class="code">Code</span><span class="explorer">Explorer</span>
2221
</div>
2322
<span class="dropdown"></span>
2423
</div>
25-
<!-- </a> -->
2624
<hr class="one" />
2725
<div class="hide-on-small-screen">
2826
<span class="contents">Contents</span>
@@ -38,14 +36,14 @@
3836
<li>
3937
<img src="images/arrow.png" alt="" class="arrow-img" />
4038
<a href="./lesson-2/index.html">
41-
<span class="lesson">Lesson 2 / Revision</span>
39+
<span class="lesson">Lesson 2 / Python Revision</span>
4240
</a>
4341
</li>
4442
<hr class="two" />
4543
<li>
4644
<img src="images/arrow.png" alt="" class="arrow-img" />
47-
<a href="https://youtube.com">
48-
<span class="lesson">Lesson 3 / Testing</span>
45+
<a href="./lesson-03/index.html">
46+
<span class="lesson">Lesson 3 / Data Structures</span>
4947
</a>
5048
</li>
5149
<hr class="two" />

‎lesson-03/index.html

Lines changed: 668 additions & 0 deletions
Large diffs are not rendered by default.

‎lesson-03/script.js

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
document.addEventListener("DOMContentLoaded", function () {
2+
const screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
3+
const dropdownElement = document.querySelector(".dropdown");
4+
const navElement = document.querySelector(".hide-on-small-screen ul");
5+
6+
if (screenWidth <= 760) {
7+
const menuImgSrc = "../images/menu.png"; // Replace with the actual menu image source
8+
const crossImgSrc = "../images/cross.png"; // Replace with the actual cross image source
9+
10+
const imgElement = document.createElement("img");
11+
imgElement.src = menuImgSrc;
12+
imgElement.alt = "Menu";
13+
imgElement.style.height = "60px";
14+
imgElement.style.width = "60px";
15+
16+
dropdownElement.appendChild(imgElement);
17+
18+
dropdownElement.addEventListener("click", function () {
19+
navElement.classList.toggle("nav-hidden");
20+
navElement.classList.toggle("nav-visible");
21+
imgElement.src = navElement.classList.contains("nav-visible") ? crossImgSrc : menuImgSrc;
22+
imgElement.alt = navElement.classList.contains("nav-visible") ? "Cross" : "Menu";
23+
});
24+
}
25+
});
26+
27+
// Initialize Prism.js
28+
Prism.highlightAll();
29+
30+
function copyCode() {
31+
const codeBlock = document.getElementById("code-block");
32+
navigator.clipboard.writeText(codeBlock.innerText)
33+
.then(() => {
34+
showNotification("Code Copied !!", "success");
35+
})
36+
.catch((error) => {
37+
showNotification("Failed To Copy: " + error, "error");
38+
});
39+
}
40+
41+
function copyCode1() {
42+
const codeBlock = document.getElementById("code-block1");
43+
navigator.clipboard.writeText(codeBlock.innerText)
44+
.then(() => {
45+
showNotification("Code Copied !!", "success");
46+
})
47+
.catch((error) => {
48+
showNotification("Failed To Copy: " + error, "error");
49+
});
50+
}
51+
52+
function copyCode2() {
53+
const codeBlock = document.getElementById("code-block2");
54+
navigator.clipboard.writeText(codeBlock.innerText)
55+
.then(() => {
56+
showNotification("Code Copied !!", "success");
57+
})
58+
.catch((error) => {
59+
showNotification("Failed To Copy: " + error, "error");
60+
});
61+
}
62+
63+
function copyCode3() {
64+
const codeBlock = document.getElementById("code-block3");
65+
navigator.clipboard.writeText(codeBlock.innerText)
66+
.then(() => {
67+
showNotification("Code Copied !!", "success");
68+
})
69+
.catch((error) => {
70+
showNotification("Failed To Copy: " + error, "error");
71+
});
72+
}
73+
74+
function copyCode4() {
75+
const codeBlock = document.getElementById("code-block4");
76+
navigator.clipboard.writeText(codeBlock.innerText)
77+
.then(() => {
78+
showNotification("Code Copied !!", "success");
79+
})
80+
.catch((error) => {
81+
showNotification("Failed To Copy: " + error, "error");
82+
});
83+
}
84+
85+
function copyCode5() {
86+
const codeBlock = document.getElementById("code-block5");
87+
navigator.clipboard.writeText(codeBlock.innerText)
88+
.then(() => {
89+
showNotification("Code Copied !!", "success");
90+
})
91+
.catch((error) => {
92+
showNotification("Failed To Copy: " + error, "error");
93+
});
94+
}
95+
96+
function copyCode6() {
97+
const codeBlock = document.getElementById("code-block6");
98+
navigator.clipboard.writeText(codeBlock.innerText)
99+
.then(() => {
100+
showNotification("Code Copied !!", "success");
101+
})
102+
.catch((error) => {
103+
showNotification("Failed To Copy: " + error, "error");
104+
});
105+
}
106+
107+
function copyCode7() {
108+
const codeBlock = document.getElementById("code-block7");
109+
navigator.clipboard.writeText(codeBlock.innerText)
110+
.then(() => {
111+
showNotification("Code Copied !!", "success");
112+
})
113+
.catch((error) => {
114+
showNotification("Failed To Copy: " + error, "error");
115+
});
116+
}
117+
118+
function showNotification(message, type) {
119+
const notification = document.getElementById("notification");
120+
notification.textContent = message;
121+
notification.classList.add(type, "show");
122+
123+
setTimeout(() => {
124+
notification.classList.remove("show");
125+
}, 3000);
126+
}

‎lesson-03/style.css

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
.container {
2+
max-width: 800px;
3+
margin: 0 auto;
4+
padding: 20px;
5+
}
6+
7+
pre {
8+
background-color: #080000;
9+
padding: 10px;
10+
overflow-x: auto;
11+
}
12+
13+
code {
14+
font-family: "Courier New", monospace;
15+
font-size: 14px;
16+
}
17+
18+
.python {
19+
color: #e83e8c;
20+
}
21+
22+
.copy-button {
23+
display: inline-block;
24+
background-color: #4caf50;
25+
color: white;
26+
border: none;
27+
padding: 10px 20px;
28+
font-size: 16px;
29+
cursor: pointer;
30+
transition: background-color 0.3s ease;
31+
}
32+
33+
.copy-button:hover {
34+
background-color: #45a049;
35+
}
36+
37+
.notification {
38+
position: fixed;
39+
top: 50%;
40+
left: 50%;
41+
transform: translate(-50%, -50%);
42+
background-color: #f44336;
43+
color: white;
44+
padding: 16px;
45+
border-radius: 5px;
46+
visibility: hidden;
47+
opacity: 0;
48+
transition: visibility 0s, opacity 0.3s ease;
49+
}
50+
51+
.notification.show {
52+
visibility: visible;
53+
opacity: 1;
54+
}

‎lesson-2/index.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,17 @@
1111
</head>
1212

1313
<body class="body">
14-
<marquee>Learn DSA Using Python || Chapter 01 - Introduction || Code
14+
<marquee>Learn DSA Using Python || Lesson 02 - Python Revision || Code
1515
Explorer</marquee>
1616
<div class="main-body">
1717
<div class="left">
18-
<!-- <a href="https://explorecode.newsgoogle.org"> -->
1918
<div class="logo">
2019
<img src="../images/code.png" alt="" height="100px" width="100px" class="logo-img" />
2120
<div class="logo-div">
2221
<span class="code">Code</span><span class="explorer">Explorer</span>
2322
</div>
2423
<span class="dropdown"></span>
2524
</div>
26-
<!-- </a> -->
2725
<hr class="one" />
2826
<div class="hide-on-small-screen">
2927
<span class="contents">Contents</span>
@@ -39,14 +37,14 @@
3937
<li>
4038
<img src="../images/arrow.png" alt="" class="arrow-img" />
4139
<a href="index.html">
42-
<span class="lesson">Lesson 2 / Revision</span>
40+
<span class="lesson">Lesson 2 / Python Revision</span>
4341
</a>
4442
</li>
4543
<hr class="two" />
4644
<li>
4745
<img src="../images/arrow.png" alt="" class="arrow-img" />
48-
<a href="https://youtube.com">
49-
<span class="lesson">Lesson 3 / Testing</span>
46+
<a href="../lesson-03/index.html">
47+
<span class="lesson">Lesson 3 / Data Structures</span>
5048
</a>
5149
</li>
5250
<hr class="two" />

‎lesson-2/script.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ document.addEventListener("DOMContentLoaded", function () {
2727
// Initialize Prism.js
2828
Prism.highlightAll();
2929

30-
// function showNotification(message, type) {
31-
// // You can implement your custom notification here
32-
// // This is just a basic example
33-
// alert(`${type}: ${message}`);
34-
// }
35-
3630
function copyCode() {
3731
const codeBlock = document.getElementById("code-block");
3832
navigator.clipboard.writeText(codeBlock.innerText)

‎lesson-2/style.css

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,6 @@ code {
1515
font-size: 14px;
1616
}
1717

18-
/* .main-body-2 {
19-
display: flex;
20-
justify-content: space-between;
21-
flex-direction: row;
22-
padding-left: 10px;
23-
padding-right: 10px;
24-
padding-top: 10px;
25-
/* background-color: coral;
26-
}
27-
28-
.left-2 {
29-
/* color: skyblue;
30-
min-width: 300px;
31-
margin-bottom: left;
32-
/* background-color: black;
33-
height: auto;
34-
overflow: auto;
35-
position: relative;
36-
}
37-
38-
.right-2 {
39-
background-color: black;
40-
height: 30px;
41-
/* overflow: auto;
42-
/* margin-bottom: 10px;
43-
position: relative;
44-
} */
45-
4618
.python {
4719
color: #e83e8c;
4820
}
@@ -62,20 +34,6 @@ code {
6234
background-color: #45a049;
6335
}
6436

65-
/* .notification {
66-
position: fixed;
67-
top: 20px;
68-
left: 50%;
69-
transform: translateX(-50%);
70-
background-color: #f44336;
71-
color: white;
72-
padding: 16px;
73-
border-radius: 5px;
74-
visibility: hidden;
75-
opacity: 0;
76-
transition: visibility 0s, opacity 0.3s ease;
77-
} */
78-
7937
.notification {
8038
position: fixed;
8139
top: 50%;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /