Skip to content

Commit

Permalink
Adding breadcrumb navigation and program type badge (#1981)
Browse files Browse the repository at this point in the history
  • Loading branch information
annagav authored Nov 9, 2023
1 parent 62bc649 commit 9b85ae4
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
15 changes: 15 additions & 0 deletions cms/templates/product_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@
<div class="row d-flex flex-row align-center">
<div class="col flex-grow-1" id="product-details">
<div class="text">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/catalog">
<img alt="breadcrumb-arrow" src="/static/images/breadcrumb-arrow.svg"/>Catalog
</a>
</li>
<li class="breadcrumb-item" aria-current="page">{% if page.is_program_page %}Program{% else %}Course{% endif %}</li>
</ol>
</nav>
{% if page.is_program_page %}
<div class="mb-2">
<span class="badge-program-type">{{ page.product.program_type }}</span>
</div>
{% endif %}
<h1>{{ page.title }}</h1>
{# Description field contents are already rendered wrapped in a <p> tag #}

Expand Down
33 changes: 31 additions & 2 deletions frontend/public/scss/product-page/product-details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
body.new-design {
font-family: Inter;

h1, h2 {
font-family: Poppins;
h2 {
font-family: Poppins;

}
h1 {
font-family: Poppins;
@include media-breakpoint-up(lg) {
font-size: 45px;
}
}

.product-page {
margin-top: 1.5rem;
Expand All @@ -18,6 +24,29 @@ body.new-design {
}
}

.breadcrumb-item {
color: var(--GreyText, #6F7175);
font-size: 14px;

img {
margin-right: 10px;
}
a {
text-decoration: none;
}
}
span.badge-program-type {
background-color: $black;
color: white;
border-radius: 3px;
padding: 3px 10px;
font-size: 12px;
font-family: Poppins;
font-style: normal;
font-weight: 700;
line-height: normal;
}


section.course-description {
font-size: 20px;
Expand Down
3 changes: 3 additions & 0 deletions static/images/breadcrumb-arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9b85ae4

Please sign in to comment.