Skip to content

Commit 73cf507

Browse files
authored
Upgrade from Bootstrap 3 to Bootstrap 5 (#543)
1 parent d123d9c commit 73cf507

File tree

1 file changed

+41
-15
lines changed

1 file changed

+41
-15
lines changed

schema_salad/makedoc.py

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,10 @@ def avrold_doc(
519519

520520
if brandstyle is None:
521521
bootstrap_url = (
522-
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"
522+
"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
523523
)
524524
bootstrap_integrity = (
525-
"sha384-604wwakM23pEysLJAhja8Lm42IIwYrJ0dEAqzFsj9pJ/P5buiujjywArgPCi8eoz"
525+
"sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
526526
)
527527
brandstyle_template = (
528528
'<link rel="stylesheet" href={} integrity={} crossorigin="anonymous">'
@@ -564,15 +564,43 @@ def avrold_doc(
564564
padding-top: 61px;
565565
margin-top: -61px;
566566
}
567-
body {
568-
padding-top: 61px;
569-
}
570567
.tocnav ol {
571568
list-style: none
572569
}
573570
pre {
574-
margin-left: 2em;
575-
margin-right: 2em;
571+
margin: 0 2em 10px 2em;
572+
padding: 9.5px;
573+
line-height: 1.42857143;
574+
color: #333;
575+
word-break: break-all;
576+
word-wrap: break-word;
577+
background-color: #f5f5f5;
578+
border: 1px solid #ccc;
579+
border-radius: 4px;
580+
}
581+
pre code {
582+
padding: 0;
583+
font-size: inherit;
584+
color: inherit;
585+
white-space: pre-wrap;
586+
background-color: transparent;
587+
border-radius: 0;
588+
}
589+
code {
590+
background-color: #f9f2f4;
591+
border-radius: 4px;
592+
padding: 2px 4px;
593+
color: #c7254e;
594+
}
595+
blockquote {
596+
padding: 10px 20px 1px 20px;
597+
border-left: 5px solid #eee;
598+
}
599+
a {
600+
text-decoration: none;
601+
}
602+
a code {
603+
color: #c7254e;
576604
}
577605
.section a {
578606
visibility: hidden;
@@ -629,10 +657,9 @@ def avrold_doc(
629657
navbar_extraclass = "navbar-inverse" if brandinverse else ""
630658
outdoc.write(
631659
"""
632-
<nav class="navbar navbar-default navbar-fixed-top {}">
660+
<nav class="navbar sticky-top navbar-expand-lg navbar-light bg-light {}">
633661
<div class="container">
634-
<div class="navbar-header">
635-
<a class="navbar-brand" href="{}">{}</a>
662+
<a class="navbar-brand" href="{}">{}</a>
636663
""".format(
637664
navbar_extraclass, brandlink, brand
638665
)
@@ -642,23 +669,22 @@ def avrold_doc(
642669
content = content.replace("<!--ToC-->", toc.contents("toc"))
643670
outdoc.write(
644671
"""
645-
<ul class="nav navbar-nav">
646-
<li><a href="#toc">Table of contents</a></li>
647-
</ul>
672+
<ul class="navbar-nav me-auto">
673+
<li class="nav-item"><a class="nav-link" href="#toc">Table of contents</a></li>
674+
</ul>
648675
"""
649676
)
650677

651678
outdoc.write(
652679
"""
653-
</div>
654680
</div>
655681
</nav>
656682
"""
657683
)
658684

659685
outdoc.write(
660686
"""
661-
<div class="container">
687+
<div class="container mt-4">
662688
"""
663689
)
664690

0 commit comments

Comments
 (0)