Skip to content

Commit c188209

Browse files
committed
1.0.6
1 parent be79675 commit c188209

File tree

6 files changed

+76
-44
lines changed

6 files changed

+76
-44
lines changed

Diff for: comments.php

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<div id="comments" class="comments">
2+
<?php
3+
$commentcount = get_comments([
4+
"status" => "approve",
5+
"post_id" => get_the_ID(),
6+
"count" => true,
7+
]);
8+
if (have_comments()): ?>
9+
<h3>コメント(<?php echo $commentcount; ?>件)</h3>
10+
<ol class="commentlist">
11+
<?php wp_list_comments("avatar_size=40"); ?>
12+
</ol>
13+
<?php endif;
14+
?>
15+
<?php
16+
$args = [
17+
"title_reply" => "コメントを書く",
18+
"label_submit" => "送信",
19+
];
20+
comment_form($args);
21+
?>
22+
</div>

Diff for: inc/customizer.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,6 @@ function or_customize($wp_customize)
5050
)
5151
);
5252

53-
$wp_customize->add_setting("or_main_design_datetime");
54-
$wp_customize->add_control(
55-
new WP_Customize_Control($wp_customize, "or_main_design_datetime", [
56-
"label" => "日付フォーマット",
57-
"description" => "日付のフォーマット<br>例:Y年n月j日",
58-
"section" => "or_main_design",
59-
])
60-
);
61-
6253
$wp_customize->add_setting("or_main_design_primary", [
6354
"default" => "#252525",
6455
]);
@@ -158,6 +149,15 @@ function or_customize($wp_customize)
158149
])
159150
);
160151

