-
Notifications
You must be signed in to change notification settings - Fork 0
prev/nextナビゲーションのスタイルを改善 #249
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
Conversation
Co-authored-by: kyu08 <[email protected]>
プレビュー環境プレビュー環境が更新されました。 URL: https://blog.kyu08.com/pr-249/ Commit: ※ デプロイ完了まで数分かかる場合があります。 |
OGP画像に差分はありませんOGP画像は最新の状態です。 |
|
@copilot 中央揃えにして。 |
Co-authored-by: kyu08 <[email protected]>
|
@copilot よさそう。 |
Co-authored-by: kyu08 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
このPRは、記事詳細ページ下部のprev/nextナビゲーションのスタイルを改善し、スマホでのレイアウト崩れを修正するものです。全デバイスで統一された縦並び中央揃えのレイアウトを適用し、長いタイトルは3行まで表示して省略する仕様に変更しました。
- テーマのテンプレートをオーバーライドして
::セパレーターを削除 - CSS追加により、縦並び中央揃えレイアウトと3行省略表示を実装
- PC/スマホで同じスタイルを適用し、統一感のあるUIを実現
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| layouts/partials/posts_pagination.html | テーマのテンプレートをオーバーライドし、prev/nextリンク間の::セパレーターを削除 |
| static/style.css | ページネーションボタン用のスタイルを追加(縦並び中央揃え、3行省略表示) |
| } | ||
|
|
||
| /* posts_pagination用のスタイル(全デバイス) */ | ||
| .pagination__buttons { |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.pagination__buttonsにflex-direction: columnを指定していますが、この要素にdisplay: flexが定義されていません。flex-directionを機能させるには、display: flexを追加する必要があります。
| .pagination__buttons { | |
| .pagination__buttons { | |
| display: flex; |
| display: -webkit-box; | ||
| -webkit-line-clamp: 3; | ||
| -webkit-box-orient: vertical; |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-webkit-box、-webkit-line-clamp、-webkit-box-orientはベンダープレフィックス付きのプロパティで、WebKitブラウザ専用です。Firefoxなどの他のブラウザでは動作しない可能性があります。クロスブラウザ対応を考慮すると、フォールバックやポリフィルの検討が必要です。ただし、line-clampは現在多くのモダンブラウザでサポートされていますが、標準化されたプロパティ名はline-clamp(プレフィックスなし)です。
| display: -webkit-box; | |
| -webkit-line-clamp: 3; | |
| -webkit-box-orient: vertical; | |
| display: -webkit-box; | |
| display: box; | |
| /* display: flex; // flexはline-clampと併用不可なのでコメントアウト */ | |
| -webkit-line-clamp: 3; | |
| line-clamp: 3; | |
| -webkit-box-orient: vertical; | |
| box-orient: vertical; |
概要
記事詳細ページ下部のprev/nextナビゲーションのスタイルを改善。全デバイス(PC/スマホ)で統一されたレイアウトを適用し、
::セパレーターを削除してシンプルに。変更内容
1.
layouts/partials/posts_pagination.htmlを新規作成::セパレーターを削除2.
static/style.cssにスタイルを追加(全デバイス対応)flex-direction: column+align-items: centerで縦並び・中央揃えに変更-webkit-line-clamp: 3で3行まで表示、以降は...で省略gap: 12px,line-height: 1.5で可読性向上Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.