Skip to content

Commit fe016b7

Browse files
committed
UI changes for featured
1 parent f5fa8f1 commit fe016b7

2 files changed

Lines changed: 79 additions & 20 deletions

File tree

assets/css/list-pages.css

Lines changed: 72 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,13 @@ ads-card.path-card {
185185
--ads-card-background-color-hover: var(--arm-light-grey);
186186
--ads-card-box-shadow-hover: 0 3px 6px 1px rgba(0,0,0,0.16); /* 0 1px 3px 3px rgba(0,0,0,0.25); */
187187
}
188+
189+
ads-card.path-card.featured-path-card {
190+
--ads-card-border-width: 0;
191+
--ads-card-border-color: transparent;
192+
--ads-card-border-color-hover: transparent;
193+
}
194+
188195
html[theme='dark'] ads-card.path-card {
189196
--ads-card-background-color: var(--arm-color-base);
190197
--ads-card-border-color: #000000;
@@ -196,6 +203,45 @@ html[theme='dark'] ads-card.path-card {
196203
--ads-card-box-shadow-hover: #000 @50%, X:0 Y: 3 B:12; /* probably not working */
197204
}
198205

206+
html[theme='dark'] ads-card.path-card.featured-path-card {
207+
--ads-card-border-width: 0;
208+
--ads-card-border-color: transparent;
209+
--ads-card-border-color-hover: transparent;
210+
}
211+
212+
ads-card.path-card.featured-path-card ads-card-content::before {
213+
content: "";
214+
position: absolute;
215+
inset: 0;
216+
border-radius: 10px;
217+
padding: 1.5px;
218+
background: linear-gradient(135deg,
219+
var(--arm-green) 0%,
220+
var(--arm-green) 50%,
221+
var(--arm-web-safe-blue) 50%,
222+
var(--arm-web-safe-blue) 100%);
223+
-webkit-mask:
224+
linear-gradient(#fff 0 0) content-box,
225+
linear-gradient(#fff 0 0);
226+
-webkit-mask-composite: xor;
227+
mask-composite: exclude;
228+
pointer-events: none;
229+
opacity: 0.42;
230+
transition: opacity 0.3s ease-in-out;
231+
}
232+
233+
html[theme='dark'] ads-card.path-card.featured-path-card ads-card-content::before {
234+
background: linear-gradient(135deg,
235+
var(--arm-green) 0%,
236+
var(--arm-green) 50%,
237+
var(--arm-light-blue) 50%,
238+
var(--arm-light-blue) 100%);
239+
}
240+
241+
ads-card.path-card.featured-path-card:hover ads-card-content::before {
242+
opacity: 1;
243+
}
244+
199245

200246
.basics-title:hover {
201247
transition: color 0.3s ease-in-out;
@@ -208,6 +254,12 @@ ads-card.path-card:hover .learning-path-title {
208254
color: var(--arm-green);
209255
}
210256

257+
ads-card.path-card:hover .pinned-inline-icon,
258+
ads-card.path-card:hover .pinned-featured-label {
259+
transition: color 0.3s ease-in-out;
260+
color: var(--arm-green);
261+
}
262+
211263
/* adjust height depending on screen size */
212264
ads-card.path-card .learning-path-title-div { /* xs and sm */
213265
min-height: 50px;
@@ -224,26 +276,33 @@ ads-card.path-card .learning-path-title-div { /* xs and sm */
224276
font-size: 0.9rem!important;
225277
}
226278

227-
.pinned-featured-label {
228-
color: inherit;
229-
font-weight: 700;
230-
letter-spacing: 0.02em;
279+
.pinned-header-row {
280+
display: flex;
281+
align-items: center;
282+
gap: 0.35rem;
283+
margin-bottom: 0.3rem;
231284
}
232285

233-
ads-card.path-card ads-card-content {
234-
position: relative;
286+
.pinned-featured-label {
287+
color: var(--arm-web-safe-blue);
288+
font-weight: 400;
289+
letter-spacing: normal;
235290
}
236291

237-
.pinned-corner-icon {
238-
position: absolute;
239-
top: 12px;
240-
right: 14px;
241-
color: var(--arm-web-safe-orange);
292+
.pinned-inline-icon {
293+
color: var(--arm-web-safe-blue);
242294
font-size: 0.95rem;
295+
line-height: 1;
243296
}
244297

245-
html[theme="dark"] .pinned-corner-icon {
246-
color: var(--arm-orange);
298+
.pinned-inline-icon i {
299+
display: inline-block;
300+
transform: rotate(-45deg);
301+
}
302+
303+
html[theme="dark"] .pinned-inline-icon,
304+
html[theme="dark"] .pinned-featured-label {
305+
color: var(--arm-light-blue);
247306
}
248307

249308
html[theme="light"] .learning-path-title, html[theme="light"] .basics-title {

themes/arm-design-system-hugo-theme/layouts/partials/general-formatting/path-ads-card.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
- _default/term.html
1111
*/}}
1212

13-
<ads-card link="{{.learning_path.Permalink}}" class='path-card'>
13+
<ads-card link="{{.learning_path.Permalink}}" class='path-card{{ if .is_pinned }} featured-path-card{{ end }}'>
1414
<ads-card-content slot="content">
1515
{{ if .is_pinned }}
16-
<span class="pinned-corner-icon" aria-label="Pinned learning path" title="Pinned learning path">
17-
<i class="fa-solid fa-thumbtack" aria-hidden="true"></i>
18-
</span>
16+
<div class="pinned-header-row">
17+
<span class="pinned-inline-icon" aria-label="Pinned learning path" title="Pinned learning path">
18+
<i class="fa-solid fa-thumbtack" aria-hidden="true"></i>
19+
</span>
20+
<span class="pinned-featured-label">| FEATURED</span>
21+
</div>
1922
{{ end }}
2023
<!-- SUBJECT -->
2124
<p class="card-subject u-margin-top-0 u-margin-bottom-1/2">
2225
{{ upper .learning_path.Params.subjects }}
23-
{{ if .is_pinned }}
24-
<span class="pinned-featured-label">&nbsp;| FEATURED</span>
25-
{{ end }}
2626
</p>
2727
<!-- Title of Learning Path -->
2828
<div class="learning-path-title-div">

0 commit comments

Comments
 (0)