Skip to content

Commit

Permalink
Merge pull request #1583 from BirkbeckCTP/1364-material_toc
Browse files Browse the repository at this point in the history
#1364 Updated toc gen & styling to help make it... less of a mess.
  • Loading branch information
mauromsl authored May 22, 2020
2 parents 9b548b9 + e2f3b90 commit 65b9bc2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/themes/OLH/assets/js/table_of_contents.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $( document ).ready(function() {
$("#main_article :header").each(function () {

link = $(this);
title = link.html();
title = link.text();

if (!link.attr("id")) {
link.attr('id', 'heading' + iter.toString());
Expand Down
2 changes: 2 additions & 0 deletions src/themes/OLH/assets/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,8 @@ div.caption span.label {

li {
position: relative;
margin-bottom: 10px;
line-height: 1.3em;

&:before {
content: '';
Expand Down
10 changes: 8 additions & 2 deletions src/themes/material/assets/mat.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ a:hover .article-title {

.toc-card {
position: fixed !important;
bottom: 40%;
top: 1%;
}

.wide-button {
Expand Down Expand Up @@ -175,6 +175,12 @@ h5 {
text-decoration-style: solid;
}

.table-of-contents li {
padding: 3px 0;
font-size: 14px;
}

.small-caps {
font-variant: small-caps
}
}

2 changes: 1 addition & 1 deletion src/themes/material/assets/toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $( document ).ready(function() {
$("#main_article :header").each(function () {

link = $(this);
title = link.html();
title = link.text();

if (!link.attr("id")) {
link.attr('id', 'heading' + iter.toString());
Expand Down

0 comments on commit 65b9bc2

Please sign in to comment.