From 8eeac84c2408ce4f7c51bfdf6975d31fa434e03a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 5 Apr 2022 13:06:50 +0200 Subject: _layouts: add nosidebar layout --- README.md | 1 + _includes/jekyll-theme/page/title.html | 2 ++ _layouts/nosidebar.html | 5 +++++ _layouts/page.html | 3 +-- index.md | 7 +------ 5 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 _includes/jekyll-theme/page/title.html create mode 100644 _layouts/nosidebar.html diff --git a/README.md b/README.md index 1d40014..94ea4ba 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ Features * `plain`: navbar at the top + footer at the bottom. * `default`: same as plain, but with a sidebar on the right. * `page`: same as default, but with the page's header. +* `nosidebar`: same as page, but without the sidebar. * `post`: same as default, but with the post's header and publication date. ### Navbar diff --git a/_includes/jekyll-theme/page/title.html b/_includes/jekyll-theme/page/title.html new file mode 100644 index 0000000..efbbb97 --- /dev/null +++ b/_includes/jekyll-theme/page/title.html @@ -0,0 +1,2 @@ +

{{ page.title }}{% if page.subtitle %} {{ page.subtitle }}{% endif %}

+
diff --git a/_layouts/nosidebar.html b/_layouts/nosidebar.html new file mode 100644 index 0000000..2e88f63 --- /dev/null +++ b/_layouts/nosidebar.html @@ -0,0 +1,5 @@ +--- +layout: plain +--- +{% include jekyll-theme/page/title.html %} +{{ content }} diff --git a/_layouts/page.html b/_layouts/page.html index 48cffb2..6455acc 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -1,6 +1,5 @@ --- layout: default --- -

{{ page.title }}{% if page.subtitle %} {{ page.subtitle }}{% endif %}

-
+{% include jekyll-theme/page/title.html %} {{ content }} diff --git a/index.md b/index.md index a0c46bc..e477a3a 100644 --- a/index.md +++ b/index.md @@ -1,16 +1,11 @@ --- base: https://egor-tensin.github.io title: jekyll-theme -layout: plain +layout: nosidebar navbar: link: Home priority: 1 --- -{{ page.title }} -================ - ---- -
-- cgit v1.2.3