From 94193538e3f10063bb31590108ea497d1a28084b Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Tue, 21 Apr 2020 10:44:00 +0800 Subject: Add TOC in post pages --- assets/sass/_sidebar.scss | 1 + i18n/en.toml | 3 +++ i18n/ja.toml | 3 +++ i18n/zh-hans.toml | 3 +++ i18n/zh-hant.toml | 3 +++ layouts/partials/sidebar.html | 6 ++++++ 6 files changed, 19 insertions(+) diff --git a/assets/sass/_sidebar.scss b/assets/sass/_sidebar.scss index 640494d..9010af5 100644 --- a/assets/sass/_sidebar.scss +++ b/assets/sass/_sidebar.scss @@ -17,6 +17,7 @@ @include link-secondary(); + #widget-toc, #widget-pages, #widget-tags, #widget-links { diff --git a/i18n/en.toml b/i18n/en.toml index bf453c8..02853ac 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -1,3 +1,6 @@ +[sidebarToc] + other = "TOC" + [sidebarPages] other = "Pages" diff --git a/i18n/ja.toml b/i18n/ja.toml index bb56474..eb283e6 100644 --- a/i18n/ja.toml +++ b/i18n/ja.toml @@ -1,3 +1,6 @@ +[sidebarToc] + other = "目次" + [sidebarPages] other = "ページ" diff --git a/i18n/zh-hans.toml b/i18n/zh-hans.toml index b38a405..56783e4 100644 --- a/i18n/zh-hans.toml +++ b/i18n/zh-hans.toml @@ -1,3 +1,6 @@ +[sidebarToc] + other = "目录" + [sidebarPages] other = "页面" diff --git a/i18n/zh-hant.toml b/i18n/zh-hant.toml index a1a9681..1f2ba0a 100644 --- a/i18n/zh-hant.toml +++ b/i18n/zh-hant.toml @@ -1,3 +1,6 @@ +[sidebarToc] + other = "目錄" + [sidebarPages] other = "頁面" diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 8b84596..0c3770d 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -1,3 +1,9 @@ +{{ if in .Site.Params.mainSections .Type }} +