@@ -11,7 +11,6 @@ import GlobalLayout from "../layouts/GlobalLayout.astro";
1111import Hero from " ../images/hero.jpg" ;
1212import LabCafe from " ../images/lab-cafe.jpg" ;
1313import LogoGMOMedia from " ../images/logo-gmo-media.png" ;
14- import LazyImage from " ../components/LazyImage.astro" ;
1514import { Picture } from " astro:assets" ;
1615---
1716
@@ -102,23 +101,23 @@ import { Picture } from "astro:assets";
102101 </section >
103102 <section class =" bg-black py-80 text-white" >
104103 <div
105- class =" mx-auto block items-center gap-12 px-8 xl:flex xl:flex-row-reverse 2xl:mx-16 2xl:gap-20 "
104+ class =" mx-auto block items-center justify-evenly gap-12 px-8 xl:flex xl:flex-row-reverse"
106105 >
107- <LazyImage
106+ <Picture
107+ formats ={ [" avif" , " webp" ]}
108108 alt =" "
109109 src ={ LabCafe }
110- width =" 1000"
111- height =" 800"
112- layout =" fixed"
113- class =" mr-6 ml-auto hidden h-full w-full max-w-2xl flex-1 overflow-clip rounded-3xl object-cover md:block xl:mb-60 xl:max-w-3xl"
110+ layout =" none"
111+ class =" mr-6 ml-auto block max-w-[80%] min-w-0 flex-1 overflow-clip rounded-3xl object-cover md:max-w-2xl xl:mb-60 xl:max-w-xl"
114112 />
115- <article class =" mt-12 self-center md:ml-12" >
113+ <article class =" mt-12 flex-shrink-0 self-center md:ml-12 lg:w-150 " >
116114 <h1 class =" max-w-2xl text-4xl leading-snug sm:text-5xl md:text-6xl" >
117115 <span
118116 id =" text-future-software"
119117 class =" mb-3 inline-block bg-white text-black"
120118 onmouseover =" document .getElementById (' text-future-software' )? .setAttribute (' data-highlighted' , ' ' );"
121119 tabindex =" 0"
120+ data-highlighted ={ true /* enable by default then immediately disable using JS s.t. it will show with noscript */ }
122121 onfocus =" document .getElementById (' text-future-software' )? .setAttribute (' data-highlighted' , ' ' );"
123122 >未来の<wbr />ソフトウェア</span
124123 >を<br /><span >デザインしよう</span >
@@ -135,14 +134,15 @@ import { Picture } from "astro:assets";
135134 </article >
136135 <script >
137136 var text = document.getElementById("text-future-software");
137+ text?.removeAttribute("data-highlighted");
138138 document.onscroll = () => {
139139 if (!text) return;
140140 if (!document.scrollingElement) return;
141141 var screenTop = document.scrollingElement.scrollTop;
142142 var screenBottom = screenTop && +innerHeight;
143143 var textTop = text.getBoundingClientRect().top;
144144
145- if (textTop < screenBottom - 500 ) {
145+ if (textTop < screenBottom - 400 ) {
146146 text.setAttribute("data-highlighted", "");
147147 }
148148 };
@@ -208,19 +208,20 @@ import { Picture } from "astro:assets";
208208 allow =" picture-in-picture; web-share"
209209 allow-fullscreen ></iframe >
210210 </section >
211- <section class =" bg-gray-50" >
212- <div class =" container mx-auto px-8 py-24" >
213- <SectionHeader title =" 協賛企業様" />
214- <div class =" mt-8 flex flex-wrap items-center justify-center gap-4" >
215- <LazyImage
216- size =" small"
211+ <section class =" bg-gray-50 py-24" >
212+ <SectionHeader title =" 協賛企業様" />
213+ <ul
214+ class =" mx-auto mt-8 flex flex-row flex-wrap items-center justify-center gap-16 px-24"
215+ >
216+ <li >
217+ <Picture
217218 alt =" GMOメディア株式会社"
218219 src ={ LogoGMOMedia }
219- width = " 400 "
220- height = " 600 "
220+ class = " object-contain "
221+ width = " 320 "
221222 />
222- </div >
223- </div >
223+ </li >
224+ </ul >
224225 </section >
225226 <section class =" bg-gray-200" >
226227 <div class =" container mx-auto px-8 py-12" >
@@ -264,7 +265,9 @@ import { Picture } from "astro:assets";
264265 no-repeat;
265266 transition: background-size 0.8s ease-in-out;
266267 }
267- #text-future-software[data-highlighted] {
268+ #text-future-software[data-highlighted],
269+ #text-future-software:hover,
270+ #text-future-software:active {
268271 --bg-left: 100%;
269272 }
270273 }
0 commit comments