Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display last news in the homepage #110

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion _includes/navheader.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,30 @@
{%- if site.data.sitetext[page.lang].header.text -%}
<div class="intro-heading text-uppercase">{{ site.data.sitetext[page.lang].header.text | markdownify }}</div>
{%- endif -%}

<div style="font-size: 20px;margin-bottom: 20px; display: flex;">
<div style="margin-left: auto;margin-right: auto;border-left: 2px solid white;border-right: 2px solid white;padding-left: 10px;padding-right: 10px;">
<i class="fas fa-bullhorn"></i>
{% if page.lang == "fr" %}
{% assign frPosts = site.posts | where: 'lang', 'fr' %}
{% for post in frPosts limit:1 %}
<span><i>{{ post.date | date: "Dernière news le %-d %B %Y" }} :</i></span>
<br>
<a href="{{ post.url }}" style="color: white;"><i class="fas fa-sign-in-alt"></i> {{ post.title }}</a>
{% endfor %}
{% endif %}

{% if page.lang == "en" %}
{% assign enPosts = site.posts | where: 'lang', 'en' %}
{% for post in enPosts limit:1 %}
<span><i>{{ post.date | date: "The last news on %-d %B %Y" }}:</i></span>
<br>
<a href="{{ post.url }}" style="color: white;"><i class="fas fa-sign-in-alt"></i> {{ post.title }}</a>
{% endfor %}
{% endif %}
</div>
</div>

{%- if site.data.sitetext[page.lang].header.button -%}
<a class="btn-header btn btn-primary btn-xl text-uppercase js-scroll-trigger" href="{{ site.data.sitetext[page.lang].header.buttonlink }}">{{ site.data.sitetext[page.lang].header.button }}</a>
{%- endif -%}
Expand All @@ -77,4 +101,4 @@
</header>
{% endif %}

<!-- End Header -->
<!-- End Header -->
2 changes: 1 addition & 1 deletion _sass/layout/_masthead.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ header.masthead {
font-size: 42px;
font-weight: 700;
line-height: 75px;
margin-bottom: 50px;
margin-bottom: 20px;
@include heading-font;
}
}
Expand Down
Loading