DEV Community

ri ki
ri ki

Posted on • Edited on

Umemura Farm Website – Devlog #20: Refining Layout Structure for Seasonal Content and Adding Utilities

Today's Work: Organizing Layout for Seasonal Sections

Today, I worked on restructuring the layout to better support seasonal variations in content.

project-root/
├── src/
│   ├── app/
│   │   ├── contact/
│   │   │   ├── page.tsx              # お問い合わせページ内容
│   │   │   ├── layout.tsx            # ScrolledHeader + Footer
│   │   │   └── ContactForm.tsx       # 既存のコンポーネント
│   │   ├── stay/                     # または実際のフォルダ名
│   │   │   ├── page.tsx              # 農家民宿ページ内容
│   │   │   └── layout.tsx            # ScrolledHeader + Footer
│   │   ├── layout.tsx                # ルートレイアウト(最小構成)
│   │   ├── page.tsx                  # トップページ(既存)
│   │   └── globals.css
│   ├── components/
│   │   ├── layout/                   # 既存のレイアウト関連
│   │   │   ├── Header.tsx            # 通常のヘッダー
│   │   │   ├── ScrolledHeader.tsx    # スクロール対応ヘッダー
│   │   │   └── Footer.tsx            # 共通フッター
│   ├── data/                         # データ管理(新規)
│   │   ├── seasonal-content.ts       # 季節別コンテンツデータ
│   │   └── season-config.ts          # 季節判定設定
│   └── utils/                        # ユーティリティ(新規)
│       └── season-detector.ts        # 季節判定ロジック
├── public/                           # 既存の位置を維持
│   └── images/
│      
├── package.json
└── next.config.js
Enter fullscreen mode Exit fullscreen mode

The previous layout I described yesterday actually caused the localhost pages to become inaccessible, a setback, but a valuable learning experience.

New Utilities and Data for Seasonal Logic

I added new utility functions and data files necessary for determining the current season and dynamically adjusting the content accordingly.

Additional Updates

  • Added one new nearby facility to the facilities section
  • Added a new question to the FAQ section

Tomorrow's Plan

Tomorrow, I will start editing the .tsx files for the sections that need to change based on the season, integrating the new seasonal logic.


Every challenge like a broken layout helps me understand the system better and improve the overall robustness of the project.


Date: June 29, 2025
tags: portfolio, webdev, react, nextjs, typescript

Top comments (0)