Show quotes on contact page

main
Jeffrey Elkner 12 months ago
parent 51d5058b40
commit c90beff414

@ -2,17 +2,13 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
<title>Contact Information</title> <title>Contact Information</title>
<style type="text/css"> <style type="text/css">
@import url(css/elknernet.css); @import url(css/elknernet.css);
</style> </style>
<script src="js/quotes.js"></script> <script src="js/quotes.js"></script>
<script> <script>
function reportScreenWidth() {
let screenWidthOutput = document.querySelector("#screenWidth");
screenWidthOutput.textContent = window.innerWidth;
}
function showQuote() { function showQuote() {
let qnum = Math.floor(Math.random() * quotes.length); let qnum = Math.floor(Math.random() * quotes.length);
let quoteElem = document.getElementById("quote"); let quoteElem = document.getElementById("quote");
@ -22,17 +18,15 @@ function showQuote() {
} }
function init() { function init() {
showQuote(); showQuote();
reportScreenWidth();
} }
window.onload = init; window.onload = init;
window.onresize = reportScreenWidth;
</script> </script>
</head> </head>
<body> <body>
<blockquote> <blockquote>
<p><!-- insert quote here --></p> <p id="quote"><!-- insert quote here --></p>
<p class="author">-- <!-- insert author here --></p> <p id="qauthor">-- <!-- insert author here --></p>
</blockquote> </blockquote>
<h1>Contact Information</h1> <h1>Contact Information</h1>

Loading…
Cancel
Save