Discover a suite of powerful free tools crafted for human like precision . unleash the potential of your website with these intuitive solution that seamlessly blend automation with personal touch . with these versatile user friendly tools revolutionizing how you conquer challenges and propel your online visible to unprecedented heights
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
background-color: #f5f5f5;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
color: #333;
}
.container {
background-color: #ffffff;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
width: 90%;
max-width: 600px;
text-align: center;
}
h1 {
color: #4CAF50;
margin-bottom: 20px;
}
.input-group {
margin-bottom: 20px;
text-align: left;
}
label {
font-size: 18px;
color: #333;
}
input {
width: 100%;
padding: 10px;
font-size: 16px;
border: 2px solid #ddd;
border-radius: 5px;
margin-top: 10px;
}
button {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #45a049;
}
h2 {
color: #333;
margin-top: 20px;
}
#loremOutput {
text-align: left;
font-size: 18px;
margin-top: 10px;
}
p {
margin-bottom: 15px;
}
@media (max-width: 600px) {
input {
font-size: 14px;
}
button {
font-size: 14px;
padding: 8px 16px;
}
}
const loremText = [
"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"Phasellus vitae quam eget nunc volutpat luctus.",
"Aenean sodales, nisi vel auctor malesuada, turpis leo dictum velit.",
"Nam id purus at nunc consequat tristique.",
"Vivamus tempor tortor vitae varius consequat.",
"Sed dapibus mauris id metus malesuada, id sodales odio sollicitudin.",
"Morbi vestibulum purus eget justo vulputate fermentum.",
"Vestibulum convallis orci a erat imperdiet, non venenatis felis mollis.",
"Etiam rhoncus velit non metus vehicula ultricies.",
"Aliquam erat volutpat. Fusce ac elit eu dui elementum interdum.",
"Praesent sollicitudin libero nec risus laoreet volutpat.",
"Curabitur sit amet eros in enim efficitur tempor.",
"Proin vestibulum nunc vel erat fermentum, eget rhoncus enim pulvinar.",
"Pellentesque vel nunc vel augue vulputate finibus ut eu est.",
"Cras eget arcu at orci tristique tempor.",
"Nunc bibendum erat a augue ultricies, ut tincidunt urna pharetra.",
"Nulla facilisi. Duis scelerisque mi a eros vulputate, ac cursus nulla malesuada.",
"Integer nec risus quis risus auctor vehicula vel sit amet augue.",
"Sed pharetra nulla id velit scelerisque, eget iaculis eros tincidunt.",
"Nam eget purus id turpis convallis malesuada."
];
// Function to generate lorem ipsum text
function generateLoremText() {
const paragraphs = document.getElementById('paragraphs').value;
const output = document.getElementById('loremOutput');
output.innerHTML = '';
if (paragraphs < 1 || paragraphs > 20) {
alert('Please enter a number between 1 and 20');
return;
}
for (let i = 0; i < paragraphs; i++) {
const randomIndex = Math.floor(Math.random() * loremText.length);
const paragraph = document.createElement('p');
paragraph.textContent = loremText[randomIndex];
output.appendChild(paragraph);
}
}
// Event listener for the Generate button
document.getElementById('generateButton').addEventListener('click', generateLoremText);
Features:
Lorem Text Generation: Generates a specified number of paragraphs of dummy text (1 to 20).
Randomized Paragraphs: Each paragraph is selected randomly from predefined sentences.
Responsive Design: Works seamlessly on both desktop and mobile devices.
Colorful Styling: Clean and attractive styling for a modern look.
How It Works:
Number of Paragraphs: The user inputs the number of paragraphs they want to generate.
Generate Text: Upon clicking the "Generate Lorem Text" button, random paragraphs are selected and displayed in the output area.
This tool provides an easy way to generate placeholder text with user control over the number of paragraphs.
Comments
Post a Comment