Skip to content

Commit

Permalink
Daily Devotionals
Browse files Browse the repository at this point in the history
  • Loading branch information
taneeshaa15 committed Aug 9, 2024
1 parent fe2181a commit bcf2d58
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Daily Devotionals Extension/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"manifest_version": 3,
"name": "Daily Devotionals",
"version": "1.0",
"description": "A Chrome extension that displays daily devotionals.",
"permissions": [],
"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "icons/icon16.png",
"48": "icons/icon48.png",
"128": "icons/icon128.png"
}
},
"icons": {
"16": "icons/icon16.png",
"48": "icons/icon48.png",
"128": "icons/icon128.png"
}
}

37 changes: 37 additions & 0 deletions Daily Devotionals Extension/popup.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 10px;
width: 300px;
}

.container {
text-align: center;
}

h1 {
font-size: 24px;
margin-bottom: 20px;
}

#devotional {
background-color: #f9f9f9;
padding: 15px;
border: 1px solid #ddd;
border-radius: 5px;
margin-bottom: 15px;
}

button {
background-color: #007bff;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
}

button:hover {
background-color: #0056b3;
}

19 changes: 19 additions & 0 deletions Daily Devotionals Extension/popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Daily Devotionals</title>
<link rel="stylesheet" href="popup.css">
</head>
<body>
<div class="container">
<h1>Daily Devotionals</h1>
<div id="devotional">
<p>Loading...</p>
</div>
<button id="refresh">Refresh</button>
</div>
<script src="popup.js"></script>
</body>
</html>
23 changes: 23 additions & 0 deletions Daily Devotionals Extension/popup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
document.addEventListener('DOMContentLoaded', function() {
const devotionalElement = document.getElementById('devotional');
const refreshButton = document.getElementById('refresh');

function fetchDevotional() {
// Simulate fetching a daily devotional
const devotionals = [
"Start your day with a grateful heart.",
"God's love never fails.",
"You are blessed beyond measure.",
"Faith can move mountains.",
"Be strong and courageous."
];
const devotional = devotionals[Math.floor(Math.random() * devotionals.length)];
devotionalElement.innerHTML = `<p>${devotional}</p>`;
}

refreshButton.addEventListener('click', fetchDevotional);

// Fetch a devotional when the popup is opened
fetchDevotional();
});

0 comments on commit bcf2d58

Please sign in to comment.