Skip to content

Commit 6318a97

Browse files
author
kfly8
committed
タグ、タグ一覧のデザイン調整 #4
1 parent 609fed9 commit 6318a97

File tree

3 files changed

+40
-25
lines changed

3 files changed

+40
-25
lines changed

content/css/main.css

+10
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,16 @@ main {
151151
margin: 10px;
152152
}
153153

154+
.tag-title {
155+
margin: 10px;
156+
padding: 2px 10px;
157+
color: #fff;
158+
background: #9e9e9e;
159+
border-radius: 5px;
160+
display: inline-block;
161+
}
162+
163+
154164
/* FOOTER */
155165
.site-footer {
156166
max-width: 100%;

layouts/tag.html

+18-13
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,27 @@
77
<title><?= $vars->{title} ?></title>
88
<link rel="icon" href="/img/favicon.ico">
99
<link rel="canonical" href="<?= $vars->{url} ?>">
10-
<link href="TODO" rel="stylesheet">
10+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.min.css">
11+
<link rel="stylesheet" href="/css/main.css">
1112
</head>
1213
<body>
13-
<h1><?= $vars->{tag} ?></h1>
14-
<ul>
14+
<?= $include->('./include/header.html') ?>
15+
<main>
16+
<h1 class="tag-title">#<?= $vars->{tag} ?></h1>
1517
? for (@{$vars->{files}}) {
16-
<li>
17-
<a href="<?= $_->{href} ?>">
18-
<?= $_->{title} ?>
19-
</a>
20-
</li>
18+
<div class="card">
19+
? if ($_->{matter}->exists && $_->{matter}->date ) {
20+
<div class="card-date"><?= $_->{matter}->date ?></div>
21+
? }
22+
<a href="<?= $_->{href} ?>">
23+
<div class="card-title"><?= $_->{title} ?></div>
24+
</a>
25+
? if ($_->{matter}->exists && $_->{matter}->author) {
26+
<div class="card-author"><?= $_->{matter}->author ?></div>
27+
? }
28+
</div>
2129
? }
22-
</ul>
23-
24-
<a href="/tag">タグ一覧</a>
25-
<a href="/">HOME</a>
26-
30+
</main>
31+
<?= $include->('./include/footer.html') ?>
2732
</body>
2833
</html>

layouts/tag_index.html

+12-12
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
<title>タグ一覧</title>
88
<link rel="icon" href="/img/favicon.ico">
99
<link rel="canonical" href="<?= $vars->{url} ?>">
10-
<link href="TODO" rel="stylesheet">
10+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.min.css">
11+
<link rel="stylesheet" href="/css/main.css">
1112
</head>
1213
<body>
13-
<h1>タグ一覧</h1>
14-
<ul>
14+
<?= $include->('./include/header.html') ?>
15+
<main>
16+
<h1 class="category-title">タグ一覧</h1>
1517
? for my $tag (@{$vars->{tags}}) {
16-
<li>
17-
<a href=<?= $vars->{tag_url_path}->($tag) ?>>
18-
<?= $tag ?>
19-
</a>
20-
</li>
18+
<div class="card">
19+
<a href="<?= $vars->{tag_url_path}->($tag) ?>">
20+
<div class="card-title"><?= $tag ?></div>
21+
</a>
22+
</div>
2123
? }
22-
</ul>
23-
24-
<a href="/">HOME</a>
25-
24+
</main>
25+
<?= $include->('./include/footer.html') ?>
2626
</body>
2727
</html>

0 commit comments

Comments
 (0)