Your commit message

This commit is contained in:
RameshT 2024-08-13 15:22:21 +05:30
parent 3416f8a575
commit 4cbb962963
2 changed files with 133 additions and 35 deletions

86
assets/css/dummy.css Normal file
View File

@ -0,0 +1,86 @@
/* Basic Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Container Styling */
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
/* Header Styling */
header {
background-color: #f8f9fa;
padding: 20px;
text-align: center;
border-bottom: 1px solid #dee2e6;
}
header h1 {
font-size: 2rem;
color: #343a40;
}
/* Navigation Styling */
nav {
margin-top: 10px;
}
nav ul {
list-style-type: none;
display: flex;
justify-content: center;
}
nav ul li {
margin: 0 15px;
}
nav ul li a {
text-decoration: none;
color: #007bff;
font-size: 1rem;
}
nav ul li a:hover {
text-decoration: underline;
}
/* Main Content Styling */
main {
padding: 20px;
}
article {
margin-bottom: 20px;
}
article h2 {
font-size: 1.5rem;
color: #495057;
}
article p {
line-height: 1.6;
color: #212529;
}
/* Footer Styling */
footer {
background-color: #f8f9fa;
padding: 10px;
text-align: center;
border-top: 1px solid #dee2e6;
}
footer p {
font-size: 0.875rem;
color: #6c757d;
}

View File

@ -1,44 +1,56 @@
// Importing React (necessary if using JSX) /**
import React from "react"; * A simple function to calculate the sum of two numbers.
*
* @param {number} a - The first number.
* @param {number} b - The second number.
* @returns {number} The sum of the two numbers.
*/
// Example function using a regular function declaration function add(a, b) {
function multiply(x, y) { return a + b;
return x * y;
} }
// Example usage of a function /**
let result = multiply(4, 5); * Logs a greeting message to the console.
console.log("The product is:", result); // Output: The product is: 20 *
* @param {string} name - The name to greet.
// Example of a variable declared with let */
let count = 0; function greet(name) {
for (let i = 0; i < 5; i++) { console.log(`Hello, ${name}!`);
count += i;
} }
console.log("The count is:", count); // Output: The count is: 10 // Example usage
const result = add(5, 10);
// Example of a variable declared with let (instead of const) console.log(`The result is: ${result}`);
let message = "This is a message";
console.log(message);
// Example of a React functional component greet("Alice"); // Replaced 'Alice' with "Alice"
function Greeting({ name }) {
return ( /**
<div> * An example class demonstrating basic TypeScript features in JavaScript.
<h1>Hello, {name}!</h1> */
</div> class Person {
); /**
* Creates an instance of Person.
*
* @param {string} name - The name of the person.
* @param {number} age - The age of the person.
*/
constructor(name, age) {
this.name = name;
this.age = age;
} }
// Usage of the Greeting component /**
function App() { * Introduces the person.
return ( *
<div> * @returns {string} A greeting message.
<Greeting name="Alice" /> */
</div> introduce() {
); return `Hi, I'm ${this.name} and I'm ${this.age} years old.`;
}
} }
// Export the App component for usage in other parts of the application // Example usage of the Person class
export default App; const person = new Person("Bob", 25); // Replaced 'Bob' with "Bob"
console.log(person.introduce());