mirror of
https://github.com/flysnow-org/maupassant-hugo.git
synced 2026-08-24 07:18:55 +00:00
fix toc width
This commit is contained in:
@@ -46,6 +46,10 @@ git clone https://github.com/flysnow-org/maupassant-hugo themes/maupassant
|
||||
|
||||
## 配置
|
||||
|
||||
#### 依赖要求
|
||||
|
||||
Hugo Version >= v 0.60.0
|
||||
|
||||
#### 应用主题
|
||||
|
||||
```toml
|
||||
|
||||
@@ -12,6 +12,10 @@ A simple Hugo template with great performance on different devices, ported from
|
||||
|
||||
## Features
|
||||
|
||||
#### Requirements
|
||||
|
||||
Hugo Version >= v 0.60.0
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.post-toc {
|
||||
position: fixed;
|
||||
width: 200px;
|
||||
margin-left: -220px;
|
||||
margin-left: -210px;
|
||||
padding: 5px 10px;
|
||||
font-family: Athelas, STHeiti, Microsoft Yahei, serif;
|
||||
font-size: 12px;
|
||||
@@ -25,10 +25,12 @@
|
||||
}
|
||||
|
||||
.post-toc .post-toc-title {
|
||||
margin: 0 10px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.post-toc .post-toc-content {
|
||||
@@ -68,6 +70,11 @@
|
||||
$(document).ready(function () {
|
||||
var postToc = $(".post-toc");
|
||||
if (postToc.length) {
|
||||
var leftPos = $("#main").offset().left;
|
||||
if(leftPos<220){
|
||||
postToc.css({"width":leftPos-10,"margin-left":(0-leftPos)})
|
||||
}
|
||||
|
||||
var t = postToc.offset().top - 20,
|
||||
a = {
|
||||
start: {
|
||||
|
||||
Reference in New Issue
Block a user