diff --git a/week-1/solutions/vs-code-landing-page/index.css b/week-1/solutions/vs-code-landing-page/index.css index a1e3c29e1..19953e2ab 100644 --- a/week-1/solutions/vs-code-landing-page/index.css +++ b/week-1/solutions/vs-code-landing-page/index.css @@ -1,310 +1,18 @@ -/* Global Styles */ -body { - font-family: Arial, sans-serif; - margin: 0; - padding: 0; - box-sizing: border-box; +body{ + background-color: #0d1117; + font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } -a { - text-decoration: none; - color: #0078d4; -} - -.buttonBanner { - color: #9ba3b4; - background-color: rgba(255,255,255,0.04); - padding: 10px; - font-size: 16px; - border-radius: 32px; - border: 1px solid rgba(255,255,255,0.07); -} - -.bannerLink { - padding-right: 8px; -} - -.container { - display: flex; - max-width: 1200px; - margin: 0 auto; - padding: 20px; -} - -.heroContainer { - display: flex; - justify-content: space-between; -} - -.heroContainer > div { - text-align:left; -} - -.flex { - display: flex; -} - -.navContainer { - max-width: 1200px; - margin: 0 auto; - display: flex; - justify-content: space-between; -} - -.verticalCenter { - display: flex; - flex-direction: column; - justify-content: center; -} - -.navLink { - padding-left: 20px; - color: gray; -} - -.topImage { - padding-right: 12px; -} - -.banner { - padding: 10px; - background-color: black; - color: gray; - font-size: 14px; - max-width: 1200px; - margin: 0 auto; - display: flex; - justify-content: center; -} - -.navLink:hover { - color: white; -} - -.searchInput { - border-radius: 5px; - border: 1px solid rgb(255, 255, 255, 0.2); - padding: 8px; - font-size: 16px; - background-color: black; -} - -.downloadButton { - background-color: #0078d4; - color: white; - border: none; - padding: 7px; - padding-left: 0px; - width: 120px; - padding-right: 0px; - font-size: 16px; - border-radius: 5px; - margin-left: 10px; -} - -/* Header Styles */ -header { - background-color: black; - color: white; -} - -section { - background-color: black; -} - -header h1 { - margin: 0; - font-size: 2em; -} - -nav ul { - list-style: none; - padding: 0; - display: flex; - justify-content: space-around; -} - -nav li { - margin: 0 10px; -} - -nav a { - color: #0078d4; - font-size: 1em; - transition: color 0.3s; -} - -nav a:hover { - color: #007acc; -} - -/* Hero Section Styles */ -.hero { - background: linear-gradient(180deg, #0e0e0e 0%, #141414 100%); - color: white; - padding: 100px 20px; - text-align: center; -} - -.hero h2 { - font-size: 3em; - margin: 0; -} - -.hero p { - font-size: 1.2em; -} - -.cta-button { - display: inline-block; - background: #0078d4; - color: white; - padding: 15px 30px; - font-size: 1.2em; - border-radius: 5px; - margin-top: 20px; - transition: background 0.3s; -} - -.cta-button:hover { - background: #e5b800; -} - -/* Features Section Styles */ -.features { - color: #f4f4f4; - background: #111; - padding: 50px 20px; -} - -.features .feature { - text-align: center; - margin-bottom: 20px; -} - -.features h3 { - font-size: 2em; -} - -.features p { - font-size: 1.1em; -} - -/* Language Style */ -.language { - color: white; -} - -.language .container { - display: grid; - grid-template-columns: 1fr 2fr; - grid-auto-flow: dense; - grid-template-rows: auto 1fr; - column-gap: 2rem; -} - -.language .container p{ - font-size: 16px; - font-weight: 500; - line-height: 160%; - color:#9ba3b4; -} - -.language .language_panel{ - grid-column: 2 / 3; - grid-row: 1 / 3; - display: grid; - grid-template-columns: max-content 1fr max-content 1fr max-content 1fr; - align-items: center; - padding-inline: 2.5rem -} - -.language_panel img { - height: 40px; - width: auto; -} -/* Footer Styles */ -footer { - background: #333; - color: white; - text-align: center; - padding: 10px 20px; -} - -footer p { - margin: 0; -} - -/* Responsive Styles */ -@media (width < 1200px) { - .heroContainer div:has(img) { - width: 66.66666667%; - padding-inline: 2.5rem; - } - .heroContainer img { - width: 100%; - } - .container { - max-width: 970px; - } - .navContainer { - max-width: 1060px; - } - .language .container { - grid-template-columns: 1fr 1fr; - } - .features h3 { - font-size: 1.5em; - } - - .features p { - font-size: 1em; - } -} - -@media (max-width: 768px) { - .hero { - padding-block: 40px; - } - - .hero p { - font-size: 1em; - } - - .features { - padding: 30px 20px; - } - - .features .feature { - margin-bottom: 15px; - } - .features h3 { - font-size: 1.2em; - } - - .features p { - font-size: .75em; - } - .verticalCenter > div:has(.navLink) { - display: none; - } - .navContainer { - max-width: 600px; - } - .heroContainer { - flex-direction: column; - align-items: center; - gap:40px - - } - .heroContainer > div { - text-align: center - } - .heroContainer div:has(img) { - width: 100%; - } - .language .language_panel { - grid-template-columns: max-content 1fr max-content 1fr; - } +.topLink { + color: gray; + cursor: pointer; + padding-right: 20px; + transition: color 0.2s ease; /* Smooth transition for color change */ + + font-weight: bold; + font: 16px; } +.topLink:hover { + color: white; +} \ No newline at end of file diff --git a/week-1/solutions/vs-code-landing-page/index.html b/week-1/solutions/vs-code-landing-page/index.html index d176361c9..6d013c070 100644 --- a/week-1/solutions/vs-code-landing-page/index.html +++ b/week-1/solutions/vs-code-landing-page/index.html @@ -1,124 +1,70 @@ - - - - - - - Visual Studio Code Landing Page - - - + + + Visual Studio Code - Code Editor + + + -
- - -
+
+
+ + Visual Studio Code + Docs + Updates + Blog + API + Extensions + FAQs + Learn +
+ +
+
+ Search Icon + +
-
- -
+ +
+
+
-
-
-
-
- - Free. Built on open source. Runs anywhere. - -

-

Code Editing. Redefined.

- Download for MacOS -
-
- -
-
-
-
+
+ Version 1.82 is now available! Read about the new features and fixes from July. +
-
-
-

Code in any language

-

VS Code supports almost every major programming language. Several ship in the box, like JavaScript, - TypeScript, CSS, and HTML, but extensions for others can be found in the VS Code Marketplace.

-
- Javascript - JavaScript - TypeScript - TypeScript - Python - Python - C# - C# - C++ - C++ - HTML - HTML - Java - Java - JSON - JSON - PHP - PHP - Markdown - Markdown - Powershell - Powershell - YAML - YAML -
-
-
+
+
+

+ Code faster with AI +

+
+

+ Visual Studio Code with GitHub Copilot supercharges your code with AI-powered suggestions, right in your editor. +

+
+
+
+ + +
-
-
-
-

IntelliSense

-

Smart code completion based on variable types, function definitions, and imported modules.

-
-
-

Debugging

-

Built-in debugging tools to help you identify and fix issues faster.

-
-
-

Extensions

-

Enhance your development workflow with a wide range of extensions.

-
-
-
- - +
+ + Web, Insiders edition, or other platforms + +
+ +
+ +
+
+ +
- - \ No newline at end of file diff --git a/week-2/week-2-async-js/easy/1-counter.js b/week-2/week-2-async-js/easy/1-counter.js new file mode 100644 index 000000000..f8cad47fd --- /dev/null +++ b/week-2/week-2-async-js/easy/1-counter.js @@ -0,0 +1,7 @@ +let counter=0; +const updateCounter=()=>{ + counter++; + console.log(counter) +} + +setInterval(updateCounter,1000) \ No newline at end of file diff --git a/week-2/week-2-async-js/easy/2-counter.js b/week-2/week-2-async-js/easy/2-counter.js new file mode 100644 index 000000000..95896a264 --- /dev/null +++ b/week-2/week-2-async-js/easy/2-counter.js @@ -0,0 +1,10 @@ +let counter = 0; + +const updateCounter = () => { + counter++; + console.log(counter); + + setTimeout(updateCounter, 1000); +}; + +updateCounter(); diff --git a/week-2/week-2-async-js/easy/readFromfile.js b/week-2/week-2-async-js/easy/readFromfile.js new file mode 100644 index 000000000..c0b415a35 --- /dev/null +++ b/week-2/week-2-async-js/easy/readFromfile.js @@ -0,0 +1,21 @@ +const fs = require('fs'); + +fs.readFile('test.txt', 'utf8', (err, data) => { + if (err) { + console.log(err); + return; + } + console.log('File contents:', data); +}); + + +const D = () => { + let sum = 0; + for (let i = 0; i < 10000; i++) { + sum += i; + } + console.log("Testing"+sum) +} + + +D(); diff --git a/week-2/week-2-async-js/easy/test.txt b/week-2/week-2-async-js/easy/test.txt new file mode 100644 index 000000000..9535f17d5 --- /dev/null +++ b/week-2/week-2-async-js/easy/test.txt @@ -0,0 +1 @@ +I hope its working \ No newline at end of file diff --git a/week-2/week-2-async-js/easy/write-to-file.js b/week-2/week-2-async-js/easy/write-to-file.js new file mode 100644 index 000000000..eb0c20b2c --- /dev/null +++ b/week-2/week-2-async-js/easy/write-to-file.js @@ -0,0 +1,13 @@ +const fs = require('fs').promises; + +async function writeToFile(filename, content) { + try { + await fs.writeFile(filename, content, 'utf8'); + console.log('File has been written successfully'); + } catch (error) { + console.error('Error writing to file:', error); + } +} + + +writeToFile('test.txt', 'Working'); diff --git a/week-2/week-2-async-js/hard (promises)/1-promisify-setTimeout.js b/week-2/week-2-async-js/hard (promises)/1-promisify-setTimeout.js index 32a99c83f..eb2bfec5b 100644 --- a/week-2/week-2-async-js/hard (promises)/1-promisify-setTimeout.js +++ b/week-2/week-2-async-js/hard (promises)/1-promisify-setTimeout.js @@ -3,6 +3,14 @@ */ function wait(n) { + let p=new Promise((resolve)=>{ + setTimeout(()=>{ + resolve() + },n*1000) + }) + return p } +wait(5) + module.exports = wait;