Skip to content

Commit 2af3dd9

Browse files
add baseline styles, fix logic
1 parent bd01559 commit 2af3dd9

File tree

2 files changed

+52
-4
lines changed

2 files changed

+52
-4
lines changed

src/single-course.php

+10-4
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,20 @@
5050

5151
<nav class="breadcrumbs">
5252
<ul>
53-
<?php if ($contextType == 'course-index') : ?>
53+
<?php if ($contextType == 'course-index' && $embedded == true ) : ?>
5454
<li>Creative Commons</li>
5555
<?php endif; ?>
56-
<?php if($contextType == 'course-page') : ?>
57-
<li><a href="#">Creative Commons</a></li>
56+
<?php if($contextType == 'course-index' && $embedded == '') : ?>
57+
<li><a href="https://creativecommons.org">Creative Commons</a></li>
5858
<?php endif; ?>
59-
59+
<?php if($contextType == 'course-page' && $embedded == '') : ?>
60+
<li><a href="https://creativecommons.org">Creative Commons</a></li>
61+
<?php endif; ?>
62+
63+
<?php if ($contextType != 'course-index' ) : ?>
6064
<li><a href="#">top title of course</a></li>
65+
<?php endif; ?>
66+
6167
</ul>
6268
</nav>
6369

src/style.css

+42
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,48 @@ main nav.pagination ul li span.current {
480480
border: 2px solid var(--vocabulary-neutral-color-dark-gray);
481481
}
482482

483+
.course-index > header {
484+
display: none;
485+
}
486+
487+
.course-index > footer {
488+
/* display: none; */
489+
}
490+
491+
.course-page > header {
492+
display: none;
493+
}
494+
495+
.course-page > footer {
496+
/* display: none; */
497+
}
498+
499+
.course-embedded > header {
500+
display: none;
501+
}
502+
503+
.course-embedded > footer {
504+
display: none;
505+
}
506+
507+
.course-embedded nav.breadcrumbs ul, .course-page nav.breadcrumbs ul, .course-index nav.breadcrumbs ul {
508+
display: flex;
509+
margin: 0;
510+
justify-content: space-between;
511+
512+
list-style: none;
513+
text-align: left;
514+
font-size: .9em;
515+
}
516+
517+
.course-embedded nav.breadcrumbs ul li:after, .course-page nav.breadcrumbs ul li:after, .course-index nav.breadcrumbs ul li:after {
518+
content: '>';
519+
padding: 0 .5em;
520+
}
521+
522+
.course-embedded nav.breadcrumbs ul li:last-child:after, .course-page nav.breadcrumbs ul li:last-child:after, .course-index nav.breadcrumbs ul li:last-child:after {
523+
display: none;
524+
}
483525

484526
@media (min-width: 1500px) {
485527

0 commit comments

Comments
 (0)