Skip to content
Merged
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
8 changes: 7 additions & 1 deletion app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ button, input, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell {
position: relative;
display: flex;
flex-direction: column;
width: min(100%, 480px);
min-height: 100vh;
min-height: 100dvh;
Expand All @@ -35,7 +37,7 @@ button { cursor: pointer; }
box-shadow: 0 0 48px rgba(48, 98, 126, .12);
}
.page { min-height: 100vh; min-height: 100dvh; padding: 0 20px 112px; }
.main-tab-page { padding-bottom: 80px; }
.main-tab-page { flex: 1; min-height: 0; padding-bottom: 20px; }
.safe-top { padding-top: max(8px, env(safe-area-inset-top)); }
.home-header-top { padding-top: max(9px, env(safe-area-inset-top)); }
.main-tab-bar {
Expand All @@ -50,6 +52,10 @@ button { cursor: pointer; }
background: rgba(238, 249, 255, .96);
backdrop-filter: blur(14px);
}
.main-tab-footer-spacer {
height: calc(61px + max(7px, env(safe-area-inset-bottom)));
flex: none;
}
.mobile-fixed {
position: fixed;
z-index: 30;
Expand Down
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Metadata, Viewport } from "next";
import "./globals.css";
import { Providers } from "@/app/providers";
import { MainTabNavigation } from "@/components/main-tab-navigation";
import { SiteFooter } from "@/components/site-footer";

const siteUrl = new URL("https://nalssilog.com");
const siteDescription = "우리 동네 사람들이 직접 전하는 지금 날씨를 사진과 함께 확인하고 제보해 보세요.";
Expand Down Expand Up @@ -54,6 +55,7 @@ export default function RootLayout({ children }: Readonly<{ children: React.Reac
<Providers>
<div className="app-shell">
{children}
<SiteFooter />
<MainTabNavigation />
</div>
</Providers>
Expand Down
85 changes: 85 additions & 0 deletions components/site-footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
"use client";

import Link from "next/link";
import { usePathname } from "next/navigation";
import { useState } from "react";

import { UserPanel } from "@/components/user-panel";
import { useLegalModalStore } from "@/store/legal-modal-store";

const MAIN_TAB_PATHS = new Set(["/", "/mypage"]);

export function SiteFooter() {
const pathname = usePathname();
const [isFeedbackOpen, setIsFeedbackOpen] = useState(false);
const openLegalDocument = useLegalModalStore((state) => state.openLegalDocument);

if (pathname === "/reports/new") return null;

const hasMainTabNavigation = MAIN_TAB_PATHS.has(pathname);

return (
<>
<footer
id="site-footer"
className="border-t-2 border-[#dcecf4] text-center"
>
<div
className={
hasMainTabNavigation
? "px-5 py-6"
: "px-5 pb-[max(24px,env(safe-area-inset-bottom))] pt-6"
}
>
<p className="text-sm font-extrabold text-[#526a7a]">날씨로그</p>
<nav
className="mt-3 flex flex-wrap items-center justify-center gap-x-3 gap-y-1 text-[11px] font-semibold text-[#718594]"
aria-label="서비스 안내"
>
<Link
href="/privacy"
onClick={(event) => {
event.preventDefault();
openLegalDocument("PRIVACY");
}}
className="transition-colors hover:text-[#238fc9]"
>
개인정보처리방침
</Link>
<Link
href="/terms"
onClick={(event) => {
event.preventDefault();
openLegalDocument("TERMS");
}}
className="transition-colors hover:text-[#238fc9]"
>
서비스 이용약관
</Link>
<button
type="button"
onClick={() => setIsFeedbackOpen(true)}
className="transition-colors hover:text-[#238fc9]"
>
서비스 피드백
</button>
</nav>
<p className="mt-2 text-[10px] font-medium text-[#8ba0ae]">
© 2026 날씨로그. All rights reserved.
</p>
</div>
{hasMainTabNavigation ? (
<div className="main-tab-footer-spacer" aria-hidden="true" />
) : null}
</footer>

{isFeedbackOpen ? (
<UserPanel
initialView="FEEDBACK"
open
onClose={() => setIsFeedbackOpen(false)}
/>
) : null}
</>
);
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nalssilog-web",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"scripts": {
"config:init": "git -c submodule.env-config.update=checkout submodule update --init --checkout env-config && git -C env-config switch main && git -C env-config pull --ff-only origin main && npm run config:sync",
Expand Down