From 509a5f3b7eb342ae94e0785439df00f2be5dbf8b Mon Sep 17 00:00:00 2001 From: nodemixaholic Date: Tue, 5 Mar 2024 19:46:24 +0000 Subject: [PATCH] Upload files to '' --- index.html | 73 ++++++++++++++++++++++++++++++++++++++++ script.js | 32 ++++++++++++++++++ styling.css | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 200 insertions(+) create mode 100644 index.html create mode 100644 script.js create mode 100644 styling.css diff --git a/index.html b/index.html new file mode 100644 index 0000000..4729d7e --- /dev/null +++ b/index.html @@ -0,0 +1,73 @@ + + + + + + Sam's Homepage + + + + +
+

"Hello, World!" --some computer

+

+ + +

Nifty Links

+ +

AI/Social

+

+ Gemini + ChatGPT + Discord + Sparksammy's Linktree +

+ +

Learning & Education

+

+ Udemy + freeCodeCamp.org + The Coding Train +

+ +

Documentation

+

+ Mozilla Developer Docs + ROBLOX Developer Wiki + JavaScript MDN Docs + HTML MDN Docs + CSS MDN Docs + Windows Documentation + Die.net - Linux Man Pages + W3Schools +

+ +

News & Security

+

+ The Verge + Ars Technica + Engadget + MIT Technology Review + Wired + Krebs on Security +

+ +

More Coding YouTube Channels

+

+ The Coding Train + Traversy Media + Frontend Masters + Codecademy + The TechLead + Fireship + No Boilerplate +

+ +
+
+ + + \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..49d6d4f --- /dev/null +++ b/script.js @@ -0,0 +1,32 @@ +let codingMode = true; // Set to true for coding mode (no api calls to bible passage) + +//https://labs.bible.org/api/?passage=random&formatting=plain&type=text +async function fetchBiblePassage() { + try { + let textData; + if (codingMode == true) { + textData = 'Samuel 16:9 - And he said, "I now know de wae" in zimbabwe.'; + } else { + const response = await fetch('https://labs.bible.org/api/?passage=random&formatting=plain&type=text'); + textData = await response.text(); + } + document.getElementById('biblepassage').textContent = textData; + } catch (error) { + console.error('Error fetching Bible passage:', error); + // Handle the error gracefully, e.g., display an error message to the user + } +} + + fetchBiblePassage(); + +const searchButton = document.getElementById('search-button'); +const searchInput = document.getElementById('search-input'); + +searchButton.addEventListener('click', () => { + const searchTerm = searchInput.value; + if (searchTerm) { + window.location.href = `https://search.sparksammy.com/search.php?q=${searchTerm}&p=0&t=0`; + } else { + alert('Please enter a search term.'); + } +}); \ No newline at end of file diff --git a/styling.css b/styling.css new file mode 100644 index 0000000..2245338 --- /dev/null +++ b/styling.css @@ -0,0 +1,95 @@ +/* Basic styles */ + body { + font-family: Arial, sans-serif; + margin: 0; + padding: 0; + background-color: white; + color: black; + } + + /* With dark mode */ + @media (prefers-color-scheme: dark) { + body { + background-color: black; + color: white; + } + + /* Apply dark mode styles to other elements as needed */ + } + + + h1 { + text-align: center; + margin-top: 20px; + } + + p { + text-align: center; + margin-bottom: 10px; + } + + a { + text-decoration: none; + color: #007bff; + border: 1px solid #ddd; + border-radius: 5px; + font-size: 1.2rem; + padding-left: 1.2rem; + padding-right: 1.2rem; + margin-top: 0; + margin-bottom: 0; + } + + a:hover { + background-color: #ddd; + } + + #search-bar { + display: flex; + justify-content: center; + align-items: center; + margin: 20px auto; + width: 60%; + } + + #search-input { + padding: 5px; + border: 1px solid #ccc; + flex: 1; + } + + #search-button { + padding: 5px 10px; + border: 1px solid #ccc; + cursor: pointer; + background-color: #007bff; + color: white; + } + + /* Media queries for responsiveness */ + + @media only screen and (max-width: 768px) { + /* Styles for screens smaller than 768px (mobile devices) */ + h1 { + font-size: 1.5rem; /* Adjust font size for smaller screens */ + } + + p { + font-size: 1rem; /* Adjust font size for smaller screens */ + } + + a { + font-size: 0.8rem; /* Adjust font size for smaller screens */ + } + + #search-bar { + width: 80%; /* Adjust width for smaller screens */ + } + } + + @media only screen and (min-width: 768px) { + /* Styles for screens wider than 768px (desktop) */ + #search-bar { + width: 40%; /* Adjust width for larger screens */ + } + } \ No newline at end of file