diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-05 17:18:38 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-05 17:18:38 +0200 |
commit | 31ed013133ee5c48abec0e58f2f9dbefbf32f865 (patch) | |
tree | 3f8ae4c6c44ece6dade575ecb63d142bb2c6889c | |
parent | bump jekyll-theme (diff) | |
download | blog-31ed013133ee5c48abec0e58f2f9dbefbf32f865.tar.gz blog-31ed013133ee5c48abec0e58f2f9dbefbf32f865.zip |
sidebar: redesign "Notes" section
-rw-r--r-- | _config.yml | 2 | ||||
-rw-r--r-- | _includes/custom-sidebar.html | 2 | ||||
-rw-r--r-- | _includes/notes.html | 22 |
3 files changed, 15 insertions, 11 deletions
diff --git a/_config.yml b/_config.yml index ab2b58e..c3edccf 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@0bf6261d15918eed39b077b0ec83f3325c530bff +remote_theme: egor-tensin/jekyll-theme@526819702fe16d4d6e6fa62c9557217cae491d4f # Theme settings settings: diff --git a/_includes/custom-sidebar.html b/_includes/custom-sidebar.html index 3bd83aa..f03f2cb 100644 --- a/_includes/custom-sidebar.html +++ b/_includes/custom-sidebar.html @@ -3,6 +3,6 @@ {% capture notes %} {% include notes.html sidebar=true %} {% endcapture %} -{% include jekyll-theme/sidebar/entry.html header='Notes' content=notes %} +{% include jekyll-theme/sidebar/entry.html content=notes %} {% endif %} diff --git a/_includes/notes.html b/_includes/notes.html index ad7e58d..1657f7a 100644 --- a/_includes/notes.html +++ b/_includes/notes.html @@ -3,17 +3,21 @@ {% endcomment %} {% assign note_list = site.notes | sort_natural: 'title' %} <div class="list-group wide-enough"> + {% assign h = 'h4' %} + {% if include.sidebar %} + {% assign h = 'h5' %} + {% endif %} + {% if include.sidebar %} + <div class="list-group-item disabled"> + <h4 class="list-group-item-heading">notes</h4> + </div> + {% endif %} {% 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 %} - <h4 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> - </h4> - {% endif %} + <{{ h }} 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> + </{{ h }}> </a> {% endfor %} </div> |