From 0cbb5a29d6d837b405ada1b3886c27ad1c48bf4b Mon Sep 17 00:00:00 2001 From: Tao He Date: Sun, 27 Mar 2022 22:33:00 +0800 Subject: [PATCH] Implements the "keep the header" features requested in #18. Resolves #18. Signed-off-by: Tao He --- _includes/body.html | 41 +++++--------- _includes/head.html | 2 + _layouts/home.html | 28 +++++++--- _layouts/post.html | 48 ++++++++++------ gitbook/custom.css | 55 +++++++++++++++++++ .../plugin.js | 2 +- 6 files changed, 124 insertions(+), 52 deletions(-) create mode 100644 gitbook/custom.css diff --git a/_includes/body.html b/_includes/body.html index c48c171a65..5c7a558b9d 100644 --- a/_includes/body.html +++ b/_includes/body.html @@ -1,33 +1,20 @@ -
- -
-
-
-
-
- - {% if page.title %} -

{{ page.title | escape }}

- {% else %} -

{{ site.title | escape }}

- {% endif %} +
+
+
+
+
- {{ content }} -
-
+ {% if page.title %} +

{{ page.title | escape }}

+ {% else %} +

{{ site.title | escape }}

+ {% endif %} - {%- include search.html -%} + {{ content }} +
+ + {%- include search.html -%}
diff --git a/_includes/head.html b/_includes/head.html index 4fb736cba8..fb1a812c13 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -27,6 +27,8 @@ + + diff --git a/_layouts/home.html b/_layouts/home.html index 6e8e87ed8c..8906a593a4 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -16,13 +16,27 @@ {%- include toc-date.html -%}
- {%- include body.html -%} - - {% if reversed_posts %} - - - - {% endif %} + + +
+ {%- include body.html -%} + + {% if reversed_posts %} + + + + {% endif %} +