Skip to content

Instantly share code, notes, and snippets.

@merlinmann
Created March 1, 2025 07:32
Show Gist options
  • Save merlinmann/7c8df05d56d59fea220202ed4efc1db6 to your computer and use it in GitHub Desktop.
Save merlinmann/7c8df05d56d59fea220202ed4efc1db6 to your computer and use it in GitHub Desktop.
Pontiff Status Dashboard
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Is the Pope Alive?</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f4f4f4;
}
.status {
font-size: 2rem;
padding: 20px;
background: white;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body>
<h1>Is the Pope still alive?</h1>
<div class="status" id="pope-status">Checking...</div>
<script>
async function checkPopeStatus() {
try {
let response = await fetch('https://en.wikipedia.org/api/rest_v1/page/summary/Pope_Francis');
let data = await response.json();
if (data.extract.includes("was")) {
document.getElementById('pope-status').textContent = "No";
} else {
document.getElementById('pope-status').textContent = "Yes";
}
} catch (error) {
document.getElementById('pope-status').textContent = "Error checking status";
}
}
checkPopeStatus();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment