>> テーマ変更に伴い見づらい箇所や不具合があるかもしれません、ご迷惑をおかけします。→
PR

ルクセリタスの記事一覧表示をカスタマイズ(タイル型)

ルクセリタス・カスタマイズ
この記事は約8分で読めます。

ルクセリタスの記事一覧「タイル型」のカスタマイズ例です。

 

8566_10

上記デザインは以下をご覧ください。

ルクセリタスの記事一覧タイル型の設定例とプチカスタマイズ
ルクセリタス、記事一覧表示の「タイル型」で、簡単な設定例と少しだけ装飾CSSを追加するプチカスタマイズ方法です。 初期表示例 ↓ カスタマイズ後 カスタマイザーからの設定 グリッドレイアウトの設定 タイル型に設定(列数はお好みで) サムネイ...

 

カード型(インフィード広告対応)のカスタマイズは以下をご覧ください。

ルクセリタスの記事一覧表示をカスタマイズ(カード型・インフィード対応)
バージョンと初期デザインについて 当サイトで使用中のバージョンは以下です。(記事作成時) Luxeritas Child Themeバージョン: 3.0.0 Luxeritasバージョン: 3.5.7 ダウンロードはこちら ルクセリタスに用...

 

バージョンと初期デザインについて

 

当サイトで使用中のバージョンは以下です。(記事作成時)

Luxeritas Child Themeバージョン: 3.0.0
Luxeritasバージョン: 3.5.9

ダウンロードはこちら

ルクセリタスに用意されている「デザイン選択」からのデザイン変更はせずにデフォルトからカスタマイズしています。

 

記事一覧デザイン変更

 BEFORE → AFTER

 

白と薄いグレーなので、パット見あまり変わりませんが、

カードに影を付け、オンマウスでフワッと浮き上がるようにしています。
カテゴリー名も左上に出しています。

 

 

スタイルシート追記

子テーマのスタイルシートにCSSを追記します。

「Luxeritas」→「子テーマの編集」で「スタイルシート」を選択します。(Ver.3.7.9以前は「style.cssタブ」)

Luxelitasスタイルシート編集画面

 

 以下を追記します。

 

結構長いですが、以下のすべてを追記します。
ちなみに、ちょっと見慣れない div[id^=”tile-“] を使用していますが使い方は以下の通りです。

 div[id^=”card-“] の意味は、前方一致です。
前方一致 ⇒ [【A】^=”【B】”]で、【A】が【B】で始まる要素
後方一致 ⇒ [【A】$=”【B】”]で、【A】が【B】で終わる要素
部分一致 ⇒ [【A】*=”【B】”]で、【A】に【B】を含む要素

 

カード型の記事一覧を編集したい場合は div[id^=”card-“]

 

タイル枠、タイトル、日付の設定

コードを表示

/*記事一覧タイトル*/
#list div[id^="tile-"] h2 {
color: #555;
padding-top: 3px;
padding-right: 13px;
padding-bottom: 25px;
padding-left: 13px;
margin: 0px;
font-size: 16px;
}
#list div[id^="tile-"] .entry-title a {
display: block;
}
/*記事一覧の日付*/
#list div[id^="tile-"] .meta, .post .meta {
border-top: 0px;
padding-top: 13px;
padding-right: 13px;
padding-bottom: 0px;
padding-left: 13px;
color: #b5b5b5;
font-weight: bolder;
}
/*記事一覧のカテゴリー*/
#list div[id^="tile-"] span.tags a {
color: #b5b5b5;
font-weight: bold;
text-decoration: none;
}
#list span div[id^="tile-"] .tags a:hover {
color: #dc143c;
}
#list div[id^="tile-"] span.category {
text-align: center;
position: absolute;
top: 13px;
left: 13px;
height: 22px;
border-radius: 14px;
background: #fb8a8a;
font-size: 11px;
padding: 0 10px;
line-height: 22px;
vertical-align: middle;
transition: .3s;
color: #fff;
}
#list div[id^="tile-"] span.category a{
color: #fff;
font-weight: bold;
text-decoration: none;
}
#list div[id^="tile-"] .fa-folder:before {
content: none;
}
#list div[id^="tile-"] span.category:hover {
background-color:silver;
}
/*記事一覧アイキャッチサイズ*/
#list div[id^="tile-"] .term img {
margin-bottom: 0px;
border-radius: 2px 2px 0px 0px;
padding: 0px;
width: 200px;
height: 200px;
}
/*記事を読む*/
/*
.read-more-link,
.read-more-link i {
padding: 5px;
text-decoration: none;
width:80px;
background: #fff;
border: solid 1px #fb8a8a;
color:#fb8a8a;
text-align:center;
}
.read-more a:hover{
background: #fb8a8a;
color:#fff;
}
*/
/*記事一覧ボックス形状*/
div[id^="tile-"]
.toc:not(#bottom-area):not(.posts-list-middle-widget):not(#bottom-area):not(.posts-list-under-widget) {
padding: 0px;
box-shadow: 0 2px 5px rgba(0, 0, 0, .13);
border: none;
transition: .3s;
}
#list div[id^="tile-"] .toc:not(#bottom-area):not(.posts-list-middle-widget):not(#bottom-area):not(.posts-list-under-widget):hover {
box-shadow: 0 4px 20px rgba(0,0,0,0.25);
transform: translateY(-5px);
}
/*記事一覧の日付余白*/
#list div[id^=tile-] .meta {
margin-bottom: 5px;
}

 

スマホ用設定

コードを表示
/* 一覧スマホ用 */
@media only screen and (max-width:575px){
#list div[id^="tile-"] .term img {
max-width: 575px;
width: 100%;
width: 150px;
height: 150px;
object-fit: cover;
margin: 0;
padding: 15px 0 15px 10px
}
#list div[id^=tile-] section {
display: table;
}
#list div[id^=tile-] figure.term {
display: table-cell;
vertical-align: top;
}
#list div[id^=tile-] h2 {
font-size: 14px;
display: table-cell;
vertical-align: middle;
padding-left: 2%;
}
#list div[id^=tile-] span.category {
top: 15px;
left: 10px;
height: 16px;
border-radius: 0px;
font-size: 10px;
padding: 0 5px;
line-height: 16px;
}
#list div[id^=tile-] .meta {
margin: 0;
padding: 0;
font-size: 14px;
}
#list div[id^=tile-] .toc {
margin: 0 0 15px;
}
#list div[id^=tile-] span.date {
position: absolute;
bottom: 3px;
right: 8px;
}
#list div[id^=tile-] .meta i:first-child {
position: absolute;
bottom: 6px;
right: 86px;
}
#list div[id^=tile-] i.fa.fa-tags, #list span.tags, #list i.fa.fa-folder {
display: none;
}}

 

色や、配置などはお好みで編集してご利用下さい。

マカロンビビッドパステル伝統色和色セーフ色名 配色パターンサンプル

コメント

タイトルとURLをコピーしました