diff options
Diffstat (limited to '')
-rw-r--r-- | _config.yml | 2 | ||||
-rw-r--r-- | _includes/custom-sidebar.html | 8 | ||||
-rw-r--r-- | _includes/notes.html | 19 | ||||
-rw-r--r-- | all/index.html | 5 | ||||
-rw-r--r-- | index.html | 5 | ||||
-rw-r--r-- | notes/index.html | 12 |
6 files changed, 38 insertions, 13 deletions
diff --git a/_config.yml b/_config.yml index 47ed813..f8a9e84 100644 --- a/_config.yml +++ b/_config.yml @@ -53,7 +53,7 @@ repository: egor-tensin/blog # jekyll-paginate paginate: 10 # jekyll-remote-theme -remote_theme: egor-tensin/jekyll-theme@7a358a1407e8b32cd36ebd85295099340557151f +remote_theme: egor-tensin/jekyll-theme@5e25c497c37c39d399d0851f316aa5783d536347 # Theme settings settings: diff --git a/_includes/custom-sidebar.html b/_includes/custom-sidebar.html new file mode 100644 index 0000000..3bd83aa --- /dev/null +++ b/_includes/custom-sidebar.html @@ -0,0 +1,8 @@ +{% if page.sidebar.notes.show %} + +{% capture notes %} +{% include notes.html sidebar=true %} +{% endcapture %} +{% include jekyll-theme/sidebar/entry.html header='Notes' content=notes %} + +{% endif %} diff --git a/_includes/notes.html b/_includes/notes.html new file mode 100644 index 0000000..25c8049 --- /dev/null +++ b/_includes/notes.html @@ -0,0 +1,19 @@ +{% comment %} + Sorting can be done in _config.yml with Jekyll 4.0 or later. +{% endcomment %} +{% assign note_list = site.notes | sort_natural: 'title' %} +<div class="list-group wide-enough"> + {% for note in note_list %} + <a href="{{ note.url | relative_url }}" class="list-group-item"> + {% if include.sidebar %} + <span class="badge">{{ note.subtitle }}</span> + <span class="glyphicon glyphicon-file"></span> {{ note.title }} + {% else %} + <h5 class="list-group-item-heading" style="display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-grap: .5em;"> + <span>{{ note.title }}</span> + <small>{{ note.subtitle }}</small> + </h5> + {% endif %} + </a> + {% endfor %} +</div> diff --git a/all/index.html b/all/index.html index b3aa9de..3a0a88d 100644 --- a/all/index.html +++ b/all/index.html @@ -4,5 +4,10 @@ layout: default navbar: link: Archive priority: 2 +sidebar: + latest_posts: + hide: true + notes: + show: true --- {% include jekyll-theme/categories/all.html %} @@ -6,6 +6,9 @@ navbar: priority: 1 paginated: true sidebar: - hide: true + latest_posts: + hide: true + notes: + show: true --- {% include jekyll-theme/posts/feed.html %} diff --git a/notes/index.html b/notes/index.html index da03827..1351be1 100644 --- a/notes/index.html +++ b/notes/index.html @@ -5,18 +5,8 @@ navbar: priority: 3 --- {% if site.notes.size > 0 %} - {% comment %} - Sorting can be done in _config.yml with Jekyll 4.0 or later. - {% endcomment %} - {% assign note_list = site.notes | sort_natural: 'title' %} <p>Style guides and best practices, not worthy of a post.</p> - <div class="list-group wide-enough"> - {% for note in note_list %} - <a href="{{ note.url | relative_url }}" class="list-group-item"> - <h4 class="list-group-item-heading">{{ note.title }} <small>{{ note.subtitle }}</small></h4> - </a> - {% endfor %} - </div> + {% include notes.html %} {% else %} <p>Sorry, no notes have been added yet.</p> {% endif %} |