generated from CodeYourFuture/Module-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 277
Birmingham | ITP-Jan | Roman Sanaye | Sprint 3 | Quote Generator App #1049
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
Open
RomanSanaye
wants to merge
2
commits into
CodeYourFuture:main
Choose a base branch
from
RomanSanaye:quote-generator
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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,33 @@ | ||
| <!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> | ||
| <script defer src="quotes.js"></script> | ||
| <title>Quote Generator App</title> | ||
| <link rel="stylesheet" href="style.css" /> | ||
| </head> | ||
| <body> | ||
| <h1>hello there</h1> | ||
| <p id="quote"></p> | ||
| <p id="author"></p> | ||
| <button type="button" id="new-quote">New quote</button> | ||
| <div class="container"> | ||
| <div class="header"> | ||
| <h1>Quote Generator</h1> | ||
| </div> | ||
| <div class="quote-box"> | ||
| <p>" <span id="quote"></span> "</p> | ||
| <p>-- <span id="author"></span> --</p> | ||
| </div> | ||
| <div class="bottom-controls"> | ||
| <div class="button"> | ||
| <button type="button" id="new-quote">New quote</button> | ||
| </div> | ||
| <div class="autoplay-container"> | ||
| <label for="autoplay"> | ||
| <input type="checkbox" id="autoplay" /> | ||
| Auto-play : | ||
| </label> | ||
| <span id="autoplay-status"> OFF</span> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <script src="quotes.js"></script> | ||
| </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
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,152 @@ | ||
| /** Write your CSS in here **/ | ||
| /* Reset */ | ||
| * { | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; | ||
| } | ||
|
|
||
| body { | ||
| min-height: 100vh; | ||
| background: #abd5e9; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| padding: 15px; | ||
| } | ||
|
|
||
| .container { | ||
| background: rgb(206, 202, 202); | ||
| padding: 10px; | ||
| border-radius: 16px; | ||
| width: 100%; | ||
| max-width: 420px; | ||
| text-align: center; | ||
| border: 1px solid rgba(255, 255, 255, 0.3); | ||
| box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2); | ||
| display: flex; | ||
| flex-direction: column; | ||
| min-height: 450px; | ||
| } | ||
|
|
||
| .header { | ||
| flex: 0 0 25%; /* 25% of container height */ | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| margin-bottom: 15px; | ||
| } | ||
|
|
||
| .header h1 { | ||
| font-size: 1.8rem; | ||
| color: #333; | ||
| } | ||
|
|
||
| .quote-box { | ||
| flex: 1 0 50%; /* take remaining middle space */ | ||
| background: #f4f4f4; | ||
| padding: 10px; | ||
| border-radius: 12px; | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content: center; | ||
| align-items: center; | ||
| margin: 10px 0; | ||
|
|
||
| min-height: 100px; | ||
| transition: all 0.3s ease; | ||
| word-wrap: break-word; | ||
| text-align: center; | ||
| } | ||
|
|
||
| .quote-box p { | ||
| margin: 0; | ||
| font-size: 1rem; | ||
| line-height: 1.4; | ||
| } | ||
|
|
||
| .bottom-controls { | ||
| flex: 0 0 25%; | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content: center; | ||
| gap: 10px; | ||
| margin-bottom: 0px; | ||
| } | ||
|
|
||
| .button button { | ||
| width: 100%; | ||
| padding: 10px; | ||
| font-size: large; | ||
| border: none; | ||
| border-radius: 10px; | ||
| background: rgb(3, 73, 195); | ||
| color: #fff; | ||
| cursor: pointer; | ||
| transition: 0.3s ease; | ||
| } | ||
|
|
||
| .button button:hover { | ||
| background: #4259c8; | ||
| transform: scale(1.03); | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| .autoplay-container { | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| gap: 10px; | ||
| } | ||
|
|
||
| .autoplay-container label { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 5px; | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| .autoplay-container input[type="checkbox"] { | ||
| width: 18px; | ||
| height: 18px; | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| .autoplay-on { | ||
| color: #4caf50; | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| .autoplay-off { | ||
| color: brown; | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| /* Responsive */ | ||
| @media (min-width: 600px) { | ||
| .container { | ||
| padding: 40px 35px; | ||
| } | ||
| .header h1 { | ||
| font-size: 2rem; | ||
| } | ||
| .quote-box p { | ||
| font-size: 1.1rem; | ||
| } | ||
| } | ||
|
|
||
| @media (min-width: 992px) { | ||
| .container { | ||
| max-width: 500px; | ||
| } | ||
| .header h1 { | ||
| font-size: 2.2rem; | ||
| } | ||
| .quote-box p { | ||
| font-size: 1.2rem; | ||
| } | ||
| .button button { | ||
| width: auto; | ||
| padding: 12px 25px; | ||
| } | ||
| } |
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.
For your reference:
https://chatgpt.com/share/69cae7dd-695c-8331-bb13-1ff731f13143
Suggestion made by ChatGPT how else you could implement this.
Note: I don't know how long ChatGPT will keep this chat available.
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.
I’ll try to use more CSS and reduce JavaScript in my projects and coursework. Whenever CSS can handle a feature, I won’t rely on JavaScript for it. Pseudo-elements like ::before and ::after are really powerful and useful for this approach. Thanks for the feedback and guidance.