diff --git a/classes/output/core_renderer.php b/classes/output/core_renderer.php
index f05534a..c00b036 100644
--- a/classes/output/core_renderer.php
+++ b/classes/output/core_renderer.php
@@ -55,9 +55,9 @@ public function favicon()
public function navbar(): string
{
- return $this->render_from_template('theme_academi/breadcrumbs', [
- 'list' => $this->get_breadcrumb_list()
- ]);
+ $items = $this->get_breadcrumb_list();
+ $this->make_last_item_non_clickable($items);
+ return $this->render_from_template('theme_academi/breadcrumbs', ['items' => $items]);
}
private function get_breadcrumb_list(): array
@@ -70,16 +70,16 @@ private function get_breadcrumb_list(): array
// Standard breadcrumb for non-course pages.
if (count($navitems) > 1 && strpos($page->pagetype, 'course-view') !== 0) {
$items = array_merge($items, $this->build_standard_nav_items($navitems));
- return $this->wrap_single_breadcrumb_trail($items);
+ return $items;
}
- // Course view breadcrumb: home > courses > categories > current course.
+ // Course view breadcrumb: home > courses > mycourses > categories > current course.
if (strpos($page->pagetype, 'course-view') === 0 && !empty($page->course->id)) {
$items = array_merge($items, $this->build_course_view_items($page->course));
- return $this->wrap_single_breadcrumb_trail($items);
+ return $items;
}
- return $this->wrap_single_breadcrumb_trail($items);
+ return $items;
}
private function build_home_item(): array
@@ -104,8 +104,6 @@ private function build_standard_nav_items(array $navitems): array
];
}
- $this->make_last_item_non_clickable($items);
-
return $items;
}
@@ -115,6 +113,10 @@ private function build_course_view_items(\stdClass $course): array
[
'text' => get_string('courses'),
'url' => (new moodle_url('/course/index.php'))->out(false)
+ ],
+ [
+ 'text' => get_string('mycourses'),
+ 'url' => (new moodle_url('/my/courses.php'))->out(false)
]
];
@@ -171,9 +173,4 @@ private function make_last_item_non_clickable(array &$items)
$items[$lastitemindex]['url'] = null;
}
}
-
- private function wrap_single_breadcrumb_trail(array $items): array
- {
- return [['items' => $items]];
- }
}
diff --git a/scss/standard.scss b/scss/standard.scss
index 0312426..b001af3 100644
--- a/scss/standard.scss
+++ b/scss/standard.scss
@@ -1119,7 +1119,7 @@ div.backup-section + form {
border-radius: 0;
display: block;
padding: 0;
- > li {
+ .breadcrumb-item {
color: $grey;
text-shadow: none;
border-top-left-radius: 2px;
@@ -1128,6 +1128,11 @@ div.backup-section + form {
padding: 5px 15px;
float: left;
position: relative;
+ padding-inline: 1em;
+ overflow: visible;
+ width: fit-content;
+ margin-right: -.4em;
+ clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
a {
color: $grey;
&:hover,
@@ -1136,37 +1141,18 @@ div.backup-section + form {
text-decoration: none;
}
}
- > .divider {
- font-size: 10px;
- color: $primary;
+ &:first-child {
+ clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}
- }
- .breadcrumb-item {
&:last-child {
color: $white;
- padding-left: 15px;
- padding-right: 10px;
background: $primary;
- &:before {
- display: none;
- }
- &:after {
- content: '';
- width: 0;
- height: 0;
- border-top: 18px solid transparent;
- border-bottom: 15px solid transparent;
- border-left: 20px solid $primary;
- position: absolute;
- right: -20px;
- top: 0;
- }
}
- + .breadcrumb-item:before {
- content: '\f105';
- font-family: $font_0;
- font-weight: $font_weight;
- margin-right: 10px;
+ &:nth-child(2n):not(:last-child) {
+ background-color: mix($primary, $color_gallery_approx, 15%);
+ }
+ + .breadcrumb-item::before{
+ display: none;
}
}
}
@@ -1239,7 +1225,6 @@ body:not(.pagelayout-frontpage) {
margin-right: auto;
}
.secondary-navigation {
- max-width: 960px;
margin-left: auto;
margin-right: auto;
}
@@ -1251,7 +1236,6 @@ body:not(.pagelayout-frontpage) {
margin-right: auto;
}
.secondary-navigation {
- max-width: 960px;
margin-left: auto;
margin-right: auto;
}
@@ -1264,7 +1248,6 @@ body:not(.pagelayout-frontpage) {
margin-right: auto;
}
.secondary-navigation {
- max-width: 960px;
margin-left: auto;
margin-right: auto;
}
@@ -1293,7 +1276,6 @@ body:not(.pagelayout-frontpage) {
.secondary-navigation {
padding: 10px 30px;
.navigation {
- max-width: 960px;
margin: 0 auto;
border: 0;
}
@@ -1449,6 +1431,7 @@ body:not(.pagelayout-frontpage) {
.moremenu {
.nav.nav-tabs {
border-bottom: 0;
+ max-width: none;
.nav-item {
margin-right: 1px;
&:last-child {
diff --git a/templates/breadcrumbs.mustache b/templates/breadcrumbs.mustache
index 4572260..d3cb93d 100644
--- a/templates/breadcrumbs.mustache
+++ b/templates/breadcrumbs.mustache
@@ -15,18 +15,16 @@
along with Moodle. If not, see .
}}
\ No newline at end of file