Skip to content

Commit 9518b3d

Browse files
committed
fix: theme fixes for learning path item page
1 parent 08cc860 commit 9518b3d

File tree

2 files changed

+75
-14
lines changed

2 files changed

+75
-14
lines changed

src/learningpath/LearningPathDetails.jsx

+16-11
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Calendar,
1010
FormatListBulleted,
1111
AccessTimeFilled,
12+
ChevronLeft,
1213
} from '@openedx/paragon/icons';
1314
import { buildAssetUrl } from '../util/assetUrl';
1415
import { useLearningPathDetail, useCoursesByIds } from './data/queries';
@@ -65,7 +66,10 @@ const LearningPathDetailPage = () => {
6566
content = (
6667
<div className="p-4">
6768
<p>Failed to load detail</p>
68-
<Link to="/">Explore</Link>
69+
<Link to="/">
70+
<Icon src={ChevronLeft} />
71+
<span>Go Back</span>
72+
</Link>
6973
</div>
7074
);
7175
} else {
@@ -89,13 +93,14 @@ const LearningPathDetailPage = () => {
8993
<div className="learning-path-detail-page">
9094
<div className="hero-section p-4">
9195
<div className="mb-3">
92-
<Link to="/" style={{ fontWeight: 600 }}>
93-
Explore
96+
<Link to="/" style={{ fontWeight: 600 }} className="d-flex">
97+
<Icon src={ChevronLeft} />
98+
<span>Go Back</span>
9499
</Link>
95100
</div>
96-
<Row>
101+
<Row className="border-bottom border-light">
97102
<Col xs={12} md={8}>
98-
<div className="lp-type-label text-uppercase mb-2">
103+
<div className="lp-detail-type-label d-flex text-uppercase mb-2">
99104
<Icon src={FormatListBulleted} className="mr-1" />
100105
<span>Learning Path</span>
101106
</div>
@@ -112,7 +117,7 @@ const LearningPathDetailPage = () => {
112117
src={buildAssetUrl(imageUrl)}
113118
alt={displayName}
114119
style={{
115-
width: '100%', borderRadius: '4px', maxHeight: '250px', objectFit: 'cover',
120+
width: '650px', borderRadius: '4px', maxHeight: '500px', objectFit: 'cover',
116121
}}
117122
/>
118123
)}
@@ -122,7 +127,7 @@ const LearningPathDetailPage = () => {
122127
{accessUntilDate && (
123128
<Col xs={6} md={3} className="mb-3">
124129
<div className="d-flex align-items-center">
125-
<Icon src={AccessTimeFilled} className="mr-4 mb-3" />
130+
<Icon src={AccessTimeFilled} className="mr-4 mb-3" style={{ color: '#821122' }} />
126131
<div>
127132
<p className="mb-0 font-weight-bold">
128133
{accessUntilDate.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })}
@@ -134,7 +139,7 @@ const LearningPathDetailPage = () => {
134139
)}
135140
<Col xs={6} md={3} className="mb-3">
136141
<div className="d-flex align-items-center">
137-
<Icon src={Award} className="mr-4 mb-4" />
142+
<Icon src={Award} className="mr-4 mb-4" style={{ color: '#821122' }} />
138143
<div>
139144
<p className="mb-1 font-weight-bold">Earn a certificate</p>
140145
<p className="text-muted">Some subtext</p>
@@ -143,7 +148,7 @@ const LearningPathDetailPage = () => {
143148
</Col>
144149
<Col xs={6} md={3} className="mb-3">
145150
<div className="d-flex align-items-center">
146-
<Icon src={Calendar} className="mr-4 mb-4" />
151+
<Icon src={Calendar} className="mr-4 mb-4" style={{ color: '#821122' }} />
147152
<div>
148153
<p className="mb-1 font-weight-bold">
149154
{durationText || '6 months'}
@@ -154,7 +159,7 @@ const LearningPathDetailPage = () => {
154159
</Col>
155160
<Col xs={6} md={3} className="mb-3">
156161
<div className="d-flex align-items-center">
157-
<Icon src={Person} className="mr-4 mb-4" />
162+
<Icon src={Person} className="mr-4 mb-4" style={{ color: '#821122' }} />
158163
<div>
159164
<p className="mb-1 font-weight-bold">Self-paced</p>
160165
<p className="text-muted">Some subtext</p>
@@ -187,7 +192,7 @@ const LearningPathDetailPage = () => {
187192
{description || ''}
188193
</p>
189194
</section>
190-
<section id="courses" className="mb-6">
195+
<section id="courses" className="mb-6 courses-section">
191196
<h2>Courses</h2>
192197
{loadingCourses && <Spinner animation="border" variant="primary" />}
193198
{!loadingCourses && !coursesError && (!coursesForPath || coursesForPath.length === 0) && (

src/learningpath/index.css

+59-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585

8686
.learning-path-detail-page {
8787
font-family: "Open Sans", sans-serif;
88-
margin: 6rem;
88+
margin: 2rem;
8989

9090
.hero-section {
9191
padding: 2rem;
@@ -164,8 +164,8 @@
164164

165165
.lp-info {
166166
margin-top: 3rem;
167-
margin-left: 10rem;
168-
margin-right: 10rem;
167+
margin-left: 2rem;
168+
margin-right: 2rem;
169169

170170
section {
171171
margin-bottom: 2rem;
@@ -175,6 +175,27 @@
175175
margin-bottom: 1rem;
176176
}
177177
}
178+
179+
.courses-section {
180+
position: relative;
181+
left: 50%;
182+
right: 50%;
183+
width: 100vw;
184+
margin-left: -50vw;
185+
margin-right: -50vw;
186+
background-color: #FBFAF9;
187+
padding-top: 2rem;
188+
padding-bottom: 2rem;
189+
190+
h2 {
191+
margin-left: 6rem;
192+
}
193+
194+
.mb-3 {
195+
max-width: 1360px;
196+
margin-left: 6rem;
197+
}
198+
}
178199
}
179200
}
180201

@@ -189,8 +210,31 @@
189210
border-bottom: 0;
190211

191212
.nav-link {
213+
position: relative;
192214
font-weight: 600;
193215
padding: 1rem 1.5rem;
216+
text-decoration: none !important;
217+
218+
&:focus {
219+
box-shadow: none !important;
220+
}
221+
222+
&::after {
223+
content: "";
224+
position: absolute;
225+
left: 0;
226+
right: 0;
227+
bottom: 0;
228+
height: 0;
229+
background-color: transparent;
230+
transition: height 0.2s, background-color 0.2s;
231+
}
232+
233+
&:hover::after,
234+
&:active::after {
235+
height: 4px;
236+
background-color: #821122;
237+
}
194238
}
195239
}
196240

@@ -349,3 +393,15 @@
349393
.pgn__card .pgn__card-footer.vertical {
350394
padding: 0 !important;
351395
}
396+
397+
.lp-detail-type-label {
398+
background-color: #821122;
399+
max-width: 10rem;
400+
color: #fff;
401+
border-radius: 5px;
402+
padding: 2px 2px;
403+
align-items: center;
404+
font-size: 0.95rem;
405+
font-weight: 600;
406+
margin-bottom: 1.5rem !important;
407+
}

0 commit comments

Comments
 (0)