Make quotes.html read data and display something

main
Jeff Elkner 2 years ago
parent b19d9948b8
commit 315f1e5b6e

@ -1,53 +0,0 @@
quotes = [
{
quote:
"Let me give you a word of the philosophy of reforms. The whole history of the
progress of human liberty shows that all concessions yet made to her august
claims have been born of struggle... If there is no struggle there is no
progress... Power concedes nothing without a demand. It never did and it never
will...",
author: "Frederick Douglas"
},
{
quote:
"As I would not be a slave, so I would not be a master. This expresses my idea
of democracy."
author: "Abraham Lincoln"
},
{
quote:
"Everything that is really great and inspiring is created by the individual who
can labor in freedom.",
author: "Albert Einstein"
},
{
quote:
"As we enjoy great Advantages from the Inventions of others, we should be glad
of an Opportunity to serve others by any Invention of ours, and this we should
do freely and generously."
author: "Benjamin Franklin"
},
{
quote:
"I have often reflected upon the new vistas that reading opened to me. I knew
right there in prison that reading had changed forever the course of my life.
As I see it today, the ability to read awoke in me some long dormant craving to
be mentally alive.",
author: "Malcolm X"
},
{
quote:
"If knowledge does not have owners, then intellectual property is a trap set by
neo-liberalism.",
author: "Hugo Chavez"
},
{
quote:
"Education either functions as an instrument which is used to facilitate
integration of the younger generation into the logic of the present system and
bring about conformity or it becomes the practice of freedom, the means by
which men and women deal critically and creatively with reality and discover
how to participate in the transformation of their world.",
author: "Paulo Friere"
}
]

@ -4,8 +4,15 @@
<meta charset="utf-8"> <meta charset="utf-8">
<title>Quotes</title> <title>Quotes</title>
<style> <style>
@import url(css/elknernet.css);
</style> </style>
<script src="js/quotes.js"></script>
<script> <script>
function showQuote() {
let mainElem = document.getElementById("quotes");
console.log(mainElem);
mainElem.innerHTML = "Hellooooooo there ;-)";
}
function init() { function init() {
let loc = window.location.href; let loc = window.location.href;
let HTMLvalidLinkStr = 'http://validator.w3.org/check?uri=' + loc; let HTMLvalidLinkStr = 'http://validator.w3.org/check?uri=' + loc;
@ -13,13 +20,15 @@ function init() {
loc + '?profile=css3'; loc + '?profile=css3';
document.getElementById("vLink1").setAttribute("href", HTMLvalidLinkStr); document.getElementById("vLink1").setAttribute("href", HTMLvalidLinkStr);
document.getElementById("vLink2").setAttribute("href", CSSvalidLinkStr); document.getElementById("vLink2").setAttribute("href", CSSvalidLinkStr);
showQuote();
} }
window.onload = init; window.onload = init;
</script> </script>
</head> </head>
<body> <body>
<h1>Quotes</h1> <h1>Quotes</h1>
<main id="quotes">
</main>
<footer> <footer>
<a id="vLink1"> <a id="vLink1">

Loading…
Cancel
Save