アニメーション(#139) #252

マージ済み
みてるぞ が 16 個のコミットを feature/139 から main へマージ 2026-02-05 23:25:28 +09:00
2個のファイルの変更6行の追加6行の削除
コミット 4d6e931040 の変更だけを表示してゐます - すべてのコミットを表示
+1 -3
ファイルの表示
@@ -20,14 +20,12 @@ export default (({ posts, onClick }: Props) => {
const cardRef = useRef<HTMLDivElement> (null) const cardRef = useRef<HTMLDivElement> (null)
const outboundSharedId = useSharedTransitionStore (s => s.byLocationKey[location.key])
return ( return (
<> <>
<div className="flex flex-wrap gap-6 p-4"> <div className="flex flex-wrap gap-6 p-4">
{posts.map ((post, i) => { {posts.map ((post, i) => {
const id2 = `page-${ post.id }` const id2 = `page-${ post.id }`
const layoutId = outboundSharedId === id2 ? id2 : undefined const layoutId = id2
return ( return (
<PrefetchLink <PrefetchLink
+5 -3
ファイルの表示
@@ -113,9 +113,11 @@ export default (({ user }: Props) => {
{inboundSharedId === `page-${ id }` && ( {inboundSharedId === `page-${ id }` && (
<motion.div <motion.div
layoutId={inboundSharedId} layoutId={inboundSharedId}
className="absolute top-4 left-4 w-[640px] max-w-full h-[360px] className="absolute top-4 left-4 w-[min(640px,calc(100vw-2rem))] h-[360px]
overflow-hidden rounded-xl shadow pointer-events-none overflow-hidden rounded-xl pointer-events-none z-50"
opacity-0 z-10"> initial={{ opacity: 1 }}
animate={{ opacity: 0 }}
transition={{ duration: .2, ease: 'easeOut' }}>
<img src={post.thumbnail || post.thumbnailBase || undefined} <img src={post.thumbnail || post.thumbnailBase || undefined}
alt={post.title || post.url} alt={post.title || post.url}
title={post.title || post.url || undefined} title={post.title || post.url || undefined}