Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/build-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:

jobs:
build-preview:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
# for debugging
Expand Down
1 change: 1 addition & 0 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ site.url }}{{ site.baseurl }}/">Home</a></li>
<li><a href="{{ site.url }}{{ site.baseurl }}/allnews.html">News</a></li>
<li><a href="{{ site.url }}{{ site.baseurl }}/team">Team</a></li>
<li><a href="{{ site.url }}{{ site.baseurl }}/publications">Publications</a></li>
<!-- <li><a href="{{ site.url }}{{ site.baseurl }}/presentations">Presentations</a></li> -->
Expand Down
6 changes: 3 additions & 3 deletions _includes/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ <h4>News</h4>

<div class="news-items">
{% for article in site.data.news limit:4 %}
<div class="news-item">{{ article.date }}: {{ article.headline | markdownify}}</div>
<div class="news-item"><b>{{ article.date }}</b>: {{ article.headline | markdownify }}</div>
{% endfor %}
</div>

<h4 class="news-more"><a href="{{ site.url }}{{ site.baseurl }}/allnews.html">... see all News</a></h4>
<p class="news-more"><a href="{{ site.url }}{{ site.baseurl }}/allnews.html">... see all News</a></p>

</div>
</div>
15 changes: 2 additions & 13 deletions _layouts/homelay.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,6 @@

{{ content }}
</div>
<div id="newsid">
<div id="newsid" class="col-sm-12">
{% include news.html %}
</div>

<script>
function adjustNewsBarSpacing() {
var newsBar = document.getElementById('newsid');
if (newsBar) {
document.body.style.paddingBottom = newsBar.offsetHeight + 'px';
}
}
window.addEventListener('load', adjustNewsBarSpacing);
window.addEventListener('resize', adjustNewsBarSpacing);
</script>
</div>
2 changes: 1 addition & 1 deletion _pages/allnews.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ permalink: /allnews.html
# News

{% for article in site.data.news %}
<p> <b>{{ article.date }}</b> <br> {{ article.headline}} </p>
<p> <b>{{ article.date }}</b> <br> {{ article.headline | markdownify | remove: '<p>' | remove: '</p>' }} </p>
{% endfor %}
40 changes: 6 additions & 34 deletions css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,57 +76,29 @@ pubtit {
text-align: center;
}

// Homeページ: フッター直前に配置する通常のNewsセクション
#newsid {
position: fixed;
left: 0;
right: 0;
bottom: 0;
width: 100%;
z-index: 1030; // navbar-fixed-topと同等
}

#newsid .well {
margin-bottom: 0;
border-radius: 0;
display: flex;
align-items: center;
gap: 16px;
padding: 10px 20px;
margin-top: 20px;
}

#newsid h4 {
margin: 0;
flex-shrink: 0; // 左端「News」ラベルは常に全表示、縮まない
white-space: nowrap;
}

#newsid .news-items {
display: flex;
flex-direction: column; // 記事を縦に積む → 横スクロールが発生しない
gap: 4px;
flex: 1 1 auto;
min-width: 0; // これがないとflex子要素はoverflowしてくれない
max-height: 4.8em; // 約3行分の高さで頭打ちにする
overflow-y: auto; // 収まらない分は縦スクロールのみ
overflow-x: hidden;
padding: 4px 0;
margin-top: 0;
}

#newsid .news-item {
text-align: left;
white-space: normal; // 幅に収まらない項目は折り返す(横スクロールさせない)
margin-bottom: 8px;
word-break: break-word;
}

#newsid .news-item p {
display: inline; // markdownifyが挿入するpタグの余白をなくし1行に収める
display: inline; // markdownifyが挿入するpタグを日付と同じ行に表示
margin: 0;
}

#newsid .news-more {
flex-shrink: 0; // 右端「see all News」リンクも常に全表示
text-align: right;
margin: 0;
white-space: nowrap;
}

#newsid img {
Expand Down
Loading