<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>生活 on Potter的个人笔记</title><link>https://potterwhite.github.io/blog/life/</link><description>Recent content in 生活 on Potter的个人笔记</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Thu, 20 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://potterwhite.github.io/blog/life/index.xml" rel="self" type="application/rss+xml"/><item><title>2026 生日——来自Zoey的礼物</title><link>https://potterwhite.github.io/blog/2026/08/20/2026-birthday-gifts/</link><pubDate>Thu, 20 Aug 2026 00:00:00 +0000</pubDate><guid>https://potterwhite.github.io/blog/2026/08/20/2026-birthday-gifts/</guid><description>&lt;p&gt;今年生日，Zoey 送的礼物。&lt;/p&gt;
&lt;style&gt;
 
 .gallery-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
 gap: 10px;
 margin: 1.5em auto;
 max-width: 1100px;
 padding: 0 1rem;
 }
 .gallery-grid img {
 width: 100%;
 height: 220px;
 object-fit: cover;
 border-radius: 10px;
 cursor: zoom-in;
 transition: transform 0.25s ease, box-shadow 0.25s ease;
 background: #1a1a2e;
 }
 .gallery-grid img:hover {
 transform: translateY(-3px);
 box-shadow: 0 12px 28px rgba(0,0,0,0.45);
 }

 
 .lightbox {
 display: none;
 position: fixed;
 inset: 0;
 z-index: 9999;
 background: rgba(0,0,0,0.92);
 justify-content: center;
 align-items: center;
 padding: 2rem;
 }
 .lightbox.active { display: flex; }
 .lightbox img {
 max-width: 92vw;
 max-height: 88vh;
 object-fit: contain;
 border-radius: 6px;
 box-shadow: 0 8px 40px rgba(0,0,0,0.5);
 animation: lbFadeIn 0.2s ease;
 }
 @keyframes lbFadeIn {
 from { opacity: 0; transform: scale(0.97); }
 to { opacity: 1; transform: scale(1); }
 }
 .lightbox .lb-close,
 .lightbox .lb-prev,
 .lightbox .lb-next {
 position: absolute;
 background: rgba(255,255,255,0.12);
 border: none;
 color: #fff;
 font-size: 1.8rem;
 width: 44px; height: 44px;
 border-radius: 50%;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: background 0.2s;
 backdrop-filter: blur(4px);
 }
 .lightbox .lb-close:hover,
 .lightbox .lb-prev:hover,
 .lightbox .lb-next:hover { background: rgba(255,255,255,0.28); }
 .lightbox .lb-close { top: 1rem; right: 1rem; }
 .lightbox .lb-prev { top: 50%; left: 1rem; transform: translateY(-50%); }
 .lightbox .lb-next { top: 50%; right: 1rem; transform: translateY(-50%); }
 .lightbox .lb-counter {
 position: absolute;
 bottom: 1.2rem;
 left: 50%;
 transform: translateX(-50%);
 color: rgba(255,255,255,0.7);
 font-size: 0.9rem;
 background: rgba(0,0,0,0.4);
 padding: 4px 14px;
 border-radius: 20px;
 backdrop-filter: blur(4px);
 }
 .lightbox .lb-caption {
 position: absolute;
 bottom: 3rem;
 left: 50%;
 transform: translateX(-50%);
 color: rgba(255,255,255,0.85);
 font-size: 0.95rem;
 text-align: center;
 max-width: 80vw;
 }
&lt;/style&gt;

&lt;div class="gallery-grid" id="gallery-blog202608202026-birthday-gifts-0"&gt;&lt;img
 src="https://potterwhite.github.io/2026/james-birthday-gifts/james-birthday-gifts-from-kids-2026-000.png"
 alt=""
 loading="lazy"
 data-index="0"
 data-src="https://potterwhite.github.io/2026/james-birthday-gifts/james-birthday-gifts-from-kids-2026-000.png"
 
 &gt;&lt;img
 src="https://potterwhite.github.io/2026/james-birthday-gifts/james-birthday-gifts-from-kids-2026-001.png"
 alt=""
 loading="lazy"
 data-index="1"
 data-src="https://potterwhite.github.io/2026/james-birthday-gifts/james-birthday-gifts-from-kids-2026-001.png"
 
 &gt;&lt;img
 src="https://potterwhite.github.io/2026/james-birthday-gifts/james-birthday-gifts-from-kids-2026-002.png"
 alt=""
 loading="lazy"
 data-index="2"
 data-src="https://potterwhite.github.io/2026/james-birthday-gifts/james-birthday-gifts-from-kids-2026-002.png"
 
 &gt;&lt;/div&gt;


&lt;div class="lightbox" id="gallery-blog202608202026-birthday-gifts-0-lightbox" role="dialog" aria-label="图片浏览"&gt;
 &lt;img src="" alt="" id="gallery-blog202608202026-birthday-gifts-0-lb-img"&gt;
 &lt;button class="lb-close" aria-label="关闭"&gt;&amp;times;&lt;/button&gt;
 &lt;button class="lb-prev" aria-label="上一张"&gt;&amp;#10094;&lt;/button&gt;
 &lt;button class="lb-next" aria-label="下一张"&gt;&amp;#10095;&lt;/button&gt;
 &lt;div class="lb-counter" id="gallery-blog202608202026-birthday-gifts-0-lb-counter"&gt;&lt;/div&gt;
 &lt;div class="lb-caption" id="gallery-blog202608202026-birthday-gifts-0-lb-caption"&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
(function() {
 const prefix = 'gallery-blog202608202026-birthday-gifts-0';
 const grid = document.getElementById(prefix);
 const lb = document.getElementById(prefix + '-lightbox');
 const lbImg = document.getElementById(prefix + '-lb-img');
 const counter = document.getElementById(prefix + '-lb-counter');
 const caption = document.getElementById(prefix + '-lb-caption');
 const items = Array.from(grid.querySelectorAll('img'));
 let idx = 0;

 function show(i) {
 idx = (i + items.length) % items.length;
 const el = items[idx];
 lbImg.src = el.dataset.src;
 lbImg.alt = el.alt;
 lbImg.style.animation = 'none';
 lbImg.offsetHeight; 
 lbImg.style.animation = 'lbFadeIn 0.2s ease';
 counter.textContent = (idx + 1) + ' / ' + items.length;
 caption.textContent = el.dataset.caption || '';
 }

 grid.querySelectorAll('img').forEach((el, i) =&gt; {
 el.addEventListener('click', () =&gt; { lb.classList.add('active'); show(i); });
 });

 lb.querySelector('.lb-close').addEventListener('click', () =&gt; lb.classList.remove('active'));
 lb.querySelector('.lb-prev').addEventListener('click', () =&gt; show(idx - 1));
 lb.querySelector('.lb-next').addEventListener('click', () =&gt; show(idx + 1));

 document.addEventListener('keydown', e =&gt; {
 if (!lb.classList.contains('active')) return;
 if (e.key === 'Escape') lb.classList.remove('active');
 if (e.key === 'ArrowLeft') show(idx - 1);
 if (e.key === 'ArrowRight') show(idx + 1);
 });

 lb.addEventListener('click', e =&gt; { if (e.target === lb) lb.classList.remove('active'); });
})();
&lt;/script&gt;</description></item></channel></rss>