152+
$wp_customize->add_setting("or_list_design_category");
153+
$wp_customize->add_control(
154+
new WP_Customize_Control($wp_customize, "or_list_design_category", [
155+
"label" => "カテゴリーを表示しない",
156+
"section" => "or_list_design",
157+
"type" => "checkbox",
158+
])
159+
);
160+
161161
$wp_customize->add_section("or_page_design", [
162162
"title" => "固定ページ",
163163
"panel" => "or_design",

Diff for: index.php

+9-15
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,21 @@
1414
<div class="details">
1515
<h3><?php the_title(); ?></h3>
1616
<time><i class="ori-time"></i>
17-
<?php if (get_theme_mod("or_main_design_datetime")):
18-
the_time(
19-
get_theme_mod("or_main_design_datetime")
20-
);
21-
else:
22-
the_time("Y年n月j日");
23-
endif; ?></time>
17+
<?php the_time(get_option("date_format")); ?></time>
2418
<p><?php if (
2519
get_theme_mod("or_main_design_excerpt_num") !== "0"
2620
):
2721
echo get_the_excerpt();
2822
endif; ?></p>
2923
<div class="category">
30-
<?php
31-
$category = get_the_category();
32-
if ($category[0]->name !== ""):
33-
echo '<div><i class="ori-category"></i>' .
34-
$category[0]->name .
35-
"</div>";
36-
endif;
37-
?>
24+
<?php if (!get_theme_mod("or_list_design_category")):
25+
$category = get_the_category();
26+
if (!is_null($category[0]->name)):
27+
echo '<div><i class="ori-category"></i>' .
28+
$category[0]->name .
29+
"</div>";
30+
endif;
31+
endif; ?>
3832
</div>
3933
</div>
4034
</div>

Diff for: page.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
<article>
66
<h2 class="title"><?php the_title(); ?></h2>
77
<time class="date"><i class="ori-time"></i>
8-
<?php if (get_theme_mod("or_main_design_datetime")):
9-
the_time(get_theme_mod("or_main_design_datetime"));
10-
else:
11-
the_time("Y年n月j日");
12-
endif; ?>
8+
<?php the_time(get_option("date_format")); ?>
139
</time>
1410
<section><?php the_content(); ?></section>
1511
</article>

Diff for: single.php

+4-11
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</time>
1616
<div class="post-categories">
1717
<?php
18-
$categories = get_categories();
18+
$categories = get_the_category();
1919
foreach ($categories as $category) {
2020
echo '<li><a href="' .
2121
get_category_link($category->term_id) .
@@ -157,16 +157,9 @@ class="pocket">
157157
endif; ?>
158158
<div>
159159
<h4><?php the_title(); ?></h4>
160-
<time><i class="ori-time"></i>
161-
<?php if (
162-
get_theme_mod("or_main_design_datetime")
163-
):
164-
the_time(
165-
get_theme_mod("or_main_design_datetime")
166-
);
167-
else:
168-
the_time("Y年n月j日");
169-
endif; ?></time>
160+
<time><i class="ori-time"></i><?php the_time(
161+
get_option("date_format")
162+
); ?></time>
170163
<p><?php if (
171164
get_theme_mod(
172165
"or_main_design_excerpt_num"

Diff for: style.css

+31-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Author: wamo
66
Author URL: https://wmsci.com
77
License: GPL 3.0 License
88
License URI: https://www.gnu.org/licenses/gpl-3.0.ja.html
9-
Version: 1.0.5
9+
Version: 1.0.6
1010
*/
1111

1212
html,
@@ -242,14 +242,16 @@ main {
242242
}
243243
.content.list a .col h3 {
244244
margin: 0;
245-
font-size: 1.5rem;
245+
font-size: 1.25rem;
246246
margin-bottom: 0.75rem;
247247
}
248248
.content.list a .col time {
249249
margin: 0;
250+
color: rgb(35, 35, 35);
250251
}
251252
.content.list a .col p {
252253
margin-top: 0.5rem;
254+
color: rgb(35, 35, 35);
253255
}
254256
.content.list a .col img {
255257
max-width: 100%;
@@ -295,6 +297,7 @@ main {
295297
flex-direction: row;
296298
padding: 0;
297299
margin-bottom: 1rem;
300+
flex-wrap: wrap;
298301
}
299302
.content.article .post-categories li a {
300303
display: inline-block;
@@ -418,7 +421,6 @@ main {
418421
display: flex;
419422
flex-direction: row;
420423
gap: 1rem;
421-
height: 6rem;
422424
color: inherit;
423425
}
424426
.content.article .related ul li a:hover {
@@ -430,15 +432,19 @@ main {
430432
aspect-ratio: 16 / 9;
431433
width: auto;
432434
object-fit: cover;
435+
height: 6rem;
433436
}
434437
.content.article .related ul li a h4 {
435438
margin: 0;
436-
line-height: 1.75rem;
439+
margin-top: 0.25rem;
440+
line-height: 1rem;
437441
}
438442
.content.article .related ul li a time,
439443
.content.article .related ul li a p {
440444
font-size: 0.875rem;
445+
line-height: 1rem;
441446
margin: 0;
447+
color: rgb(35, 35, 35);
442448
}
443449

444450
/* widget */
@@ -450,6 +456,10 @@ main {
450456
li.widget {
451457
list-style: none;
452458
}
459+
.widget h2,
460+
.widget h3 {
461+
font-size: 1.125rem;
462+
}
453463
.widgettitle {
454464
font-size: 1.125rem;
455465
font-weight: bold;
@@ -553,6 +563,10 @@ li.widget {
553563
.comment-form .required-field-message {
554564
display: block;
555565
}
566+
.comment-form span.required {
567+
color: red;
568+
font-weight: bold;
569+
}
556570
.comment-form input[type='text'],
557571
.comment-form textarea {
558572
border-radius: 0.5rem;
@@ -565,6 +579,9 @@ li.widget {
565579
.comment-form textarea:focus {
566580
background-color: rgb(245, 245, 245);
567581
}
582+
.comment-form textarea {
583+
padding-top: 0.75rem;
584+
}
568585
.comment-form input[type='submit'] {
569586
background-color: var(--primary-color, #252525);
570587
color: white;
@@ -583,6 +600,16 @@ li.widget {
583600
padding: 0;
584601
gap: 2rem;
585602
}
603+
.commentlist ul,
604+
.commentlist ol {
605+
list-style: none;
606+
}
607+
.commentlist .children {
608+
margin-top: 1rem;
609+
}
610+
.commentlist cite {
611+
font-style: normal;
612+
}
586613
.commentlist a {
587614
color: black;
588615
}

0 commit comments

Comments
 (0)