Skip to content

Commit

Permalink
replace bootstrap-toc dependency by tocbot
Browse files Browse the repository at this point in the history
  • Loading branch information
Holger Graef authored and hgrf committed Oct 26, 2023
1 parent 0ccece8 commit 6f94a53
Show file tree
Hide file tree
Showing 8 changed files with 1,247 additions and 10,089 deletions.
1 change: 0 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ The following libraries are included in Racine under the MIT license
* jQuery - Copyright (c) jQuery Foundation and other contributors.
* jquery.jeditable.js - Copyright (c) 2006 Mika Tuupola, Dylan Verheul, Nicolas Carpi.
* typeahead.js - Copyright (c) Twitter, Inc.
* bootstrap-toc.min.js and bootstrap-toc.min.css - Copyright (c) 2015-2016 Aidan Feldman.
* Lightbox2 - Copyright (c) 2015 Lokesh Dhakar.

The following libraries are included in Racine under the Apache license
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ install-js-dependencies: install-mathjax api-client
cp js/node_modules/bootstrap/dist/css/bootstrap.min.css app/static/css/bootstrap.min.css
cp js/node_modules/bootstrap/dist/fonts/* app/static/fonts/

cp js/node_modules/bootstrap-toc/dist/bootstrap-toc.min.css app/static/css/bootstrap-toc.min.css
cp js/node_modules/tocbot/dist/tocbot.css app/static/css/tocbot.css

cp js/node_modules/lightbox2/dist/css/lightbox.css app/static/css/lightbox.css
cp js/node_modules/lightbox2/dist/images/* app/static/images/
Expand Down
2 changes: 1 addition & 1 deletion app/static/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
mathjax/

css/bootstrap.min.css
css/bootstrap-toc.min.css
css/lightbox.css
css/tocbot.css
css/typeahead.css

fonts/
Expand Down
25 changes: 15 additions & 10 deletions app/templates/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@

{% block styles %}
{{super()}}
<link rel="stylesheet" href="/static/css/bootstrap-toc.min.css">
<link rel="stylesheet" href="/static/css/tocbot.css">
<style>
/* see https://tscanlin.github.io/tocbot/ */
h1::before, h2::before, h3::before, h4::before, h5::before, h6::before {
display: block;
content: " ";
height: 60px;
margin-top: -60px;
visibility: hidden;
ul.toc-list {
list-style-type: none;
}

ul.toc-list li {
padding-top: 5px;
padding-bottom: 5px;
}

div#js-toc-content {
max-width: 800px;
}

p {
text-align:justify;
}
Expand All @@ -20,12 +25,12 @@

{% block sidebarnav %}
<div id="sidebar" class="col-sm-3 col-md-2 sidebar">
<nav id="toc" data-toggle="toc"></nav>
<nav id="js-toc"></nav>
</div>
{% endblock %}

{% block page_content %}
<div style="max-width: 800px;">
<div class="js-toc-content">
<h2>Racine version</h2>
You are using Racine <b>{{ racine_version }}</b>.
<h2>Introduction</h2>
Expand Down
Loading

0 comments on commit 6f94a53

Please sign in to comment.