t
This commit is contained in:
@@ -17,13 +17,41 @@ function generateRandomName($length = 6) {
|
||||
$randomFirstName = generateRandomName(mt_rand(4, 8));
|
||||
$randomLastName = generateRandomName(mt_rand(4, 8));
|
||||
?>
|
||||
<div class="container-zz mx-auto my-20">
|
||||
<h2 style="font-size: 25px; text-align: center;">Get a Random Name</h2>
|
||||
<p style="font-size: 25px;">First Name: <?php echo $randomFirstName; ?> </p>
|
||||
<p style="font-size: 25px;">Last Name: <?php echo $randomLastName; ?> </p>
|
||||
<section class="diZContainer diZmxAuto diZmy8">
|
||||
<h2 class="diZBorderBottom">Get a Random Name</h2>
|
||||
<div class="diZMaxW500 diZFlexColumn diZItemsCenter diZJustifyCenter diZmxAuto toolsSection diZmy20">
|
||||
<span class="diZDisplayNone" id="copiedNoticeName">Copied to clipboard</span>
|
||||
<div class="diZFlexRow diZItemsCenter diZJustifyCenter">
|
||||
<h2 id="randomName"><?php echo $randomFirstName . ' ' . $randomLastName; ?></h2>
|
||||
<span class="diZCursorPointer" onclick="copyNameToClipboard()"><img src="/assets/svg/copy.svg" alt="Copy to Clipboard"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<h3>Random Name Usage:</h3>
|
||||
<ul>
|
||||
<li class="diZTextJustify diZmt2">Generate random names for testing or placeholder purposes in applications or websites.</li>
|
||||
<li class="diZTextJustify diZmt2">Use randomly generated names in mockups or design prototypes.</li>
|
||||
<li class="diZTextJustify diZmt2">Create unique usernames or profile names in development environments.</li>
|
||||
<li class="diZTextJustify diZmt2">Generate fictional character names for creative writing or gaming applications.</li>
|
||||
<li class="diZTextJustify diZmt2">Provide random names for demo accounts or example data in presentations.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<style>
|
||||
.container-zz{width:100%}@media (min-width: 640px){.container-zz{max-width:640px}}@media (min-width: 768px){.container-zz{max-width:768px}}@media (min-width: 1024px){.container-zz{max-width:1024px}}@media (min-width: 1280px){.container-zz{max-width:1280px}}@media (min-width: 1536px){.container-zz{max-width:1536px}}
|
||||
.mx-auto{margin-left:auto;margin-right:auto}
|
||||
.my-20{margin-top:5rem;margin-bottom:5rem}
|
||||
</style>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
function copyNameToClipboard() {
|
||||
var copyText = document.getElementById('randomName');
|
||||
var textArea = document.createElement('textarea');
|
||||
textArea.value = copyText.textContent.trim();
|
||||
document.body.appendChild(textArea);
|
||||
textArea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textArea);
|
||||
|
||||
var copiedNotice = document.getElementById('copiedNoticeName');
|
||||
copiedNotice.style.display = 'block';
|
||||
setTimeout(function() {
|
||||
copiedNotice.style.display = 'none';
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user