πŸ’» Lorem Code

Python, JavaScript, HTML λ“± λ‹€μ–‘ν•œ μ–Έμ–΄μ˜ 더미 μ½”λ“œλ₯Ό μƒμ„±ν•˜μ„Έμš”


        

Welcome to Our Website

Lorem ipsum dolor sit amet consectetur.

` }, css: { function: () => `/* Lorem CSS Styles */ :root { --primary-color: #667eea; --secondary-color: #764ba2; --text-color: #333; --bg-color: #ffffff; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text-color); background: var(--bg-color); line-height: 1.6; } .container { max-width: 1200px; margin: 0 auto; padding: 20px; } .button { display: inline-block; padding: 12px 24px; background: var(--primary-color); color: white; border-radius: 8px; text-decoration: none; transition: all 0.3s ease; } .button:hover { background: var(--secondary-color); transform: translateY(-2px); }` } }; function init() { generateCode(); document.getElementById('language').addEventListener('change', generateCode); document.getElementById('codeType').addEventListener('change', generateCode); document.getElementById('lineCount').addEventListener('change', generateCode); } function generateCode() { const language = document.getElementById('language').value; const codeType = document.getElementById('codeType').value; let code = ''; if (codeTemplates[language] && codeTemplates[language][codeType]) { code = codeTemplates[language][codeType](); } else if (codeTemplates[language] && codeTemplates[language]['function']) { code = codeTemplates[language]['function'](); } else { code = '// Code template not available for this combination'; } document.getElementById('generatedCode').textContent = code; } function copyCode() { const code = document.getElementById('generatedCode').textContent; navigator.clipboard.writeText(code).then(() => { alert('βœ… μ½”λ“œκ°€ ν΄λ¦½λ³΄λ“œμ— λ³΅μ‚¬λ˜μ—ˆμŠ΅λ‹ˆλ‹€!'); }); } function downloadCode() { const code = document.getElementById('generatedCode').textContent; const language = document.getElementById('language').value; const extensions = { javascript: 'js', python: 'py', html: 'html', css: 'css', java: 'java', csharp: 'cs', php: 'php', ruby: 'rb' }; const blob = new Blob([code], { type: 'text/plain' }); const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.href = url; link.download = 'lorem-code.' + (extensions[language] || 'txt'); link.click(); URL.revokeObjectURL(url); } function toggleTheme() { document.body.classList.toggle('dark'); const btn = document.querySelector('.theme-toggle'); btn.textContent = document.body.classList.contains('dark') ? 'β˜€οΈ 라이트λͺ¨λ“œ' : 'πŸŒ™ 닀크λͺ¨λ“œ'; } init();