Skip to content

Commit

Permalink
Collapse layout for sidebar archive.html
Browse files Browse the repository at this point in the history
Update the variables in sidebar recent_posts.html
  • Loading branch information
kappa-wingman committed May 27, 2020
1 parent 2c14652 commit 8b74190
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ Pelican-bootstrap3-nero is forked from pelican-bootstrap3 and customized. It is

## Usage

All the parameters used by pelican-bootstrap3 are still usable.
* Most of the parameters used by pelican-bootstrap3 are still usable.
This theme changed a lot from the original theme.
Some of the parameters may not work.

We have new settings specific to this theme, also check CHANGELOG.rst
* Know problems
* DISABLE_SIDEBAR_TITLE_ICONS may not be working

* We have new settings specific to this theme, also check CHANGELOG.rst

* Setup Cookie Consent 2
* COOKIE_CONSENT2 = True
Expand Down
30 changes: 17 additions & 13 deletions templates/includes/sidebar/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,28 @@
{% from 'includes/sidebar/macros.jinja' import title %}

<!-- Sidebar/Archive -->
<section class="well">
<!--<li class="list-group-item">-->
<h4>{{ title(_('Archive'), DISABLE_SIDEBAR_TITLE_ICONS) }}</h4>
<ul class="list-group" id="archive">
<div class="well accordion" id="sb_accordion_Archive">
<div class="card">
<div class="card-header" id="sb_Archive_Heading">
<h2 class="mb-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapse_sb_Archive" aria-expanded="true" aria-controls="collapse_sb_Archive">
<i class="fa fa-chevron-up pull-left"></i>Archives
</button>
</h2>
</div>

<div id="collapse_sb_Archive" class="collapse multi-collapse" aria-labelledby="sb_Archive_Heading" data-parent="#sb_accordion_Archive">
{% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %}
{% for month, articles in date_year|groupby( 'date.month' )|sort(reverse=True) %}
<li class="list-group-item">
<p style="text-align: left">
<a href="{{ SITEURL }}/{{ MONTH_ARCHIVE_SAVE_AS.format(date=articles[0].date) }}">
{%- if not DISABLE_SIDEBAR_TITLE_ICONS -%}
<i class="fa fa-calendar fa-lg"></i>
{%- endif -%}
{{ articles[0].date.strftime('%B') }} {{ year }} ({{ articles|count }})
* {{ year }} {{ articles[0].date.strftime('%B') }} ({{ articles|count }})
</a>
</li>
</p>
{% endfor %}
{% endfor %}
</ul>
<!--</li>-->
</section>
</div>
</div>
</div>
<!-- End Sidebar/Archive -->
{% endif %}
8 changes: 4 additions & 4 deletions templates/includes/sidebar/recent_posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
{% set RECENT_POST_COUNT = 5 %}
{% endif %}

<div class="well well-sm accordion" id="sb_accordion_Recent_Posts">
<div class="well well-sm accordion" id="sb_accordion_RecentPosts">
<div class="card">
<div class="card-header" id="sb_Recent_Posts_Heading">
<div class="card-header" id="sb_RecentPosts_Heading">
<h2 class="mb-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapse_sb_RecentPosts" aria-expanded="true" aria-controls="collapse_sb_RecentPosts">
<i class="fa fa-chevron-up pull-left"></i>Recent Posts
</button>
</h2>
</div>

<div id="collapseOne" class="collapse multi-collapse" aria-labelledby="sb_Recent_Posts_Heading" data-parent="#sb_accordion_Recent_Posts">
<div id="collapse_sb_RecentPosts" class="collapse multi-collapse" aria-labelledby="sb_RecentPosts_Heading" data-parent="#sb_accordion_RecentPosts">
<!-- <div class="card card-body"> -->
<!-- <div class="well"> -->
{% for article in articles[:RECENT_POST_COUNT] %}
Expand Down

0 comments on commit 8b74190

Please sign in to comment.