diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-05 13:06:50 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-05 13:08:53 +0200 |
commit | 8eeac84c2408ce4f7c51bfdf6975d31fa434e03a (patch) | |
tree | a0019835d25c13d7b59ffadf665675889c74a4db | |
parent | sidebar: allow adding custom content (diff) | |
download | jekyll-theme-8eeac84c2408ce4f7c51bfdf6975d31fa434e03a.tar.gz jekyll-theme-8eeac84c2408ce4f7c51bfdf6975d31fa434e03a.zip |
_layouts: add nosidebar layout
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | _includes/jekyll-theme/page/title.html | 2 | ||||
-rw-r--r-- | _layouts/nosidebar.html | 5 | ||||
-rw-r--r-- | _layouts/page.html | 3 | ||||
-rw-r--r-- | index.md | 7 |
5 files changed, 10 insertions, 8 deletions
@@ -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 @@ +<h1>{{ page.title }}{% if page.subtitle %} <small>{{ page.subtitle }}</small>{% endif %}</h1> +<hr/> 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 --- -<h1>{{ page.title }}{% if page.subtitle %} <small>{{ page.subtitle }}</small>{% endif %}</h1> -<hr/> +{% include jekyll-theme/page/title.html %} {{ content }} @@ -1,16 +1,11 @@ --- base: https://egor-tensin.github.io title: jekyll-theme -layout: plain +layout: nosidebar navbar: link: Home priority: 1 --- -{{ page.title }} -================ - ---- - <div style="display: flex; flex-wrap: wrap; column-gap: 1em;"> <div class="list-group wide-enough"> |