Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
<meta name="description" content="André Miller professional website">
<title>André Miller</title>
<script src="static/script.js" defer></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
</head>
<body>
<header>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
Expand Down
89 changes: 53 additions & 36 deletions static/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,47 +40,52 @@ function loop(l) {
// loop(L1);
// loop(L2);

function greetingFunc() {
let d = new Date();
let h = d.getHours();
if (h < 5) {
message = "Good night my name is André Miller";
} else if (h < 12) {
message = "Good morning, my name is André Miller";
} else if (h < 18) {
message = "Good afternoon, my name is André Miller";
} else if (h < 20) {
message = "Good evening, my name is André Miller";
} else {
message = "Good night, my name is André Miller";
document.addEventListener("DOMContentLoaded", function() {
function greetingFunc() {
let d = new Date();
let h = d.getHours();
let message;
if (h < 5) {
message = "Good night my name is André Miller";
} else if (h < 12) {
message = "Good morning, my name is André Miller";
} else if (h < 18) {
message = "Good afternoon, my name is André Miller";
} else if (h < 20) {
message = "Good evening, my name is André Miller";
} else {
message = "Good night, my name is André Miller";
}
let E = document.getElementById("greeting");
if (E) {
E.innerHTML = message;
}
}
let E = document.getElementById("greeting");
E.innerHTML = message;
}

window.onLoad = greetingFunc;

greetingFunc();

function year() {
let d = new Date();
let y = d.getFullYear();
let E = document.getElementById("copyYear").innerHTML += y;
}
function year() {
let d = new Date();
let y = d.getFullYear();
let E = document.getElementById("copyYear");
if (E) {
E.innerHTML += y;
}
}

window.onLoad = year();
greetingFunc();
year();
});

function showList() {
let list = document.getElementById("funList");
let button = document.getElementById("showButton");
// function showList() {
// let list = document.getElementById("funList");
// let button = document.getElementById("showButton");

if (list.style.display!="block") {
list.style.display = "block";
}
else {
list.style.display = "none";
}
}
// if (list.style.display!="block") {
// list.style.display = "block";
// }
// else {
// list.style.display = "none";
// }
// }

$(document).ready(function(){
$("#readMore").click(function(){
Expand Down Expand Up @@ -141,4 +146,16 @@ function validate(event) {
if (!isValid) {
event.preventDefault(); // Stop the form from submitting if invalid
}
}

function getAdvice() {
fetch("https://api.adviceslip.com/advice")
.then(response => response.json()) // Convert response to JSON
.then(data => {
document.getElementById("adviceText").innerText = data.slip.advice; // Update the text
})
.catch(error => {
console.error("Error fetching advice:", error);
document.getElementById("adviceText").innerText = "Sorry, couldn't fetch advice!";
});
}
48 changes: 47 additions & 1 deletion static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,55 @@ tr:nth-child(even) {
#webname {
background-color: #92ad70;
}

/*
#funList {
display: none;
} */

.funsection {
display: flex;
align-items: center;
gap: 20px;
}

#vid {
object-fit: cover;
border-radius: 100%;
}

.container {
background: white;
padding: 20px;
margin: 50px auto;
width: 300px;
border-radius: 10px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

#mompic {
border-radius: 100%;
width: 250px;
height: 250px;
margin-left: 0%;
object-fit: cover;
flex-shrink: 0;
}

.mainLayout {
display: flex;
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
margin: 20px;
}

#item1, #item2 {
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
width: 45%;
text-align: center;
}

#showButton {
Expand Down
13 changes: 11 additions & 2 deletions views/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@
<meta name="keywords" content="Carnegie Mellon University, Information Systems">
<meta name="description" content="André Miller professional website">
<title>André Miller</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="../static/script.js" defer></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
</head>
<body>
<header>

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
Expand All @@ -27,8 +30,13 @@ <h1 id="webname">André Miller</h1>
<a class="link" href="for-fun.html">For fun!</a>
</nav>
</header>
<div class="main">
<h2>Contact Me</h2>
<div class="mainLayout">
<div id="item1">
<h2>Find me!</h2>
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2178.4090432122207!2d-79.94437252555952!3d40.44581985387075!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x8834f22275f67f0f%3A0x9e3cb77fc360e5fd!2s1057%20Morewood%20Ave%2C%20Pittsburgh%2C%20PA%2015213!5e1!3m2!1sen!2sus!4v1742788051201!5m2!1sen!2sus" width="100%" height="100%" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>
<div id="item2">
<h2>Contact Me</h2>
<form class="contact-form" onsubmit="validate(event)" novalidate>
<label for="name">Your name (required): </label>
<input type="text" id="name" name="name" required>
Expand Down Expand Up @@ -58,6 +66,7 @@ <h2>Contact Me</h2>
<td>LinkedIn: https://www.linkedin.com/in/andré-miller/</td>
</tr>
</table>
</div>
</div>
<footer>
<link rel="preconnect" href="https://fonts.googleapis.com">
Expand Down
1 change: 1 addition & 0 deletions views/cv.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<meta name="description" content="André Miller professional website">
<title>André Miller</title>
<script src="../static/script.js" defer></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
</head>
<body>
<header>
Expand Down
32 changes: 24 additions & 8 deletions views/for-fun.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<meta name="description" content="André Miller professional website">
<title>André Miller</title>
<script src="../static/script.js" defer></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
</head>
<body>
<header>
Expand All @@ -27,16 +28,31 @@ <h1 id="webname">André Miller</h1>
<a class="link" href="for-fun.html">For fun!</a>
</nav>
</header>
<div class="main">
<h2>Things I love to do for fun!</h2>
<button id="showButton" onclick="showList()">Click to see...</button>
<ul id="funList">
<li>Pokémon Cards/Pokémon in general</li>
<li> Listening to music: <br>
<div class="funsection">
<div id="item1">
<h2>Things I love to do for fun!</h2>
<!-- <button id="showButton" onclick="showList()">Click to see...</button> -->
<ul id="funList">
<li>Pokémon Cards/Pokémon in general</li>
<li> Listening to music: <br>
Favorites are Radiohead, Elliott Smith, Beabadoobee, Dean Blunt, and Title Fight. <br>
I will listen to pretty much anything from rock/folk to reggaeton/rap, and would love to talk more!</li>
<li>Watch the New Orleans Pelicans (Next year is our year!).</li>
</ul>
<li>Watch the New Orleans Pelicans (Next year is our year!).</li>
</ul>
</div>
<div id="item2">
<img id="mompic" src="../views/mom.png" alt="mom">
</div>
<div id="item3">
<iframe id="vid" width="250" height="250"
src="https://www.youtube.com/embed/3176Sw8A0EE">
</iframe>
</div>
<div class="container" id="item4">
<h2>Need some advice?</h2>
<p id="adviceText">Click the button to get a piece of advice!</p>
<button onclick="getAdvice()">GetAdvice</button>
</div>
</div>
<footer>
<link rel="preconnect" href="https://fonts.googleapis.com">
Expand Down
Binary file added views/mom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.