make the footer good

This commit is contained in:
Sequoia Haynes 2024-10-30 22:29:14 -07:00
parent 11d787ef6a
commit d707e203cd
4 changed files with 114 additions and 13 deletions

View File

@ -63,7 +63,6 @@ button {
.source-btn {
background-color: #333333;
color: white;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
border: none;
@ -168,21 +167,24 @@ button:hover {
display:flex;
flex-wrap:wrap;
flex-flow:wrap-reverse;
align-content: space-evenly
align-items: center;
}
.footer a {
#footerButtons a {
font-size:12px;
padding: 10px 10px;
cursor: pointer;
border: none;
border-radius: 5px;
margin: 10px auto;
/*bro i hate working with this footer like i swear this css has commander games page level stability
/* margin: 10px auto; */
text-decoration: none;
display: inline-block;
max-width: 200px;
background-color:#d9d9d9 !important;
color:#000000 important;
color:#000000 !important;
height:15px;
padding: 10px 20px;
margin:10px;
}
.recommended {
vertical-align: middle;
@ -196,3 +198,20 @@ button:hover {
font-style: normal;
color:#ffffff;
}
#footerButtons {
display: flex;
align-items: center;
flex-direction: row;
justify-content:center;
width:100%;
height:15px;
}
#footerText {
display:flex;
flex-direction: column;
width:100%;
margin-bottom: 5px;
}
#footerText > p {
margin:0;
}

View File

@ -90,13 +90,16 @@
<script src="js/searchbar.js"></script>
<div class="footer">
<p id="topfootertext">I am not affiliated with EaglerCraft, Eagtek, Microsoft, or Mojang. I solely host these sites.</p>
<br>
<p id="bottomfootertext">By using this site you agree to Google Analytics being used on this site</p>
<a href="https://github.com/eaglercraftx1-8/eaglercraftx1-8.github.io" class="source-btn" target="_blank">Github Repository</a>
<a href="https://discord.gg/czV7M8JXXM" class="dsc-btn" target="_blank">Discord Server</a>
<a href="https://servers.eaglercraft.com/" target="_blank"><button>Server List</button></a>
<a href="https://eaglerrinth.github.io/" target="_blank"><button>EaglerRinth Mod List</button></a>
<div id="footerText">
<p id="topfootertext">I am not affiliated with EaglerCraft, Eagtek, Microsoft, or Mojang. I solely host these sites.</p>
<p id="bottomfootertext">By using this site you agree to Google Analytics being used on this site</p>
</div>
<div id="footerButtons">
<a href="https://github.com/eaglercraftx1-8/eaglercraftx1-8.github.io" class="source-btn" target="_blank">Github Repository</a>
<a href="https://discord.gg/czV7M8JXXM" class="dsc-btn" target="_blank">Discord Server</a>
<a href="https://servers.eaglercraft.com/" target="_blank">Server List</a>
<a href="https://eaglerrinth.github.io/" target="_blank">EaglerRinth Mod List</a>
</div>
</div>
</body>

24
runTest.bat Normal file
View File

@ -0,0 +1,24 @@
:: amazing script i totally didnt write with bing ai because i have no idea how the syntax of batch works
:: Attempt to run with Node.js
node test.js
if %errorlevel% EQU 0 (
echo Node.js executed successfully.
exit /b
)
:: Attempt to run with Deno
deno run test.js
if %errorlevel% EQU 0 (
echo Deno executed successfully.
exit /b
)
:: Attempt to run with Bun (assuming you have Bun installed)
bun run test.js
if %errorlevel% EQU 0 (
echo Bun executed successfully.
exit /b
)
:: If none of the runtimes are available
echo Please install a valid Node.js runtime.
pause
exit /b

55
test.js Normal file
View File

@ -0,0 +1,55 @@
const http = require("http");
const fs = require("fs");
const path = require("path");
http.createServer(async function(request,response){
var parth = path.dirname(__filename) + request.url;
fs.readFile(parth, "utf8", function(err,data){
if(err){
response.writeHead(404,{"Content-Type":"text/html"});
var notFoundFIle;
fs.readFile(path.dirname(__filename)+"\\404.html", "utf8", function(error,dat){
if(error){
response.end("404.html wasnt found, something is wrong");
return;
}else{
notFoundFIle = dat;
response.end(notFoundFIle);
}
});
}else{
var filetype = path.extname(parth).substring(1,path.extname(parth).length);
var isImage = false;
if(filetype=="html"){
response.writeHead(200,{"Content-Type":"text/html"});
}else{
if(filetype=="css"){
response.writeHead(200,{"Content-Type":"text/css"});
}else{
if(filetype=="js"){
response.writeHead(200,{"Content-Type":"text/js"});
}else{
if(filetype=="jpeg"){
response.writeHead(200,{"Content-Type":"image/jpeg"});
isImage = true;
}else{
if(filetype=="svg"){
response.writeHead(200,{"Content-Type":"image/svg+xml"});
isImage = true;
}else{
if(filetype=="png"){
response.writeHead(200,{"Content-Type":"image/png"});
isImage = true;
}
}
}
}
}
}
if(!isImage){
response.end(data,"utf8");
}else{
fs.createReadStream(parth).pipe(response);
}
}
});
}).listen(80);