mirror of
https://github.com/Sneed-Group/old-test-homepage
synced 2024-12-23 03:35:15 -06:00
Upload files to ''
This commit is contained in:
parent
beb28d827c
commit
509a5f3b7e
3 changed files with 200 additions and 0 deletions
73
index.html
Normal file
73
index.html
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Sam's Homepage</title>
|
||||||
|
<link rel="stylesheet" href="styling.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--a header saying hello -->
|
||||||
|
<div align="center">
|
||||||
|
<h1>"Hello, World!" --some computer</h1>
|
||||||
|
<p><b><i id="biblepassage"></i></b></p>
|
||||||
|
<div id="search-bar">
|
||||||
|
<input type="text" id="search-input" placeholder="Search Sparksammy">
|
||||||
|
<button id="search-button">Search</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Nifty Links</h2>
|
||||||
|
|
||||||
|
<h3>AI/Social</h3>
|
||||||
|
<p>
|
||||||
|
<a href="https://gemini.google.com/app">Gemini</a>
|
||||||
|
<a href="https://chat.openai.com">ChatGPT</a>
|
||||||
|
<a href="https://discord.com/app">Discord</a>
|
||||||
|
<a href="https://linktr.ee/anonymouse42">Sparksammy's Linktree</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Learning & Education</h3>
|
||||||
|
<p>
|
||||||
|
<a href="https://www.udemy.com/">Udemy</a>
|
||||||
|
<a href="https://www.youtube.com/c/freeCodeCamp">freeCodeCamp.org</a>
|
||||||
|
<a href="https://www.youtube.com/c/TheCodingTrain">The Coding Train</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Documentation</h3>
|
||||||
|
<p>
|
||||||
|
<a href="https://developer.mozilla.org/en-US/docs/Web">Mozilla Developer Docs</a>
|
||||||
|
<a href="https://developer.roblox.com/en-US/">ROBLOX Developer Wiki</a>
|
||||||
|
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">JavaScript MDN Docs</a>
|
||||||
|
<a href="https://developer.mozilla.org/en-US/docs/Web/HTML">HTML MDN Docs</a>
|
||||||
|
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS">CSS MDN Docs</a>
|
||||||
|
<a href="https://docs.microsoft.com/en-us/windows/">Windows Documentation</a>
|
||||||
|
<a href="https://linux.die.net/man/">Die.net - Linux Man Pages</a>
|
||||||
|
<a href="https://www.w3schools.com/">W3Schools</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>News & Security</h3>
|
||||||
|
<p>
|
||||||
|
<a href="https://www.theverge.com/">The Verge</a>
|
||||||
|
<a href="https://arstechnica.com/">Ars Technica</a>
|
||||||
|
<a href="https://www.engadget.com/">Engadget</a>
|
||||||
|
<a href="https://www.technologyreview.com/">MIT Technology Review</a>
|
||||||
|
<a href="https://www.wired.com/">Wired</a>
|
||||||
|
<a href="https://krebsonsecurity.com/">Krebs on Security</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>More Coding YouTube Channels</h3>
|
||||||
|
<p>
|
||||||
|
<a href="https://www.youtube.com/c/TheCodingTrain">The Coding Train</a>
|
||||||
|
<a href="https://www.youtube.com/c/TraversyMedia">Traversy Media</a>
|
||||||
|
<a href="https://www.youtube.com/c/FrontendMasters">Frontend Masters</a>
|
||||||
|
<a href="https://www.youtube.com/c/Codecademy">Codecademy</a>
|
||||||
|
<a href="https://www.youtube.com/c/TechLead">The TechLead</a>
|
||||||
|
<a href="https://www.youtube.com/c/fireship">Fireship</a>
|
||||||
|
<a href="https://www.youtube.com/c/NoBoilerplate">No Boilerplate</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
<script src="script.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
32
script.js
Normal file
32
script.js
Normal file
|
@ -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.');
|
||||||
|
}
|
||||||
|
});
|
95
styling.css
Normal file
95
styling.css
Normal file
|
@ -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 */
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue