Browse Source

Styling the TOC

pull/680/head
danpros 1 year ago
parent
commit
8da38da937
10 changed files with 371 additions and 9 deletions
  1. +46
    -0
      themes/blog/css/styles.css
  2. +48
    -2
      themes/clean/css/style.css
  3. +1
    -0
      themes/clean/static.html.php
  4. +46
    -0
      themes/doks/css/style.css
  5. +0
    -7
      themes/doks/js/toc.js
  6. +46
    -0
      themes/logs/css/style.css
  7. +46
    -0
      themes/readable/css/style.css
  8. +46
    -0
      themes/twentyfifteen/css/style.css
  9. +46
    -0
      themes/twentyfifteen/css/style_v2.css
  10. +46
    -0
      themes/twentysixteen/css/style.css

+ 46
- 0
themes/blog/css/styles.css View File

@ -628,4 +628,50 @@ ul.month {
display:inline; display:inline;
margin:0 0 0 10px; margin:0 0 0 10px;
float:right; float:right;
}
summary {
display: list-item;
cursor: pointer;
}
.toc-wrapper {
background: #f9f9f9;
border: 1px solid #aaa;
border-radius: 4px;
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
box-shadow: 0 1px 1px rgba(0,0,0,.05);
margin-bottom: 1.5em;
padding: 10px;
position: relative;
width: auto;
font-size: 90%;
}
.toc-wrapper .inner {
margin-top:5px;
}
.toc-wrapper .inner a {
border: none;
box-shadow:none;
}
.toc .h3-toc {
margin-left: .20in;
}
.toc .h4-toc {
margin-left: .35in;
}
.toc .h5-toc {
margin-left: .50in;
}
.toc .h6-toc {
margin-left: .65in;
}
.toc-link a.anchor {
border:none;
margin-left: 5px;
box-shadow:none;
} }

+ 48
- 2
themes/clean/css/style.css View File

