File tree 3 files changed +7
-9
lines changed
3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ collections:
175
175
output : true
176
176
permalink : /projects/:path/
177
177
178
- news :
178
+ announcements :
179
179
enabled : true
180
180
scrollable : true # adds a vertical scroll bar if there are more than 3 news items
181
181
limit : 5 # leave blank to include all the news in the `_news` folder
Original file line number Diff line number Diff line change 1
-
2
1
< div class ="news ">
3
2
{% if site.news != blank -%}
4
3
{%- assign news_size = site.news | size -%}
5
- < div class ="table-responsive " {% if site.news.scrollable and news_size > 3 %}style="max-height: 60vw"{% endif %}>
6
- < script > console . log ( { { news_size} } ) ; </ script >
4
+ < div class ="table-responsive " {% if include.limit and site.announcements.scrollable and news_size > 3 %}style="max-height: 60vw"{% endif %}>
7
5
< table class ="table table-sm table-borderless ">
8
6
{%- assign news = site.news | reverse -%}
9
- {% if site.news .limit %}
10
- {% assign news_limit = site.news .limit %}
7
+ {% if include.limit and site.announcements .limit %}
8
+ {% assign news_limit = site.announcements .limit %}
11
9
{% else %}
12
10
{% assign news_limit = news_size %}
13
11
{% endif %}
28
26
{%- else -%}
29
27
< p > No news so far...</ p >
30
28
{%- endif %}
31
- </ div >
29
+ </ div >
Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ <h1 class="post-title">
41
41
</ div >
42
42
43
43
<!-- News -->
44
- {% if page.news -%}
44
+ {% if page.news and site.announcements.enabled -%}
45
45
< h2 > < a href ="{{ '/news/' | relative_url }} " style ="color: inherit; "> news</ a > </ h2 >
46
- {%- include news.html %}
46
+ {%- include news.html limit=true %}
47
47
{%- endif %}
48
48
49
49
<!-- Latest posts -->
You can’t perform that action at this time.
0 commit comments