Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,13 @@ export interface Props {}
</header>

<script is:inline>
console.log("Header script loaded");

window.addEventListener("DOMContentLoaded", () => {
console.log("DOMContentLoaded!");

const toggleButton = document.getElementById("menu-toggle");
const navMenu = document.getElementById("nav");

if (toggleButton && navMenu) {
toggleButton.addEventListener("click", () => {
console.log("Menu toggle clicked");
toggleButton.classList.toggle("open");
navMenu.classList.toggle("open");
document.body.classList.toggle("no-scroll");
Expand Down
2 changes: 1 addition & 1 deletion src/components/KeyVisual.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<section class="kv-center">
<div class="logo-box">
<img src="/my-blog/images/Gira.png" alt="Giraのロゴ" class="kv-logo" />
<img src={`${import.meta.env.BASE_URL}images/Gira.png`} alt="Giraのロゴ" class="kv-logo" />
<div class="logo-text">
<span style="--i:0">G</span>
<span style="--i:1">i</span>
Expand Down
2 changes: 1 addition & 1 deletion src/content/blog/post-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Kansui Park Store"
date: 2025-07-22
tags: ["cafe", "Starbucks"]
description: "ocean Starbucks"
image: "/public/images/ocean.jpg"
image: "/images/ocean.jpg"
---

## ◼︎Store
Expand Down
2 changes: 1 addition & 1 deletion src/content/blog/post-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Hamamatu castle Store"
date: 2025-07-22
tags: ["cafe", "Starbucks"]
description: "city Starbucks"
image: "/public/images/forest.jpg"
image: "/images/forest.jpg"
---

## ◼︎Store
Expand Down
3 changes: 2 additions & 1 deletion src/layouts/BlogPostLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
import BaseLayout from './BaseLayout.astro';

const { frontmatter } = Astro.props;
const base = import.meta.env.BASE_URL;
---

<BaseLayout title={frontmatter.title}>
<article class="blog-article">
{frontmatter.image && (
<img src={frontmatter.image} alt={frontmatter.title} class="blog-hero-image" />
<img src={`${base}${frontmatter.image}`} alt={frontmatter.title} class="blog-hero-image" />
)}

<h1 class="main-title">{frontmatter.title}</h1>
Expand Down
7 changes: 2 additions & 5 deletions src/pages/about.astro
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
---
// src/pages/about.astro
import BaseLayout from '../layouts/BaseLayout.astro';
import Header from '../components/Header.astro';
import Footer from '../components/Footer.astro';
const base = import.meta.env.BASE_URL;
---



<BaseLayout title="プロフィール">
<Header />

<main class="page-container">

<div class="profile">
<img src="/images/profile1.jpg" alt="ギラのプロフィール画像" class="profile-image" />
<img src={`${base}images/profile1.jpg`} alt="ギラのプロフィール画像" class="profile-image" />
<div class="profile-info">
<h1 class="gradient-text profile-name">Gira</h1>
<p class="job-title">Customer Support Trainer / Aspiring Engineer</p>
Expand Down Expand Up @@ -69,7 +67,6 @@ import Footer from '../components/Footer.astro';
</section>
</main>

<Footer slot="footer" />
</BaseLayout>

<script is:inline>
Expand Down
5 changes: 3 additions & 2 deletions src/pages/blog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { getCollection } from 'astro:content';
import BaseLayout from '../layouts/BaseLayout.astro';

const posts = await getCollection('blog');
const base = import.meta.env.BASE_URL;
---

<BaseLayout title="Journal">
<section class="blog-hero">
<img src="/images/blog-hero.jpg" alt="海と空のふんわりヒーロー画像" />
<img src={`${base}images/blog-hero.jpg`} alt="海と空のふんわりヒーロー画像" />
<div class="overlay">
<h1>Journal</h1>
</div>
Expand All @@ -19,7 +20,7 @@ const posts = await getCollection('blog');
<article class="post-card fade-in">
<a href={`/blog/${post.slug}`}>
<div class="post-image">
<img src={post.data.image || '/images/img-test.png'} alt={post.data.title} />
<img src={`${base}${post.data.image || 'images/img-test.png'}`} alt={post.data.title} />
</div>
<div class="post-content">
<h2>{post.data.title}</h2>
Expand Down
1 change: 0 additions & 1 deletion src/pages/blog/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import BlogPostLayout from '../../layouts/BlogPostLayout.astro';

export async function getStaticPaths() {
const blogPosts = await getCollection('blog');
console.log("★ getStaticPaths →", blogPosts.map(post => post.slug));

return blogPosts.map(post => ({
params: { slug: post.slug },
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export interface Post {
data: {
title: string;
description: string;
date: string;
date: Date;
image?: string;
};
render: () => Promise<{ Content: any }>;
Expand Down