Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions src/pages/puzzles/[instanceId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,23 +169,25 @@ const PuzzlePage = ({
setAnswer={setAnswer}
/>
</div>
{isAuthenticated ? (
<Button
style={'primary'}
type={'submit'}
content={'Submit'}
onClick={() =>
handleSubmit(answer, puzzleInstance, puzzle, randomSeed, user)
}
/>
) : (
<Button
style={'primary'}
content={'Login to Submit'}
arrowDirection={'right'}
onClick={() => signIn()}
/>
)}
<div>
{isAuthenticated ? (
<Button
style={'primary'}
type={'submit'}
content={'Submit'}
onClick={() =>
handleSubmit(answer, puzzleInstance, puzzle, randomSeed, user)
}
/>
) : (
<Button
style={'primary'}
content={'Login to Submit'}
arrowDirection={'right'}
onClick={() => signIn()}
/>
)}
</div>
</section>
</main>
</>
Expand Down
47 changes: 43 additions & 4 deletions src/styles/pages/PuzzlePage.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
justify-content: space-between;

.text {
flex: 0 0 65%;
max-width: 65%;
width: 100%;
padding: 2rem 2rem;

Expand Down Expand Up @@ -52,8 +50,7 @@
}

.image {
flex: 0 0 35%;
max-width: 35%;
flex: 1;
position: relative;
width: 100%;
height: auto;
Expand Down Expand Up @@ -94,3 +91,45 @@
.feedbackContainer {
margin: 3rem 0;
}

/* MEDIA QUERIES*/
@media (max-width: 600px) {
.card {
max-width: 600px;
flex-direction: column;
}
}
@media (max-width: 768px) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The breakpoints should be constants in another file
Also the media queries themselves should be mixins

.card {
max-width: 720px;
flex-direction: column;
}
}
@media (max-width: 992px) {
.card {
max-width: 960px;
flex-direction: column;
}
}
@media (max-width: 1200px) {
.card {
max-width: 1140px;
}
.text {
flex: 0 0 65%;
}
.image {
flex: 0 0 35%;
}
}
@media (min-width: 1200px) {
.card {
min-width: 1140px;
}
.text {
flex: 0 0 65%;
}
.image {
flex: 0 0 35%;
}
}