Skip to content

Commit

Permalink
Merge pull request #2 from moyihust/master
Browse files Browse the repository at this point in the history
将openharmony俱乐部的commit掉并将footer大小缩小
  • Loading branch information
moyigeek authored Mar 25, 2024
2 parents 1023433 + 52a1e94 commit b4de2c6
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 43 deletions.
36 changes: 22 additions & 14 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,30 @@
<li>
<a href="https://github.com/{{ site.repository }}"><i class="fab fa-fw fa-github"></i> 本站仓库</a>
</li>
</ul>
</ul>
</div>
</div>
</div>
<style>
.footer-row {
display: flex;
flex-direction: row;
justify-content: space-between;
}

p{
margin: 0;
}

.footer-block {
flex: 1;
}
.footer-row {
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 10px 0;
/* Add this line to reduce the vertical size of the footer */
}
ul {
margin-top: 0;
margin-bottom: 0;
padding-left: 20px;
}
p {
margin: 0;
font-size: 0.8em;
/* Add this line to reduce the font size of the paragraph text */
}

.footer-block {
flex: 1;
}
</style>
27 changes: 13 additions & 14 deletions _layouts/news-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@
---

{% assign news_posts = site.news | sort: 'date' | reverse %}

<h1>{{ page.title }}</h1>
<div class="row">
{% for post in news_posts %}
<div class="col-lg-4 col-md-6 col-sm-12">
<div class="card">
{% if post.image %}
<img src="{{ post.image }}" class="card-img-top" alt="{{ post.title }}">
{% endif %}
<div class="card-body">
<h5 class="card-title">{{ post.title }}</h5>
<p class="card-text">{{ post.excerpt }}</p>
<a href="{{ post.url }}" class="btn btn-primary">Read More</a>
{% for post in news_posts %}
<div class="col-lg-4 col-md-6 col-sm-12">
<div class="card">
{% if post.image %}
<img src="{{ post.image }}" class="card-img-top" alt="{{ post.title }}">
{% endif %}
<div class="card-body">
<h5 class="card-title"><a href="{{ post.url }}">{{ post.title }}</a></h5>
<p class="card-text">{{ post.excerpt }}</p>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
4 changes: 3 additions & 1 deletion _sass/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ body.layout--home {
font-size: 1.33em;
}
}

.site-footer {
padding: 20px 0; // change this to your desired size
}
8 changes: 0 additions & 8 deletions pages/_news/基于TEE的内核加固方案.md

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion pages/_pages/news-index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "新闻"
permalink: /news/
layout: home
layout: news-list
pagination:
enabled: true
collection: news
Expand Down

0 comments on commit b4de2c6

Please sign in to comment.