-
-
Notifications
You must be signed in to change notification settings - Fork 155
Sheffield | ITP-May-2025 | Waleed-Yahya Salih-Taha | Sprint-3 | Quote-generator #731
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
3489fe3
4d5ffa4
78b12d4
1da5a13
cce2eca
97e3096
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
<!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> | ||
</head> | ||
<body> | ||
<h1>hello there</h1> | ||
<p id="quote"></p> | ||
<p id="author"></p> | ||
<button type="button" id="new-quote">New quote</button> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Quote Generator App</title> | ||
|
||
<!-- Optional: Link to CSS if styling is needed --> | ||
<link rel="stylesheet" href="styles.css" /> | ||
|
||
<!-- Load JavaScript after DOM is ready --> | ||
<script defer src="quotes.js"></script> | ||
</head> | ||
<body class="center"> | ||
<main> | ||
<h1>Quote Generator</h1> | ||
|
||
<section id="quote-box" aria-live="polite"> | ||
<p id="quote"></p> | ||
<p id="author"></p> | ||
</section> | ||
|
||
<button type="button" id="new-quote" aria-label="Get a new quote"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's great that you considered accessibility and added aira-label. But when there is a visible text in the button, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay I will remove it then. |
||
New quote | ||
</button> | ||
</main> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,69 @@ | ||
/** Write your CSS in here **/ | ||
* { | ||
margin: 2px; | ||
padding: 2px; | ||
box-sizing: border-box; | ||
} | ||
|
||
body.centre { | ||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | ||
background: linear-gradient(to right, #1644da, #e2e2e2); | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
padding: 2rem; | ||
} | ||
|
||
/* Heading */ | ||
h1 { | ||
margin-bottom: 2rem; | ||
color: #2c3e50; | ||
} | ||
|
||
/* Quote Box */ | ||
#quote-box { | ||
background: linear-gradient(135deg, #2980b9, #6dd5fa); | ||
color: white; | ||
border-radius: 15px; | ||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); | ||
padding: 2rem 3rem; | ||
max-width: 600px; | ||
width: 90%; | ||
text-align: center; | ||
margin-bottom: 2rem; | ||
} | ||
|
||
/* Quote Text */ | ||
#quote { | ||
font-size: 1.5rem; | ||
font-weight: 600; | ||
margin-bottom: 1rem; | ||
text-align: center; | ||
} | ||
|
||
/* Author Text */ | ||
#author { | ||
font-size: 1.1rem; | ||
font-style: italic; | ||
} | ||
|
||
/* Button */ | ||
#new-quote { | ||
background-color: #ffffff; | ||
color: #2980b9; | ||
border: none; | ||
padding: 0.75rem 1.5rem; | ||
font-size: 1rem; | ||
font-weight: bold; | ||
border-radius: 8px; | ||
cursor: pointer; | ||
transition: all 0.3s ease; | ||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
#new-quote:hover { | ||
background-color: #2abfe4; | ||
transform: translateY(-2px); | ||
} |
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.
It seems you added styles to your app but it doesn't show on the page. Can you figure out why?
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'm trying to find out why the style code is not active on the website, but since adding style is not mandatory I thought uploading the PR will fastened my code reviewing.
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.
It wasn't working because you added an 's' to the href.
href="styles.css"
should match the filename in your commit, which is '../style.css'. It happens 😂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.
oooh my God. it's really my bad.
thank you for your help.