@ -211,7 +211,7 @@ h6 {
text-decoration: none; text-decoration: none;
} }
.in-front .post, .in-tag .post, .in-archive .post, .in-search .post, .in-profile .post {
.in-front .post, .in-tag .post, .in-archive .post, .in-search .post, .in-profile .post, .in-category .post, .in-blog .post, .in-type .post{
border-bottom: 1px solid #dfdfdf; border-bottom: 1px solid #dfdfdf;
padding: 30px 0 10px 0; padding: 30px 0 10px 0;
} }
@ -949,4 +949,50 @@ ul.archivegroup {
.archivegroup li.expanded, .archivegroup li.collapsed, .archivegroup li.expanded li, .archivegroup li.collapsed li { .archivegroup li.expanded, .archivegroup li.collapsed, .archivegroup li.expanded li, .archivegroup li.collapsed li {
list-style: none; list-style: none;
background:none; background:none;
}
}
summary {
display: list-item;
cursor: pointer;
}
.toc-wrapper {
background: #f9f9f9;
border: 1px solid #aaa;
border-radius: 4px;
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
box-shadow: 0 1px 1px rgba(0,0,0,.05);
margin-bottom: 1.5em;
padding: 10px;
position: relative;
width: auto;
font-size: 90%;
}
.toc-wrapper .inner {
margin-top:5px;
}
.toc-wrapper .inner a {
border: none;
box-shadow:none;
}
.toc .h3-toc {
margin-left: .20in;
}
.toc .h4-toc {
margin-left: .35in;
}
.toc .h5-toc {
margin-left: .50in;
}
.toc .h6-toc {
margin-left: .65in;
}
.toc-link a.anchor {
border:none;
margin-left: 5px;
box-shadow:none;
}

+ 1
- 0
themes/clean/static.html.php View File

@ -10,6 +10,7 @@
<?php echo $p->body; ?> <?php echo $p->body; ?>
</div> </div>
</div> </div>
<div class="border"></div>
<div class="postnav"> <div class="postnav">
<?php if (!empty($next)): ?> <?php if (!empty($next)): ?>
<span><a href="<?php echo($next['url']); ?>" class="pagination-arrow newer" rel="next"><?php echo($next['title']); ?></a></span> <span><a href="<?php echo($next['url']); ?>" class="pagination-arrow newer" rel="next"><?php echo($next['title']); ?></a></span>


+ 46
- 0
themes/doks/css/style.css View File

@ -3533,3 +3533,49 @@ body.dark .docs-bar .menu-icon .navicon::before, body.dark .docs-bar .menu-icon
.float-right { .float-right {
float:right; float:right;
} }
summary {
display: list-item;
cursor: pointer;
}
.toc-wrapper {
background: #f9f9f9;
border: 1px solid #aaa;
border-radius: 4px;
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
box-shadow: 0 1px 1px rgba(0,0,0,.05);
margin-bottom: 1.5em;
padding: 10px;
position: relative;
width: auto;
font-size: 90%;
}
.toc-wrapper .inner {
margin-top:5px;
}
.toc-wrapper .inner a {
border: none;
box-shadow:none;
}
.toc .h3-toc {
margin-left: .20in;
}
.toc .h4-toc {
margin-left: .35in;
}
.toc .h5-toc {
margin-left: .50in;
}
.toc .h6-toc {
margin-left: .65in;
}
.toc-link a.anchor {
border:none;
margin-left: 5px;
box-shadow:none;
}

+ 0
- 7
themes/doks/js/toc.js View File

@ -32,12 +32,6 @@ function htmlTableOfContents (documentRef) {
headings.forEach(function (heading, index) { headings.forEach(function (heading, index) {
heading.setAttribute('id', 'toc-' + heading.textContent.replace(/\s+/g, '-').toLowerCase()); heading.setAttribute('id', 'toc-' + heading.textContent.replace(/\s+/g, '-').toLowerCase());
var anchor = documentRef.createElement('a');
anchor.setAttribute('href', '#toc-' + heading.textContent.replace(/\s+/g, '-').toLowerCase());
anchor.setAttribute('class', 'anchor');
anchor.setAttribute('aria-hidden', 'true');
anchor.textContent = '#';
var link = documentRef.createElement('a'); var link = documentRef.createElement('a');
link.setAttribute('href', '#toc-' + heading.textContent.replace(/\s+/g, '-').toLowerCase()); link.setAttribute('href', '#toc-' + heading.textContent.replace(/\s+/g, '-').toLowerCase());
link.textContent = heading.textContent; link.textContent = heading.textContent;
@ -45,7 +39,6 @@ function htmlTableOfContents (documentRef) {
var div = documentRef.createElement('div'); var div = documentRef.createElement('div');
div.setAttribute('class', heading.tagName.toLowerCase() + '-toc'); div.setAttribute('class', heading.tagName.toLowerCase() + '-toc');
heading.appendChild(anchor);
div.appendChild(link); div.appendChild(link);
toc.appendChild(div); toc.appendChild(div);
}); });


+ 46
- 0
themes/logs/css/style.css View File

@ -980,3 +980,49 @@ ul.archivegroup {
.archivegroup li.expanded, .archivegroup li.collapsed { .archivegroup li.expanded, .archivegroup li.collapsed {
list-style: none; list-style: none;
} }
summary {
display: list-item;
cursor: pointer;
}
.toc-wrapper {
background: #f9f9f9;
border: 1px solid #aaa;
border-radius: 4px;
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
box-shadow: 0 1px 1px rgba(0,0,0,.05);
margin-bottom: 1.5em;
padding: 10px;
position: relative;
width: auto;
font-size: 90%;
}
.toc-wrapper .inner {
margin-top:5px;
}
.toc-wrapper .inner a {
border: none;
box-shadow:none;
}
.toc .h3-toc {
margin-left: .20in;
}
.toc .h4-toc {
margin-left: .35in;
}
.toc .h5-toc {
margin-left: .50in;
}
.toc .h6-toc {
margin-left: .65in;
}
.toc-link a.anchor {
border:none;
margin-left: 5px;
box-shadow:none;
}

+ 46
- 0
themes/readable/css/style.css View File

@ -1030,4 +1030,50 @@ ul.archivegroup {
.archivegroup li.expanded, .archivegroup li.collapsed { .archivegroup li.expanded, .archivegroup li.collapsed {
list-style: none; list-style: none;
}
summary {
display: list-item;
cursor: pointer;
}
.toc-wrapper {
background: #f9f9f9;
border: 1px solid #aaa;
border-radius: 4px;
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
box-shadow: 0 1px 1px rgba(0,0,0,.05);
margin-bottom: 1.5em;
padding: 10px;
position: relative;
width: auto;
font-size: 90%;
}
.toc-wrapper .inner {
margin-top:5px;
}
.toc-wrapper .inner a {
border: none;
box-shadow:none;
}
.toc .h3-toc {
margin-left: .20in;
}
.toc .h4-toc {
margin-left: .35in;
}
.toc .h5-toc {
margin-left: .50in;
}
.toc .h6-toc {
margin-left: .65in;
}
.toc-link a.anchor {
border:none;
margin-left: 5px;
box-shadow:none;
} }

+ 46
- 0
themes/twentyfifteen/css/style.css View File

@ -6139,4 +6139,50 @@ ul.month {
.feed-link a { .feed-link a {
height:100%; height:100%;
}
summary {
display: list-item;
cursor: pointer;
}
.toc-wrapper {
background: #f9f9f9;
border: 1px solid #aaa;
border-radius: 4px;
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
box-shadow: 0 1px 1px rgba(0,0,0,.05);
margin-bottom: 1.5em;
padding: 10px;
position: relative;
width: auto;
font-size: 90%;
}
.toc-wrapper .inner {
margin-top:5px;
}
.toc-wrapper .inner a {
border: none;
box-shadow:none;
}
.toc .h3-toc {
margin-left: .20in;
}
.toc .h4-toc {
margin-left: .35in;
}
.toc .h5-toc {
margin-left: .50in;
}
.toc .h6-toc {
margin-left: .65in;
}
.toc-link a.anchor {
border:none;
margin-left: 5px;
box-shadow:none;
} }

+ 46
- 0
themes/twentyfifteen/css/style_v2.css View File

@ -6146,4 +6146,50 @@ ul.month {
.feed-link a { .feed-link a {
height:100%; height:100%;
}
summary {
display: list-item;
cursor: pointer;
}
.toc-wrapper {
background: #f9f9f9;
border: 1px solid #aaa;
border-radius: 4px;
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
box-shadow: 0 1px 1px rgba(0,0,0,.05);
margin-bottom: 1.5em;
padding: 10px;
position: relative;
width: auto;
font-size: 90%;
}
.toc-wrapper .inner {
margin-top:5px;
}
.toc-wrapper .inner a {
border: none;
box-shadow:none;
}
.toc .h3-toc {
margin-left: .20in;
}
.toc .h4-toc {
margin-left: .35in;
}
.toc .h5-toc {
margin-left: .50in;
}
.toc .h6-toc {
margin-left: .65in;
}
.toc-link a.anchor {
border:none;
margin-left: 5px;
box-shadow:none;
} }

+ 46
- 0
themes/twentysixteen/css/style.css View File

@ -4065,4 +4065,50 @@ ul.month {
display:inline; display:inline;
margin:0 0 0 10px; margin:0 0 0 10px;
float:right; float:right;
}
summary {
display: list-item;
cursor: pointer;
}
.toc-wrapper {
background: #f9f9f9;
border: 1px solid #aaa;
border-radius: 4px;
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
box-shadow: 0 1px 1px rgba(0,0,0,.05);
margin-bottom: 1.5em;
padding: 10px;
position: relative;
width: auto;
font-size: 90%;
}
.toc-wrapper .inner {
margin-top:5px;
}
.toc-wrapper .inner a {
border: none;
box-shadow:none;
}
.toc .h3-toc {
margin-left: .20in;
}
.toc .h4-toc {
margin-left: .35in;
}
.toc .h5-toc {
margin-left: .50in;
}
.toc .h6-toc {
margin-left: .65in;
}
.toc-link a.anchor {
border:none;
margin-left: 5px;
box-shadow:none;
} }

Loading…
Cancel
Save