-
-
Notifications
You must be signed in to change notification settings - Fork 324
London | 26-ITP-JAN | Asha Ahmed | Sprint 3 | Quote Generator #1142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7df6d24
Changed title to Quote Generator App
ashaahmed7 703f6bb
Implemented auto-play toggle and interval logic
ashaahmed7 2ca051a
Implemented random quote generation logic and CSS
ashaahmed7 a7e1b05
Linked Html with CSS file
ashaahmed7 e564847
CSS edits
ashaahmed7 7f81456
Merge branch 'main' into quote-generator
ashaahmed7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,22 @@ | ||
| <!DOCTYPE html> | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Title here</title> | ||
| <title>Quote Generator App</title> | ||
| <script defer src="quotes.js"></script> | ||
| <link rel="stylesheet" href="style.css" /> | ||
| </head> | ||
| <body> | ||
| <h1>hello there</h1> | ||
| <h1>Quote Generator</h1> | ||
| <p id="quote"></p> | ||
| <p id="author"></p> | ||
| <button type="button" id="new-quote">New quote</button> | ||
| <div id="autoplay-controls"> | ||
| <label> | ||
| <input type="checkbox" id="autoplay-toggle" /> Enable Auto-play | ||
| </label> | ||
| <p id="autoplay-status">auto-play: OFF</p> | ||
| </div> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,137 @@ | ||
| /** Write your CSS in here **/ | ||
| @import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&family=WindSong:wght@400;500&display=swap"); | ||
|
|
||
| /*variables */ | ||
| :root { | ||
| --primary: #2ab06f; /* green hoover*/ | ||
| --accent: #0e818e; /* background*/ | ||
| --text-main: #060606; /* black text */ | ||
| --heading: #060606; /* black heading */ | ||
| --white: #ffffff; | ||
| --transition: 0.3s ease; | ||
| --small-text: 0.85rem; | ||
| --cursive: "Playfair Display", Georgia, serif; | ||
| } | ||
|
|
||
| /*body*/ | ||
| body { | ||
| margin: 0; | ||
| padding: 0; | ||
| height: 100vh; | ||
| font-family: "Roboto", Arial, Helvetica, sans-serif; | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content: center; | ||
| align-items: center; | ||
| background: var(--accent); | ||
| } | ||
|
|
||
| /* heading */ | ||
| h1 { | ||
| color: var(--heading); | ||
| font-family: var(--cursive); | ||
| font-size: 3rem; | ||
| font-weight: 1000; | ||
| } | ||
|
|
||
| /*quote card container */ | ||
| #quote-display { | ||
| background: var(--white); | ||
| padding: 3cqh 3rem; | ||
| max-width: 50%; | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: flex-end; | ||
| color: var(--text-main); | ||
| border-radius: 1rem; | ||
| } | ||
|
|
||
| /*quote text */ | ||
| #quote { | ||
| position: relative; | ||
| font-size: 1.5rem; | ||
| font-style: italic; | ||
| text-align: justify; | ||
| text-align-last: left; | ||
| line-height: 1.2; | ||
| font-weight: 500; | ||
| } | ||
|
|
||
| #quote::before { | ||
| content: "\201c"; | ||
| position: absolute; | ||
| left: -2.5rem; | ||
| top: -0.9rem; | ||
| font-size: 5.5rem; | ||
| font-family: "Times New Roman", Times, serif; | ||
| color: var(--accent); | ||
| line-height: 1; | ||
| } | ||
|
|
||
| /* author text */ | ||
| #author { | ||
| font-family: var(--cursive); | ||
| text-align: right; | ||
| font-size: 1.5rem; | ||
| color: var(--text-dark); | ||
| margin-bottom: 2.5rem; | ||
| } | ||
|
|
||
| #author::before { | ||
| content: "\2014"; | ||
| margin-right: 2px; | ||
| } | ||
|
|
||
| /* button for new quotes */ | ||
| button { | ||
| background-color: #d46f2a; | ||
| color: var(--white); | ||
| border: none; | ||
| padding: 0.7rem 1.5rem; | ||
| font-size: 1rem; | ||
| border-radius: 5px; | ||
| cursor: pointer; | ||
| transition: | ||
| background-color var(--transition), | ||
| color var(--transition); | ||
| } | ||
|
|
||
| button:hover { | ||
| background-color: var(--primary); | ||
| color: var(--white); | ||
| } | ||
|
|
||
| /*auto-play*/ | ||
| .auto-play-toggle { | ||
| margin-top: 1rem; | ||
| margin-bottom: 1rem; | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 0.5rem; | ||
| font-size: var(--small-text); | ||
| cursor: pointer; | ||
| accent-color: var(--primary); | ||
| } | ||
|
|
||
| #auto-play-status { | ||
| font-size: var(--small-text); | ||
| font-weight: bold; | ||
| margin-left: 0.5rem; | ||
| color: var(--text-dark); | ||
| } | ||
|
|
||
| button:focus-visible, | ||
| #auto-play-toggle:focus-visible { | ||
| outline: 3px solid #000; | ||
| outline-offset: 3px; | ||
| } | ||
|
|
||
| /* input label */ | ||
| .auto-play-toggle label { | ||
| cursor: pointer; | ||
| transition: color var(--transition); | ||
| } | ||
|
|
||
| .auto-play-toggle label:hover { | ||
| color: var(--accent); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice implementation of the stretch task (however the text should change every 60s)