File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 < meta charset ="UTF-8 " />
55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
66 < title > Quote generator app</ title >
7- < link rel ="stylesheet " href ="styles .css " />
7+ < link rel ="stylesheet " href ="style .css " />
88 < script defer src ="quotes.js "> </ script >
99 </ head >
1010 < body >
1111 < main class ="card ">
1212 < h1 class ="visually-hidden "> Quote generator app</ h1 >
1313
1414 < div class ="quote-container ">
15- < p id ="quote "> </ p >
15+ < blockquote id ="quote "> </ blockquote >
1616 </ div >
1717
1818 < div class ="author-container ">
Original file line number Diff line number Diff line change @@ -490,11 +490,6 @@ const quotes = [
490490 } ,
491491] ;
492492
493- // call pickFromArray with the quotes array to check you get a random quote
494- function pickFromArray ( array ) {
495- const randomIndex = Math . floor ( Math . random ( ) * array . length ) ;
496- return array [ randomIndex ] ;
497- }
498493
499494// Grab the elements we need to update once, so we're not
500495// searching the page every time.
@@ -519,9 +514,8 @@ function showRandomQuote() {
519514 // If you prefer the Math.random() approach directly, you could
520515 // instead write:
521516 // const randomQuote = quotes[Math.floor(Math.random() * quotes.length)];
522-
523- quoteEl . textContent = `"${ randomQuote . quote } "` ;
524- authorEl . textContent = `— ${ randomQuote . author } ` ;
517+ quoteEl . textContent = randomQuote . quote ;
518+ authorEl . textContent = randomQuote . author ;
525519}
526520
527521// Updates the on-screen text that says whether auto-play is on or off.
Original file line number Diff line number Diff line change 11/** Write your CSS in here **/
2+
23: root {
34 --accent : # ff9f0a ;
45 --accent-dark : # e08600 ;
@@ -39,27 +40,23 @@ body {
3940}
4041
4142.quote-container {
42- position : relative;
43- padding-left : 3rem ;
4443 margin-bottom : 1.5rem ;
4544}
4645
47- .quote-container ::before {
48- content : "\201C" ;
49- position : absolute;
50- left : 0 ;
51- top : -0.6rem ;
52- font-size : 4rem ;
53- line-height : 1 ;
54- font-weight : bold;
55- color : var (--accent );
56- }
57-
5846# quote {
5947 font-size : 1.6rem ;
6048 color : var (--accent );
6149 margin : 0 ;
6250 line-height : 1.4 ;
51+ quotes : '"' '"' ;
52+ }
53+
54+ # quote ::before {
55+ content : open-quote;
56+ }
57+
58+ # quote ::after {
59+ content : close-quote;
6360}
6461
6562.author-container {
7471}
7572
7673# author ::before {
77- content : "- " ;
74+ content : "— " ;
7875}
7976
8077.controls {
You can’t perform that action at this time.
0 commit comments