Pages

Sunday, 1 December 2024

Dummy Placeholder Generator Tool



Dummy Placeholder Generator Tool

Dummy Placeholder Generator

* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: Arial, sans-serif; background: linear-gradient(to right, #ff7e5f, #feb47b); color: #fff; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .container { text-align: center; background-color: rgba(0, 0, 0, 0.7); padding: 40px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); } h1.title { font-size: 2.5em; margin-bottom: 20px; color: #fff; } .form-group { margin-bottom: 20px; } input, select { padding: 10px; margin-top: 10px; border-radius: 5px; border: none; width: 60%; font-size: 1.1em; } .generate-btn { background-color: #ff7e5f; border: none; padding: 15px 30px; font-size: 1.2em; color: #fff; border-radius: 5px; cursor: pointer; transition: background-color 0.3s ease; } .generate-btn:hover { background-color: #feb47b; } .output { margin-top: 30px; text-align: left; font-size: 1.1em; max-width: 90%; margin: 0 auto; color: #ddd; word-wrap: break-word; } p { margin-bottom: 15px; } function generateText() { const textLength = document.getElementById('textLength').value; const textType = document.getElementById('textType').value; let outputText = ''; // Generate Lorem Ipsum text if (textType === 'lorem') { for (let i = 0; i < textLength; i++) { outputText += `

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

`; } } // Generate Random text else if (textType === 'random') { for (let i = 0; i < textLength; i++) { outputText += `

${faker.lorem.sentence()}

`; } } // Display generated text document.getElementById('output').innerHTML = outputText; }