Calculator Tools Calculator Tools
Create

MrBeast Meme

Sep 18, 2023

About this app

Create your own MrBeast Meme

MrBeast Meme MrBeast Meme Generator Top Text Bottom Text Image URL Generate

Related apps

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>MrBeast Meme</title>
<meta name="description" content="Create your own MrBeast Meme">
<meta name="keywords" content="MrBeast, meme, fun, meme generator">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Function to generate the meme
function generateMeme() {
var topText = $("#top-text").val();
var bottomText = $("#bottom-text").val();
var imageUrl = $("#image-url").val();

// Check if any of the inputs are empty
if (topText === "" || bottomText === "" || imageUrl === "") {
alert("Please fill in all fields.");
return;
}

// Generate the meme HTML
var memeHtml = `<div class="meme-container">
<img class="meme-image" src="${imageUrl}">
<div class="meme-text meme-top-text">${topText}</div>
<div class="meme-text meme-bottom-text">${bottomText}</div>
</div>`;

// Append the meme to the main container
$("#main-container").append(memeHtml);

// Clear the input fields
$("#top-text").val("");
$("#bottom-text").val("");
$("#image-url").val("");
}

// Event listener for the generate button
$("#generate-btn").click(function() {
generateMeme();
});
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
/* App CSS Goes Here */
body {
background-color: #f8f9fa;
font-family: 'Open Sans', sans-serif;
}

.container {
max-width: 600px;
margin: 50px auto;
padding: 20px;
background-color: #ffffff;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

h1 {
text-align: center;
margin-bottom: 30px;
color: #333333;
}

.form-group {
margin-bottom: 20px;
}

.form-group label {
display: block;
font-weight: bold;
color: #333333;
margin-bottom: 10px;
}

.form-control {
width: 100%;
padding: 10px;
border: 1px solid #cccccc;
border-radius: 5px;
}

.generate-btn {
width: 100%;
padding: 10px;
background-color: #007bff;
color: #ffffff;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}

.generate-btn:hover {
background-color: #0056b3;
}

.meme-container {
position: relative;
text-align: center;
margin-bottom: 30px;
}

.meme-image {
max-width: 100%;
border-radius: 5px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.meme-text {
position: absolute;
width: 100%;
text-align: center;
font-size: 30px;
font-weight: bold;
color: #ffffff;
text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
pointer-events: none;
}

.meme-top-text {
top: 10px;
}

.meme-bottom-text {
bottom: 10px;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>MrBeast Meme Generator</h1>

<div class="form-group">
<label for="top-text">Top Text</label>
<input type="text" id="top-text" class="form-control" placeholder="Enter top text">
</div>

<div class="form-group">
<label for="bottom-text">Bottom Text</label>
<input type="text" id="bottom-text" class="form-control" placeholder="Enter bottom text">
</div>

<div class="form-group">
<label for="image-url">Image URL</label>
<input type="text" id="image-url" class="form-control" placeholder="Enter image URL">
</div>

<button id="generate-btn" class="generate-btn">Generate</button>
</div>
</body>
</html>