Skip to content

Commit 8e01901

Browse files
committed
feat: move header to layout
1 parent f7b60b5 commit 8e01901

File tree

4 files changed

+37
-30
lines changed

4 files changed

+37
-30
lines changed

2025/src/components/Header.astro

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
import LanguagePicker from '../components/LanguagePicker.astro'
3+
---
4+
5+
<header class="hero">
6+
<LanguagePicker />
7+
<div class="container">
8+
<h1>VimConf <wbr />2025</h1>
9+
</div>
10+
</header>
11+
12+
<style>
13+
/* Hero Section */
14+
.hero {
15+
background: linear-gradient(110deg, #9ebd13 0%, #069700 100%);
16+
color: #fff;
17+
text-align: center;
18+
19+
h1 {
20+
font-size: 4rem;
21+
margin-bottom: 16px;
22+
font-family: "Cardo", serif;
23+
font-weight: 400;
24+
font-style: italic;
25+
}
26+
}
27+
28+
/* Container */
29+
.container {
30+
width: 90%;
31+
max-width: 960px;
32+
margin: auto;
33+
padding: 24px 0;
34+
}
35+
</style>

2025/src/layouts/Layout.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import { GoogleFontsOptimizer } from "astro-google-fonts-optimizer";
3+
import Header from "../components/Header.astro";
34
45
const { lang = 'ja' } = Astro.props;
56
---
@@ -17,6 +18,7 @@ const { lang = 'ja' } = Astro.props;
1718
<title>VimConf 2025</title>
1819
</head>
1920
<body>
21+
<Header />
2022
<slot />
2123
</body>
2224
</html>

2025/src/pages/en.astro

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
---
22
import Layout from '../layouts/Layout.astro';
3-
import LanguagePicker from '../components/LanguagePicker.astro'
43
---
54

65
<Layout lang="en">
7-
<header class="hero">
8-
<LanguagePicker />
9-
<div class="container">
10-
<h1>VimConf <wbr />2025</h1>
11-
</div>
12-
</header>
13-
146
<section>
157
<div class="container">
168
<h2 id="what-is-vimconf-2025" class="section-title"><a href="#what-is-vimconf-2025">What is VimConf 2025?</a></h2>
@@ -100,20 +92,6 @@ h3 {
10092
padding: 24px 0;
10193
}
10294

103-
/* Hero Section */
104-
.hero {
105-
background: linear-gradient(110deg, #9ebd13 0%, #069700 100%);
106-
color: #fff;
107-
text-align: center;
108-
109-
h1 {
110-
font-size: 4rem;
111-
margin-bottom: 16px;
112-
font-family: "Cardo", serif;
113-
font-weight: 400;
114-
font-style: italic;
115-
}
116-
}
11795

11896
/* Section Title */
11997
.section-title {

2025/src/pages/ja.astro

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
---
22
import Layout from '../layouts/Layout.astro';
3-
import LanguagePicker from '../components/LanguagePicker.astro'
43
---
54

65
<Layout>
7-
<header class="hero">
8-
<LanguagePicker />
9-
<div class="container">
10-
<h1>VimConf <wbr />2025</h1>
11-
</div>
12-
</header>
13-
146
<section>
157
<div class="container">
168
<h2 id="what-is-vimconf-2025" class="section-title"><a href="#what-is-vimconf-2025">VimConf 2025 とは?</a></h2>

0 commit comments

Comments
 (0)