Austen Vynes – Emelia Dawes shares her passion for the works of Jane Austen by managing a website named Austen Vynes ded
Posted: Sun Jul 10, 2022 11:27 am
Austen Vynes – Emelia Dawes shares her passion for the works ofJane Austen by managing a website named Austen Vynes dedicated tothe writer and her works. Emelia is revising the layout and designof her website and would like your assistance in redesigning thefront page. She wants the front page to display a random JaneAusten quote every time the page is loaded by the browser. Emeliaasks you to write a JavaScript program to supply a randomlyselected quote. A screenshot of the final page is shown at the endof this document.Remember to save, validate, and view your file in the browseroften!Complete the following steps in your text editor:1. Open the ja_vynes_txt.html, andja_quote_txt.js files.• Enter your name and the current date in thecomment section of each file. • Save them as ja_vynes.html, and ja_quote.js,respectively.Complete these steps to the ja_vynes.html file.1. In the document head, insert a script elementthat links the page to the ja_quote.js file. Defer the loading ofthe script file until the browser loads the rest of the page.2. Take some time to study the content andstructure of the document.3. Once you have completed the study of the page,save, and validate your work. Complete these steps to the ja_quote.js file.1. Emelia has already provided you with afunction that includes a list of 10 quotes. Do not edit thisfunction.2. One of the first steps that you must do iscreate a function that will return a random number. In the RandomNumber Generating Function section:• Create a function called randomInt that acceptstwo parameters (min, max). The min parameter will specify theminimum possible value for the random integer and the max parameterwill specify the maximum possible value for the randominteger.o Use the Math.floor() & the Math.random()methods to return a random integer.return Math.floor(Math.random() * max + min);3. After the function is complete, you willinsert a command to call the randomInt function, sending thearguments of 0 & 9. (0 is the lowest number allowed to be arandom integer and 9 is maximum number to be a random integer.Remember, the size of this range is 10 numbers because it includes0.) Store the results from the function in the randomQvariable.4. Create a variable called quoteElement thatreferences the first element in the document that has the q tagname (q as in quote). Refer to the Referencing Objects on page 687or W3Schools.5. Call the getQuote() function using the randomQvariable as the argument value to generate a random Jane Austenquote. Display the text of the quote as the textContent of thequoteElement variable. (The textContent property is used becauseyou are only adding text to the page.) quoteElement.textContent = getQuote(randomQ);
ja_vynes.html
<!DOCTYPE html><html lang="en"><head> <!-- New Perspectives on HTML5 and CSS3, 7th Edition Tutorial 9 Case Problem 3 Austen Vynes home page Author: Date:
Filename: ja_vynes.html --> <title>Austen Vynes</title> <meta charset="utf-8"> <link href="ja_base.css" rel="stylesheet"> <link href="ja_layout.css" rel="stylesheet">
</head>
<body> <header> <img src="ja_logo.png" alt="AustenVynes"> </header> <nav id="sidebar"> <ul> <li><a href="#">TheWorks of Jane Austen</a></li> <li><a href="#">JaneAusten Biography</a></li> <li><ahref="#">Austen on Film</a></li> <li><ahref="#">Critical Essays</a></li> <li><ahref="#">Discussion Forums</a></li> </ul> </nav> <main> <q></q> <img src="ja_portrait.png" alt=""> <p>Jane Austen, born on December 16,1775, is widely considered one of England’s foremost novelists.Austen lived a quiet life, though herbrothers who were officers in the Royal Navy were instrumentalin introducing her to the widerworld through their travels and service. Austen's role in theprivileged life of the landed gentry is reflectedin all her fiction.</p> <p>In her childhood, Austen beganwriting comic stories called <a href="#">TheJuvenilia</a>. Her first mature work was the novella <ahref="#">Lady Susan</a>, written at the age of 19.Austen's most famous novels were written in her twenties,starting with <a href="#">Sense and Sensibility</a>followed by <a href="#">NorthangerAbbey</a>, which was not published until after herdeath.</p> <p>Other classic novels including <ahref="#">Pride and Prejudice</a>, <ahref="#">Emma</a> and <a href="#">MansfieldPark</a> were written in her thirties. Her final novel, <ahref="#">Persuasion</a> was completed shortly before herdeath at the age of 42.</p> <p>Though the volume of her work doesnot compare with other famous English novelists such as CharlesDickens, her novels consistently rate highon the list of popular English novels. With several successfulscreen adaptions, Austen's popularityhas only grown as modern audiences embrace the humor andintelligence of her main characters and herinsight into the human condition.</p> <p>Jane Austen died on July 18,1817.</p> </main>
<footer> <nav id="bottom"> <ul> <li><ahref="#">Sense and Sensibility</a></li> <li><ahref="#">Pride and Prejudice</a></li> <li><ahref="#">Mansfield Park</a></li> </ul> <ul> <li><ahref="#">Emma</a></li> <li><ahref="#">Persuasion</a></li> <li><ahref="#">Northanger Abbey</a></li> </ul> <ul> <li><ahref="#">Other Writings</a></li> <li><ahref="#">Personal Life</a></li> <li><ahref="#">Critical Essays</a></li> </ul> <ul> <li><ahref="#">Web Links</a></li> <li><ahref="#">Forum</a></li> <li><ahref="#">About Austen Vynes</a></li> </ul> </nav> <p>Austen Vynes © 2018 AllRights Reserved</p> </footer></body></html>
"use strict";/* New Perspectives on HTML5 and CSS3, 7th Edition Tutorial 9 Case Problem 3
Random Jane Austen Quote Generator Author: Date: This script randomly generates a Jane Austen quotefrom a list of 10 quotes and writes that quote into the firstquotation tag in the Web page.
*/
/* A function with a list of Jane Austenquotes DO NOT EDIT this function*/function getQuote(n) { var quotes = [ "It is a truth universally acknowledged, that a singleman in possession of a good fortune, must be in want of awife.", "I hate to hear you talk about all women as if theywere fine ladies instead of rational creatures. None of us want tobe in calm waters all our lives.", "Silly things do cease to be silly if they are done bysensible people in an impudent way.", "Give a girl an education and introduce her properlyinto the world, and ten to one but she has the means of settlingwell, without further expense to anybody.", "Life seems but a quick succession of busynothings.", "Our scars make us know that our past was forreal.", "I cannot speak well enough to beunintelligible.", "One cannot be always laughing at a man without nowand then stumbling on something witty.", "Men were put into the world to teach women the law ofcompromise.", "The person, be it gentlemen or lady, who has notpleasure in a good novel, must be intolerably stupid." ]; return quotes[n];}
/* Random Number Generating Function */
6. Add appropriate comments to your code todocument your work.7. Once you have completed these steps, save,validate, and view your HTML file in the web browser. Verify thatwhen you refresh the page, a different quote appears.
ja_vynes.html
<!DOCTYPE html><html lang="en"><head> <!-- New Perspectives on HTML5 and CSS3, 7th Edition Tutorial 9 Case Problem 3 Austen Vynes home page Author: Date:
Filename: ja_vynes.html --> <title>Austen Vynes</title> <meta charset="utf-8"> <link href="ja_base.css" rel="stylesheet"> <link href="ja_layout.css" rel="stylesheet">
</head>
<body> <header> <img src="ja_logo.png" alt="AustenVynes"> </header> <nav id="sidebar"> <ul> <li><a href="#">TheWorks of Jane Austen</a></li> <li><a href="#">JaneAusten Biography</a></li> <li><ahref="#">Austen on Film</a></li> <li><ahref="#">Critical Essays</a></li> <li><ahref="#">Discussion Forums</a></li> </ul> </nav> <main> <q></q> <img src="ja_portrait.png" alt=""> <p>Jane Austen, born on December 16,1775, is widely considered one of England’s foremost novelists.Austen lived a quiet life, though herbrothers who were officers in the Royal Navy were instrumentalin introducing her to the widerworld through their travels and service. Austen's role in theprivileged life of the landed gentry is reflectedin all her fiction.</p> <p>In her childhood, Austen beganwriting comic stories called <a href="#">TheJuvenilia</a>. Her first mature work was the novella <ahref="#">Lady Susan</a>, written at the age of 19.Austen's most famous novels were written in her twenties,starting with <a href="#">Sense and Sensibility</a>followed by <a href="#">NorthangerAbbey</a>, which was not published until after herdeath.</p> <p>Other classic novels including <ahref="#">Pride and Prejudice</a>, <ahref="#">Emma</a> and <a href="#">MansfieldPark</a> were written in her thirties. Her final novel, <ahref="#">Persuasion</a> was completed shortly before herdeath at the age of 42.</p> <p>Though the volume of her work doesnot compare with other famous English novelists such as CharlesDickens, her novels consistently rate highon the list of popular English novels. With several successfulscreen adaptions, Austen's popularityhas only grown as modern audiences embrace the humor andintelligence of her main characters and herinsight into the human condition.</p> <p>Jane Austen died on July 18,1817.</p> </main>
<footer> <nav id="bottom"> <ul> <li><ahref="#">Sense and Sensibility</a></li> <li><ahref="#">Pride and Prejudice</a></li> <li><ahref="#">Mansfield Park</a></li> </ul> <ul> <li><ahref="#">Emma</a></li> <li><ahref="#">Persuasion</a></li> <li><ahref="#">Northanger Abbey</a></li> </ul> <ul> <li><ahref="#">Other Writings</a></li> <li><ahref="#">Personal Life</a></li> <li><ahref="#">Critical Essays</a></li> </ul> <ul> <li><ahref="#">Web Links</a></li> <li><ahref="#">Forum</a></li> <li><ahref="#">About Austen Vynes</a></li> </ul> </nav> <p>Austen Vynes © 2018 AllRights Reserved</p> </footer></body></html>
"use strict";/* New Perspectives on HTML5 and CSS3, 7th Edition Tutorial 9 Case Problem 3
Random Jane Austen Quote Generator Author: Date: This script randomly generates a Jane Austen quotefrom a list of 10 quotes and writes that quote into the firstquotation tag in the Web page.
*/
/* A function with a list of Jane Austenquotes DO NOT EDIT this function*/function getQuote(n) { var quotes = [ "It is a truth universally acknowledged, that a singleman in possession of a good fortune, must be in want of awife.", "I hate to hear you talk about all women as if theywere fine ladies instead of rational creatures. None of us want tobe in calm waters all our lives.", "Silly things do cease to be silly if they are done bysensible people in an impudent way.", "Give a girl an education and introduce her properlyinto the world, and ten to one but she has the means of settlingwell, without further expense to anybody.", "Life seems but a quick succession of busynothings.", "Our scars make us know that our past was forreal.", "I cannot speak well enough to beunintelligible.", "One cannot be always laughing at a man without nowand then stumbling on something witty.", "Men were put into the world to teach women the law ofcompromise.", "The person, be it gentlemen or lady, who has notpleasure in a good novel, must be intolerably stupid." ]; return quotes[n];}
/* Random Number Generating Function */
6. Add appropriate comments to your code todocument your work.7. Once you have completed these steps, save,validate, and view your HTML file in the web browser. Verify thatwhen you refresh the page, a different quote appears.