146 lines
6.0 KiB
HTML
146 lines
6.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Caleb Fontenot's Web Server</title>
|
|
<link rel="icon" href="https://files.calebfontenot.com/files/C%5C%26H%20Spin.gif" type="image/gif" />
|
|
<meta content="Caleb Fontenot's Web Server" property="og:title" />
|
|
<meta content="Home Page of Caleb Fontenot's Web Server" property="og:description" />
|
|
<meta content="https://calebfontenot.com" property="og:url" />
|
|
<meta content="https://files.calebfontenot.com/files/C%5C%26H%20Spin.gif" property="og:image" />
|
|
<meta content="#FF0000" data-react-helmet="true" name="theme-color" />
|
|
<!meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link href="root.css" rel="stylesheet">
|
|
|
|
<!-- Google tag (gtag.js) -->
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-L9QF12JY74"></script>
|
|
<script>
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
|
|
gtag('config', 'G-L9QF12JY74');
|
|
</script>
|
|
|
|
</head>
|
|
|
|
|
|
<body class="center">
|
|
<div id="wrapper">
|
|
<nav>
|
|
<h1>Hi! Welcome to my Web Server!</h1>
|
|
<div class="navborder">
|
|
<a class="button" href="index.html">Home</a>
|
|
<a class="button" href="https://gitea.calebfontenot.com">Gitea</a>
|
|
<a class="button" href="https://search.calebfontenot.com">SearXNG Instance</a>
|
|
<a class="button" href="dynmap.html">Minecraft Server Dynamic Maps</a>
|
|
<a class="button" href="mario">Mario</a>
|
|
</div>
|
|
</nav>
|
|
|
|
<h2 class="aboutme">About me<img class="aboutme" src="Caleb.jpg" alt="Caleb" height="5%" width="5%"></h2>
|
|
<p>Hi! My name is <mark>Caleb Fontenot.</mark> I am a software developer in my second semester at South Lousiana Community College.</p>
|
|
|
|
<script>
|
|
function design1() {
|
|
var input = prompt("Enter a greeting.");
|
|
var startEnd = "";
|
|
for (let i = 0; i < input.length + 2; i++) {
|
|
startEnd += "*";
|
|
}
|
|
document.getElementById("jsOutput").innerHTML = startEnd + "<br>";
|
|
document.getElementById("jsOutput").innerHTML += "*" + "<br>";
|
|
document.getElementById("jsOutput").innerHTML += "* " + input + "<br>";
|
|
document.getElementById("jsOutput").innerHTML += "*" + "<br>";
|
|
document.getElementById("jsOutput").innerHTML += startEnd;
|
|
|
|
}
|
|
function design2() {
|
|
var input = prompt("Enter a greeting.");
|
|
var height = (input.length * 2) + 6;
|
|
var mid = Math.trunc(height / 2) + 1;
|
|
if (height % 2 == 0) {
|
|
height++;
|
|
}
|
|
document.getElementById("jsOutput").innerHTML = "";
|
|
for (let i = 0; i < height; i++) {
|
|
if (mid == i) { //Determine if we're in the middle of the triangle
|
|
document.getElementById("jsOutput").innerHTML += "**" + input + "**";
|
|
} else {
|
|
for (let j = 0; j < i; j++) {
|
|
document.getElementById("jsOutput").innerHTML += "*";
|
|
}
|
|
}
|
|
document.getElementById("jsOutput").innerHTML += "<br>";
|
|
}
|
|
}
|
|
function design3() {
|
|
var input = prompt("Enter a greeting.");
|
|
var height = (input.length * 2) + 6;
|
|
var mid = Math.trunc(height / 2) + 1;
|
|
if (height % 2 == 0) {
|
|
height++;
|
|
}
|
|
document.getElementById("jsOutput").innerHTML = "";
|
|
if (mid % 2 == 1) { // Skip a line if odd
|
|
var subOffset = 1;
|
|
var addOffset = 0;
|
|
} else {
|
|
var subOffset = 0;
|
|
var addOffset = 1;
|
|
}
|
|
for (let i = 0; i < mid + addOffset; i++) {
|
|
for (let j = 0; j < i; j++) {
|
|
if (i % 2 == 1) {
|
|
if (i == 0 || (j == 0 || j == (i - 1))) { // Check if we're at the beginning or end of the line
|
|
document.getElementById("jsOutput").innerHTML += "*";
|
|
} else {
|
|
document.getElementById("jsOutput").innerHTML += " ";
|
|
}
|
|
}
|
|
}
|
|
document.getElementById("jsOutput").innerHTML += "<br>";
|
|
}
|
|
document.getElementById("jsOutput").innerHTML += "* " + input + " *<br>";
|
|
for (let i = mid - subOffset; i > 0; i--) {
|
|
for (let j = 0; j < i; j++) {
|
|
if (i % 2 == 1) {
|
|
if (j != (mid - 1) || (j != mid)) {
|
|
if ((i == 0 || (j == 0 || j == (i - 1)))) { // Check if we're at the beginning or end of the line
|
|
document.getElementById("jsOutput").innerHTML += "*";
|
|
} else {
|
|
document.getElementById("jsOutput").innerHTML += " ";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
document.getElementById("jsOutput").innerHTML += "<br>";
|
|
}
|
|
}
|
|
</script>
|
|
<p>Pick a design!</p>
|
|
|
|
<button id="design1" class=button onclick="design1()">Design 1</button>
|
|
<button id="design2" class=button onclick="design2()">Design 2</button>
|
|
<button id="design3" class=button onclick="design3()">Design 3</button>
|
|
|
|
<p id="jsOutput"></p>
|
|
|
|
<p>
|
|
<a href="https://jigsaw.w3.org/css-validator/check/referer">
|
|
<img style="border:0;width:88px;height:31px"
|
|
src="https://jigsaw.w3.org/css-validator/images/vcss"
|
|
alt="Valid CSS!" />
|
|
</a>
|
|
</p>
|
|
|
|
|
|
<footer>
|
|
<a href=https://gitea.calebfontenot.com/CCF_100/frontpage class=button>Caleb Fontenot, 2023</a>
|
|
</footer>
|
|
</div>
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|