diff --git a/package-lock.json b/package-lock.json index 89fc906..43a489a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -76,6 +76,7 @@ "version": "7.29.7", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.7", @@ -445,6 +446,7 @@ "node_modules/@firebase/app": { "version": "0.14.13", "license": "Apache-2.0", + "peer": true, "dependencies": { "@firebase/component": "0.7.3", "@firebase/logger": "0.5.1", @@ -501,6 +503,7 @@ "node_modules/@firebase/app-compat": { "version": "0.5.13", "license": "Apache-2.0", + "peer": true, "dependencies": { "@firebase/app": "0.14.13", "@firebase/component": "0.7.3", @@ -515,6 +518,7 @@ "node_modules/@firebase/app-types": { "version": "0.9.5", "license": "Apache-2.0", + "peer": true, "dependencies": { "@firebase/logger": "0.5.1" } @@ -904,6 +908,7 @@ "version": "1.15.1", "hasInstallScript": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "tslib": "^2.1.0" }, @@ -1083,6 +1088,7 @@ "node_modules/@mdx-js/loader": { "version": "3.1.1", "license": "MIT", + "peer": true, "dependencies": { "@mdx-js/mdx": "^3.0.0", "source-map": "^0.7.0" @@ -1138,6 +1144,7 @@ "node_modules/@mdx-js/react": { "version": "3.1.1", "license": "MIT", + "peer": true, "dependencies": { "@types/mdx": "^2.0.0" }, @@ -1552,9 +1559,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1571,9 +1575,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1590,9 +1591,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1609,9 +1607,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1796,6 +1791,7 @@ "node_modules/@types/react": { "version": "19.2.15", "license": "MIT", + "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -1804,6 +1800,7 @@ "version": "19.2.3", "devOptional": true, "license": "MIT", + "peer": true, "peerDependencies": { "@types/react": "^19.2.0" } @@ -1861,6 +1858,7 @@ "version": "8.60.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.60.0", "@typescript-eslint/types": "8.60.0", @@ -2120,9 +2118,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2136,9 +2131,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2152,9 +2144,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2168,9 +2157,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2248,6 +2234,7 @@ "node_modules/acorn": { "version": "8.16.0", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2565,6 +2552,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.10.12", "caniuse-lite": "^1.0.30001782", @@ -2859,6 +2847,7 @@ "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "license": "ISC", + "peer": true, "engines": { "node": ">=12" } @@ -3326,6 +3315,7 @@ "version": "9.39.4", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -3495,6 +3485,7 @@ "version": "2.32.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -5125,9 +5116,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5148,9 +5136,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5171,9 +5156,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5194,9 +5176,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -6873,6 +6852,7 @@ "node_modules/react": { "version": "19.2.4", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -6880,6 +6860,7 @@ "node_modules/react-dom": { "version": "19.2.4", "license": "MIT", + "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -7448,6 +7429,7 @@ "node_modules/shiki": { "version": "4.2.0", "license": "MIT", + "peer": true, "dependencies": { "@shikijs/core": "4.2.0", "@shikijs/engine-javascript": "4.2.0", @@ -7796,7 +7778,8 @@ }, "node_modules/tailwindcss": { "version": "4.3.0", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/tapable": { "version": "2.3.3", @@ -7845,6 +7828,7 @@ "version": "4.0.4", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -8001,6 +7985,7 @@ "version": "5.9.3", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -8459,6 +8444,7 @@ "version": "4.4.3", "dev": true, "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/project/src/data/docs/css.ts b/project/src/data/docs/css.ts index b447425..45f3050 100644 --- a/project/src/data/docs/css.ts +++ b/project/src/data/docs/css.ts @@ -3,384 +3,633 @@ import { TopicContent } from './contentMap'; export const cssData: Record = { introduction: { title: "CSS Introduction", - description: "CSS is the language we use to style an HTML document.", - intro: "CSS describes how HTML elements should be displayed. This tutorial will teach you CSS from basic to advanced.", + description: "CSS controls the visual design of an HTML document.", + intro: "CSS determines how HTML elements look on the screen. It stands for Cascading Style Sheets. Developers use CSS to set colors, fonts, layouts, and animations across entire websites.", keyPoints: [ - "CSS stands for Cascading Style Sheets.", - "CSS saves a lot of work. It can control the layout of multiple web pages all at once.", - "External stylesheets are stored in CSS files." + "CSS saves time by styling multiple pages at once.", + "External stylesheets live in separate CSS files.", + "It separates content (HTML) from design (CSS).", + "CSS handles layouts for different screen sizes." ] }, syntax: { title: "CSS Syntax", - description: "A CSS rule consists of a selector and a declaration block.", - intro: "The selector points to the HTML element you want to style. The declaration block contains one or more declarations separated by semicolons. Each declaration includes a CSS property name and a value, separated by a colon.", + description: "CSS syntax connects styling rules to HTML elements.", + intro: "A CSS rule needs a selector and a declaration block. The selector targets the specific HTML element. The declaration block holds properties and values to style that element.", syntax: { language: "css", - code: `h1 {\n color: blue;\n font-size: 12px;\n}` + code: `/* css syntax */\nselector {\n property: value;\n}` }, tryItYourself: { - html: `

Hello World!

\n

This paragraph is styled with CSS.

`, - css: `h1 {\n color: white;\n text-align: center;\n}\np {\n font-family: verdana;\n font-size: 20px;\n}` - } + html: `\n\n\n \n \n \n CSS Syntax\n \n \n

Hello World!

\n

This text uses CSS.

\n \n`, + css: `/* this styles the elements */\nh1 {\n color: blue;\n text-align: center;\n}\n\np {\n font-size: 20px;\n}` + }, + keyPoints: [ + "The selector targets the HTML tag.", + "Curly braces surround the declaration block.", + "A colon separates properties and values.", + "Every declaration ends with a semicolon." + ] }, selectors: { title: "CSS Selectors", - description: "CSS selectors are used to find (or select) the HTML elements you want to style.", - intro: "We can divide CSS selectors into five categories: Simple selectors, Combinator selectors, Pseudo-class selectors, Pseudo-elements selectors, and Attribute selectors.", + description: "CSS selectors target the HTML elements you want to style.", + intro: "CSS uses selectors to find elements on the page. You can target elements by their tag name, class, or id. This allows developers to style specific sections without affecting the entire site.", example: { language: "css", - code: `/* Element Selector */\np {\n text-align: center;\n color: red;\n}\n\n/* ID Selector */\n#para1 {\n text-align: center;\n color: red;\n}\n\n/* Class Selector */\n.center {\n text-align: center;\n color: red;\n}` - } + code: `/* this shows different selectors */\np {\n color: red;\n}\n\n#special {\n color: blue;\n}\n\n.highlight {\n color: yellow;\n}` + }, + keyPoints: [ + "Element selectors target specific HTML tags.", + "ID selectors target one unique element.", + "Class selectors target a group of elements.", + "The asterisk targets every element on the page." + ] }, "how-to": { title: "CSS How To", - description: "How to add CSS to your HTML.", - intro: "There are three ways of inserting a style sheet: External CSS, Internal CSS, and Inline CSS.", + description: "CSS connects to HTML documents in three different ways.", + intro: "Developers attach CSS to HTML using external files, internal style tags, or inline attributes. External stylesheets keep code organized and cacheable. Inline styles mix design with content and should be avoided.", keyPoints: [ - "External CSS is ideal for styling multiple pages.", - "Internal CSS is used for styling a single page.", - "Inline CSS is used for styling a single element." + "External CSS uses the `` tag inside the head.", + "Internal CSS uses the `\n \n \n

Styled Heading

\n \n` }, keyPoints: [ - "External CSS is the most common and practical way to style HTML." + "CSS stands for Cascading Style Sheets.", + "CSS controls visual appearance.", + "External stylesheets keep HTML clean.", + "The `` tag connects external CSS." ] }, links: { title: "HTML Links", - description: "Links are found in nearly all web pages. Links allow users to click their way from page to page.", - intro: "HTML links are hyperlinks. You can click on a link and jump to another document. The HTML `` tag defines a hyperlink.", + description: "HTML links connect web pages together.", + intro: "HTML creates hyperlinks that let users navigate between pages. The `` anchor tag defines a link, and the `href` attribute specifies the destination URL. External links should open in a new tab securely.", syntax: { language: "html", - code: `link text` + code: `\nVisit` + }, + example: { + language: "html", + code: `\n\n\n \n \n \n Links\n \n \n About Us\n \n` }, tryItYourself: { - html: `Visit Example.com (opens in new tab)` + html: `\n\n\n \n \n \n Links\n \n \n About Us\n \n` }, keyPoints: [ - "The `href` attribute specifies the destination address.", - "The `target` attribute specifies where to open the linked document (e.g. `_blank` for a new window)." + "The `` tag defines hyperlinks.", + "The `href` attribute holds the destination address.", + "Absolute URLs link to other websites.", + "Relative URLs link to local pages." ] }, images: { title: "HTML Images", - description: "Images can improve the design and the appearance of a web page.", - intro: "In HTML, images are defined with the `` tag. The `` tag is empty, it contains attributes only, and does not have a closing tag.", + description: "HTML images add visual content to web pages.", + intro: "HTML embeds images using the `` tag. This tag is a void element, so it requires no closing tag. The `src` attribute tells the browser where to find the image file.", syntax: { language: "html", - code: `alternatetext` + code: `\nA description of the photo` + }, + example: { + language: "html", + code: `\n\n\n \n \n \n Images\n \n \n Hero banner\n \n` }, tryItYourself: { - html: `Placeholder image` + html: `\n\n\n \n \n \n Images\n \n \n Hero banner\n \n` }, keyPoints: [ - "The `src` attribute specifies the path to the image.", - "The `alt` attribute specifies an alternate text for the image, if the image for some reason cannot be displayed." + "The `` tag embeds images.", + "The `src` attribute defines the file path.", + "The `alt` attribute provides accessible text.", + "Dimensions prevent layout shifts." ] }, favicon: { title: "HTML Favicon", - description: "A favicon is a small image displayed next to the page title in the browser tab.", - intro: "To add a favicon to your website, you use the `` tag inside the `` element. The image file should ideally be a .ico, .png, or .svg file.", + description: "HTML favicons display small icons in browser tabs.", + intro: "HTML pages show a small icon next to the page title in the browser tab. Developers use the `` tag to attach this icon. Browsers request standard formats like `.ico`, `.png`, or `.svg`.", syntax: { language: "html", - code: `\n \n` - } + code: `\n` + }, + example: { + language: "html", + code: `\n\n\n \n \n \n Favicon\n \n \n \n

Check the tab icon

\n \n` + }, + tryItYourself: { + html: `\n\n\n \n \n \n Favicon\n \n \n \n

Check the tab icon

\n \n` + }, + keyPoints: [ + "Favicons appear in browser tabs.", + "The `` tag connects the icon file.", + "The `href` attribute points to the image path.", + "Browsers cache favicons aggressively." + ] }, "page-title": { title: "HTML Page Title", - description: "The element defines the title of the document.", - intro: "The `<title>` element must be text-only, and it is shown in the browser's title bar or in the page's tab. It is very important for Search Engine Optimization (SEO).", + description: "HTML page titles name the browser tab and search result.", + intro: "HTML uses the `<title>` tag to name the document. Browsers display this title in the tab bar and history logs. Search engines use the title to name search results.", syntax: { language: "html", - code: `<head>\n <title>HTML Page Title\n` - } + code: `\nPage Title | Site Name` + }, + example: { + language: "html", + code: `\n\n\n \n \n \n HTML5 Roadmap | DemonTech\n \n \n

Main Content

\n \n` + }, + tryItYourself: { + html: `\n\n\n \n \n \n HTML5 Roadmap | DemonTech\n \n \n

Main Content

\n \n` + }, + keyPoints: [ + "The `` tag names the document.", + "Browsers show titles in tabs.", + "Search engines display titles in results.", + "Each page requires one unique title." + ] }, tables: { title: "HTML Tables", - description: "HTML tables allow web developers to arrange data into rows and columns.", - intro: "An HTML table consists of one `<table>` element and one or more `<tr>`, `<th>`, and `<td>` elements.", + description: "HTML tables organize structured data into rows and columns.", + intro: "HTML tables display data in a grid format. The `<table>` element wraps rows, headers, and data cells. Developers organize complex tables with header, body, and footer sections.", + syntax: { + language: "html", + code: `<!-- table structure -->\n<table>\n <caption>Monthly Sales</caption>\n <thead>\n <tr>\n <th scope="col">Month</th>\n </tr>\n </thead>\n</table>` + }, example: { language: "html", - code: `<table>\n <tr>\n <th>Company</th>\n <th>Contact</th>\n </tr>\n <tr>\n <td>Alfreds Futterkiste</td>\n <td>Maria Anders</td>\n </tr>\n</table>` + code: `<!-- this defines a table -->\n<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>Tables\n \n \n \n \n \n \n \n \n \n
Name
Alice
\n \n` }, tryItYourself: { - html: `\n \n \n
NameAge
John25
` - } + html: `\n\n\n \n \n \n Tables\n \n \n \n \n \n \n \n \n \n
Name
Alice
\n \n` + }, + keyPoints: [ + "The `` element creates data grids.", + "The `` tag defines table rows.", + "The `
` tag defines header cells.", + "The `` tag defines data cells." + ] }, lists: { title: "HTML Lists", - description: "HTML lists allow web developers to group a set of related items in lists.", - intro: "An unordered list starts with the `