Skip to content

Commit

Permalink
トップページのレイアウトを変更
Browse files Browse the repository at this point in the history
  • Loading branch information
0maru committed Sep 14, 2024
1 parent 76c10f8 commit 9adf908
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 28 deletions.
14 changes: 0 additions & 14 deletions src/components/ArticleCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,12 @@ const {title, image, createdAt, url, tags, isFirst} = Astro.props;
---

<div class="item">
<a href={url}>
<img src={image} alt={title} />
</a>
<div class="px-sm pt-md pb-sm">
<a href={url}>
<h2 class="bold text-wrap-pretty">{title}</h2>
</a>
</div>
<div class="flex flex-row justify-between px-sm">
<div class="flex flex-row">
{
tags.map((tag) => (
<div class="px-sm">
<a href={`/tags/${tag}`}>
<span class="tag text-md pointer">#{tag}</span>
</a>
</div>
))
}
</div>
<p class="text-sm text-right">
{createdAt.slice(0, 10).replaceAll("-", "/")}
</p>
Expand Down
26 changes: 13 additions & 13 deletions src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ interface Props {
const {title, description} = Astro.props;
---

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="sitemap" href="/sitemap-index.xml" />
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
<link rel="sitemap" href="/sitemap-index.xml"/>
<script type="text/partytown">
(function (w, d, s, l, i) {
w[l] = w[l] || [];
Expand All @@ -25,17 +25,17 @@ const {title, description} = Astro.props;
f.parentNode.insertBefore(j, f);
})(window, document, "script", "dataLayer", "GTM-P2LKPC2K");
</script>
<link rel="stylesheet" href="/styles/reset.css" />
<link rel="stylesheet" href="/styles/global.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="stylesheet" href="/styles/reset.css"/>
<link rel="stylesheet" href="/styles/global.css"/>
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
<link
href="https://fonts.googleapis.com/css2?family=BIZ+UDPMincho&display=swap"
rel="stylesheet"
/>
<title>{title}</title>
<meta name="description" property="og:description" content={description} />
<meta property="og:title" content={title} />
<meta property="og:url" content={SITE_URL} />
<meta property="og:locale" content="ja_JP" />
<meta data-hid="og:type" property="og:type" content="website" />
<meta name="description" property="og:description" content={description}/>
<meta property="og:title" content={title}/>
<meta property="og:url" content={SITE_URL}/>
<meta property="og:locale" content="ja_JP"/>
<meta data-hid="og:type" property="og:type" content="website"/>
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {SITE_DESCRIPTION, SITE_TITLE} from '../consts';
import DefaultLayout from '../layouts/Default.astro';
const allPosts = await Astro.glob('../pages/posts/*.md');
// status がpublish の記事のみ表示する
const filteredPosts = allPosts.filter((e) => e.frontmatter.status === 'published');
const filteredPosts = allPosts.filter((e) => e.frontmatter.status === 'published').reverse();
---

<DefaultLayout title={SITE_TITLE} description={SITE_DESCRIPTION}>
Expand Down

0 comments on commit 9adf908

Please sign in to comment.