Skip to content

Commit 7401ef6

Browse files
committed
remove inline style
on my machine, it didnt work on Concepts: the button still used up three lines. it was fine on the QuestionFinder but I wanted to be consistent across the two pages. Even if I got it to work on my machine's particular settings, using fixed widths, I don't think it would have worked reliable across different font sizes.
1 parent 6770413 commit 7401ef6

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

src/app/components/pages/Concepts.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,18 @@ export const Concepts = withRouter((props: RouteComponentProps) => {
132132
: <GenericConceptsSidebar {...sidebarProps} searchStages={searchStages} setSearchStages={setSearchStages} stageCounts={stageCounts}/>
133133
}
134134
<MainContent>
135-
{pageContext?.subject && <div className="d-flex align-items-baseline flex-wrap flex-md-nowrap my-3">
136-
<p className="me-3">The concepts shown on this page have been filtered to only show those that are relevant to {getHumanContext(pageContext)}.</p>
137-
<AffixButton size="md" color="keyline" tag={Link} to="/concepts" className="ms-auto" style={{minWidth: "136px"}}
138-
affix={{
139-
affix: "icon-right",
140-
position: "suffix",
141-
type: "icon"
142-
}}>
135+
{pageContext?.subject && <div className="d-flex align-items-center flex-wrap flex-md-nowrap my-3">
136+
<p className="me-3 mb-3">The concepts shown on this page have been filtered to only show those that are relevant to {getHumanContext(pageContext)}.</p>
137+
<div className="ms-auto mb-3">
138+
<AffixButton size="md" color="keyline" tag={Link} to="/concepts" className="text-nowrap"
139+
affix={{
140+
affix: "icon-right",
141+
position: "suffix",
142+
type: "icon"
143+
}}>
143144
Browse all concepts
144-
</AffixButton>
145+
</AffixButton>
146+
</div>
145147
</div>}
146148
{isPhy && <div className="list-results-container p-2 my-4">
147149
<ShowLoadingQuery

src/app/components/pages/QuestionFinder.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -462,16 +462,18 @@ export const QuestionFinder = withRouter(({location}: RouteComponentProps) => {
462462
{siteSpecific(
463463
<div className="my-3">
464464
{(pageContext?.subject && pageContext.stage)
465-
? <div className="d-flex align-items-baseline flex-wrap flex-md-nowrap">
466-
<p className="me-3">The questions shown on this page have been filtered to only show those that are relevant to {getHumanContext(pageContext)}.</p>
467-
<AffixButton size="md" color="keyline" tag={Link} to="/questions" className="ms-auto" style={{minWidth: "136px"}}
468-
affix={{
469-
affix: "icon-right",
470-
position: "suffix",
471-
type: "icon"
472-
}}>
465+
? <div className="d-flex align-items-center flex-wrap flex-md-nowrap">
466+
<p className="me-3 mb-3">The questions shown on this page have been filtered to only show those that are relevant to {getHumanContext(pageContext)}.</p>
467+
<div className="ms-auto mb-3">
468+
<AffixButton size="md" color="keyline" tag={Link} to="/questions" className="text-nowrap" style={{minWidth: "136px"}}
469+
affix={{
470+
affix: "icon-right",
471+
position: "suffix",
472+
type: "icon"
473+
}}>
473474
Browse all questions
474-
</AffixButton>
475+
</AffixButton>
476+
</div>
475477
</div>
476478
: <>Use our question finder to find questions to try on topics in Physics, Maths, Chemistry and Biology.
477479
Use our practice questions to become fluent in topics and then take your understanding and problem solving skills to the next level with our challenge questions.</>}

0 commit comments

Comments
 (0)