Skip to content

Commit

Permalink
タグ、タグ一覧のデザイン調整 #4
Browse files Browse the repository at this point in the history
  • Loading branch information
kfly8 committed Feb 12, 2021
1 parent 609fed9 commit 6318a97
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 25 deletions.
10 changes: 10 additions & 0 deletions content/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ main {
margin: 10px;
}

.tag-title {
margin: 10px;
padding: 2px 10px;
color: #fff;
background: #9e9e9e;
border-radius: 5px;
display: inline-block;
}


/* FOOTER */
.site-footer {
max-width: 100%;
Expand Down
31 changes: 18 additions & 13 deletions layouts/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@
<title><?= $vars->{title} ?></title>
<link rel="icon" href="/img/favicon.ico">
<link rel="canonical" href="<?= $vars->{url} ?>">
<link href="TODO" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.min.css">
<link rel="stylesheet" href="/css/main.css">
</head>
<body>
<h1><?= $vars->{tag} ?></h1>
<ul>
<?= $include->('./include/header.html') ?>
<main>
<h1 class="tag-title">#<?= $vars->{tag} ?></h1>
? for (@{$vars->{files}}) {
<li>
<a href="<?= $_->{href} ?>">
<?= $_->{title} ?>
</a>
</li>
<div class="card">
? if ($_->{matter}->exists && $_->{matter}->date ) {
<div class="card-date"><?= $_->{matter}->date ?></div>
? }
<a href="<?= $_->{href} ?>">
<div class="card-title"><?= $_->{title} ?></div>
</a>
? if ($_->{matter}->exists && $_->{matter}->author) {
<div class="card-author"><?= $_->{matter}->author ?></div>
? }
</div>
? }
</ul>

<a href="/tag">タグ一覧</a>
<a href="/">HOME</a>

</main>
<?= $include->('./include/footer.html') ?>
</body>
</html>
24 changes: 12 additions & 12 deletions layouts/tag_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
<title>タグ一覧</title>
<link rel="icon" href="/img/favicon.ico">
<link rel="canonical" href="<?= $vars->{url} ?>">
<link href="TODO" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.min.css">
<link rel="stylesheet" href="/css/main.css">
</head>
<body>
<h1>タグ一覧</h1>
<ul>
<?= $include->('./include/header.html') ?>
<main>
<h1 class="category-title">タグ一覧</h1>
? for my $tag (@{$vars->{tags}}) {
<li>
<a href=<?= $vars->{tag_url_path}->($tag) ?>>
<?= $tag ?>
</a>
</li>
<div class="card">
<a href="<?= $vars->{tag_url_path}->($tag) ?>">
<div class="card-title"><?= $tag ?></div>
</a>
</div>
? }
</ul>

<a href="/">HOME</a>

</main>
<?= $include->('./include/footer.html') ?>
</body>
</html>

0 comments on commit 6318a97

Please sign in to comment.