人們腦海中的聖誕樹,文件倉下面一定堆著大大小小的禮物盒。禮物不在於貴賤,不在於輕重,而是在於拆開禮物那一刻的欣喜,在於禮物本身傳達出的情意。美麗派:香港莎莎隍葆麗美尊貴活氧套裝聖誕節,當然要把自己打扮得漂漂亮亮的。香港莎莎店內的瑞士葆麗美活氧細胞系列源自創新的概念,通過保護和刺激繁複的肌膚新陳代謝過程而成的肌膚修護“光合作用”。結合生理氨基酸和有機酸,能有效為生存細胞均漿提升300%氧氣消耗量。葆麗美白金緩紋套裝瑞士葆麗美白金系列是特別為成熟肌膚而設的高效尊貴修護系列,全賴生物活力細胞復合元素BiodynamicCellularComplex(BCC)撫平皺紋,強力抗氧。甜蜜派:MCAKE層層美味新鮮草莓的清爽甜美遇上優質奶油的醇滑,起酥皮的香脆可口碰撞內層輕乳芝士的鬆軟,MCAKE拿破侖莓戀精選產量少,品質高的新鮮日本有機草莓,雪白奶油拿破侖搭配時令新鮮草莓,簡單卻不平凡,每一口都有大塊的草莓果肉,滿足那個愛草莓的你。貼心派:樂購仕精品小電器作為進口家電百貨的量販店,樂購仕在聖誕期間也推出了一些貼心禮品。松下離子蒸汽美容器E H - S A 3 1 P N 納米蒸汽能更好吸收更深層補水,小巧精緻,時尚造型設計,是聖誕送給女性的上佳選擇。象印電飯煲N S - D A H 1 0 C - S A 人工智慧模糊邏輯微電腦控制,上蓋、側面、底部三面360度立體環繞加熱,居家烹飪好選擇。德龍泵壓式咖啡機E C O 3 1 0 . V G 自帶可調節的蒸汽噴射裝置,配帶可拆卸滴水盤;特別設計的暖杯盤,讓咖啡保持溫暖,讓製作出來的咖啡猶如咖啡店的一樣。=熱情派:<COLUMN_NAME>= <AUTHOR>= <CONTENT>=熱情派:Calvin Klein Jean s隍亮麗色彩CalvinKleinJeans2013聖誕彩色長褲系列,打破秋冬的沉悶,添加靚麗色塊,讓色彩點亮你的心情和穿搭。富有輪廓的造型與紅色相遇,熱情的熾熱紅結合高彈感光材質,為簡約的褲子注入金屬質感色彩,瞬間為秋冬打扮抹上一層鮮明亮麗的風景。新潮派:宏圖三胞愛TA就給予溫暖,給TA送出驚喜。各種琳琅滿目的熱門手機,大牌數碼,名品PC,潮流新品……總會讓你在宏圖三胞選到合適的聖誕禮物!新款手機超前空前、有指紋識別功能的iPhone5s;生來多彩,有防裂結構外殼的iPhone 5c;精彩不斷的三星Note3+Gear……當下這些引領時常潮流智能手機,作為驚喜送給你的愛人,讓甜蜜融化她的心!健康好禮生命在於運動,不妨在聖誕節給父母選擇血壓儀和計步器。送給他們健康,是我們做兒女最大的願望。可愛派:crocs<b><a href='http://www.kfstorage.com/contacts.php' title='存倉'><span style='color:blue;'>存倉</span></a></b>可愛蝴蝶結+溫暖綿柔對於小朋友來說,聖誕節有收不盡的禮物,是一年一度實現自己願望清單的最好機會。crocs全新推出的布利岑便裝克駱格童鞋一鞋兩穿,給愛新奇的寶貝百變驚喜。可愛的蝴蝶結搭配雪白溫軟的綿柔內襯,顯出俏麗可愛;獨有的輕便鞋型設計,讓小朋友穿脫自如。絨絨毛邊+麂皮材質crocs全新推出的兩款靴子絕對是甜美女生在聖誕夜與男友約會時、讓自己可愛指數急劇上升的必備單品!絨絨的翻毛邊溫暖卻又不失俏皮可愛;高幫設計靴筒為對自己的小腿線條不那麼滿意的女生化解煩憂。復古派:香港名店街—MGS曼古銀銀是深受人們喜愛的貴金屬之一,從古代的貨幣到現代的飾品,伴隨著人類的生活已有數千年曆史。銀是“像月光般潔白光亮”的意思,有極好的可塑性和可延展性,更為可貴的是,銀具備殺菌的特性,在我國少數民族地區有用銀容器盛裝奶製品經久不壞的現象。MGS曼古銀所出品的990銀飾,則在細微處會加蓋“MGS”商標字印及“S990”字印。990表示飾品的銀含量極高,達到千分之九百九十。990銀質地柔軟,完整地呈現了銀柔和純淨的本色,MGS曼古銀通常採用990銀來打造有著濃郁古樸、自然風格的銀飾,因為這類銀飾打造的過程由古老相傳的純手工工藝來完成,是MGS曼古銀傳承銀飾文化的代表作。臉譜中國曲韻輕彈,曼古悠揚。國粹京劇臉譜邂逅西方Afro潮流文化;中西元素在摩登時尚而不失典雅古樸的東方之珠碰撞,迸發出耀眼光輝;如此渾然天成地融合、並存、發展,成就MGS曼古銀的另類時尚中國風。材質:S925銀,鑲嵌施華洛世奇瑪克賽石、紅鋯石、黑鋯石旋轉木馬每次看到旋轉木馬,總是滿心歡喜、滿眼驚嘆,這樣的偏愛,與時光流轉無關。夜色氤氳間,華麗的外表和絢爛的燈光,音樂響起如同置身天堂,奔馳的木馬,讓你忘了煩惱憂傷,幻想與心愛的“王子”一起飛翔……925銀華麗地定格封存了這樣愜意、浪漫的一幕。馬克賽精心打造的拜占庭風格裝飾奢美環繞,馬兒優雅的四蹄,踏著節奏感的盛裝舞步。擁有它的MM,只需坦然接受小伙伴們的羨慕眼光,只因對美與愛的追求,是每個女人像孩子般執拗的夢想。材質:S925銀、施華洛世奇天然馬克賽石地址:黃浦區人民大道9-99號,軌交1、2、8號線人民廣場站下,一號口直通香港名店街內,7號店鋪。隍微活動:香港名店街第二屆速食王活動正式開始!海選時間:2013年12月20日、21日、22日、27日、28日、29日,13:00-20:00,每日海選參賽人員限定100人。海選期間可以到現場報名,男女不限。只要你吃得夠快,就有機會贏得大獎ipadair一台!比賽地點:香港名店街120號店鋪門口,地鐵一號線人民廣場站下,一號出口直接進入商場。<b><a href='http://www.kfstorage.com' title='儲存'><span style='color:blue;'>儲存</span></a></b> </div> <!-- /.article-content-inner --> <div class="tag-container-parent"> <div class="tag-container article-keyword" data-version="a"> </div> </div> <!-- /.tag-container-parent --> <div class="author-profile"> <div class="author-profile__header">創作者介紹</div> <div class="author-profile__main" id="mixpanel-author-box"> <a> <img class="author-profile__avatar" src="https://s3.1px.tw/blog/common/avatar/blog_cover_light.jpg" alt="創作者 sgusers7的部落格 的頭像" loading="lazy" /> </a> <div class="author-profile__content"> <a href="https://www.pixnet.net/pcard/sgusers7" class="author-profile__name">sgusers7</a> <p class="author-profile__info">sgusers7的部落格</p> </div> <div class="author-profile__subscribe hoverable"> <button data-follow-state="關注" class="subscribe-btn member"></button> </div> </div> </div> <!-- /.author-profile --> </div> <!-- /.article-content --> <p class="author"> sgusers7 發表在 <a href="https://www.pixnet.net">痞客邦</a> <a href="#comments">留言</a>(0) <span class="author-views">人氣( <span id="BlogArticleCount" data-stats="single" data-post-id="9331777058"> 3 </span> ) </span> </p> <!-- /.author --> <div id="pixnet-ad-content-left-right-wrapper"> <div class="left"></div> <div class="right"></div> </div> <!-- /#pixnet-ad-content-left-right-wrapper --> <div class="article-footer"> <ul class="refer"> </ul> <div class="back-to-top"> <a href="#top" title="back to the top of the page">▲top</a> </div> <div id="post-comment" class="comment-container" x-data="commentComponent({postId: '9331777058', blog_id: '4223274', allowComment: true})" x-init="init()"> <div class="post-comment__header"> <span x-text="meta.totalCount + ' 則留言'"></span> </div> <div class="post-comment__body"> <ol class="post-comment__list"> <template x-for="comment in comments" :key="comment.id"> <li class="post-comment__item"> <div class="comment-card"> <a href="#" class="comment-card__avatar-link" :aria-label="'查看 ' + comment.commenter.display_name + ' 的個人頁'"> <img class="comment-card__avatar" :src="comment.commenter.avatar" :alt="comment.commenter.display_name" loading="lazy" /> </a> <div class="comment-card__main"> <div class="comment-card__bubble"> <div class="comment-card__author-row"> <a href="#" class="comment-card__author" x-text="comment.commenter.display_name"></a> <span class="comment-card__badge comment-card__badge--author" x-show="comment.commenter.is_author">作者</span> </div> <div class="comment-card__content" x-html="comment.content"></div> </div> <!-- /.comment-card__bubble --> <div class="comment-card__meta"> <time class="comment-card__time" :datetime="comment.datetime" x-text="comment.human_time"></time> <a href="#" class="comment-card__action" x-show="isOwner()" @click.prevent="toggleReply(comment.id)">回覆</a> <a href="#" class="comment-card__action" x-show="isOwner()" :class="{ 'comment-card__action--active': comment.visibility == 1 }" @click.prevent="changeCommentVisibility(comment.id, 'show')">顯示</a> <a href="#" class="comment-card__action" x-show="isOwner()" :class="{ 'comment-card__action--active': comment.visibility == 2 }" @click.prevent="changeCommentVisibility(comment.id, 'hide')">隱藏</a> <a href="#" class="comment-card__action" x-show="isOwner()" @click.prevent="deleteComment(comment.id)">刪除</a> </div> <!-- /.comment-card__meta --> <div class="comment-card__replies"> <ol class="reply-list"> <template x-for="reply in comment.replies"> <li class="reply-list__item"> <div class="comment-card comment-card--reply" :class="{'comment-card--hidden': reply.visibility == 2 && isOwner()}"> <a href="#" class="comment-card__avatar-link" aria-label="查看 Eric 的個人頁"> <img class="comment-card__avatar" :src="reply.replyer.avatar" :alt="reply.replyer.display_name" loading="lazy" /> </a> <div class="comment-card__main"> <div class="comment-card__bubble"> <div class="comment-card__author-row"> <a :href="reply.replyer.card_url" class="comment-card__author" x-text="reply.replyer.display_name"></a> <span class="comment-card__badge comment-card__badge--author" x-show="reply.replyer.is_author">作者</span> </div> <div class="comment-card__content" x-html="reply.content"></div> </div> <div class="comment-card__meta"> <time class="comment-card__time" :datetime="reply.datetime" x-text="reply.human_time"></time> <a href="#" class="comment-card__action" x-show="isOwner()" :class="{ 'comment-card__action--active': reply.visibility == 1 }" @click.prevent="changeReplyVisibility(comment.id, reply.id, 'show')">顯示</a> <a href="#" class="comment-card__action" x-show="isOwner()" :class="{ 'comment-card__action--active': reply.visibility == 2 }" @click.prevent="changeReplyVisibility(comment.id, reply.id, 'hide')">隱藏</a> <a href="#" class="comment-card__action" x-show="isOwner()" @click.prevent="deleteReply(comment.id, reply.id)">刪除</a> </div> <!-- /.comment-card__meta --> </div> </div> </li> </template> </ol> </div> <!-- /.comment-card__replies --> <div class="comment-card__reply-editor" x-show="replyingTo === comment.id && isOwner()"> <div class="reply-editor"> <div class="reply-editor__avatar"> <img src="https://i.pravatar.cc/48?img=5"> </div> <form class="reply-editor__form"> <div class="reply-editor__input-wrap"> <textarea class="reply-editor__textarea" placeholder="寫下你的回覆..." x-model="replyDraft[comment.id].content"></textarea> </div> <div class="reply-editor__footer"> <div class="reply-editor__visibility"> <label> <input type="radio" name="reply_visibility" value="1" x-model="replyDraft[comment.id].visibility" checked> 公開回覆 </label> <label> <input type="radio" name="reply_visibility" value="2" x-model="replyDraft[comment.id].visibility"> 私密回覆 </label> </div> <div class="reply-editor__actions"> <button type="button" class="reply-editor__cancel" @click="replyingTo = null">取消</button> <button type="submit" class="reply-editor__submit" @click.prevent="submitReply(comment.id)">回覆</button> </div> </div> </form> </div> </div> <!-- /.comment-card__reply-editor --> </div> <!-- /.comment-card__main --> </div> </li> </template> <template x-if="comments.length === 0"> <li class="post-comment__item" style="text-align: center; color: #888; padding: 2rem 0;"> 沒有留言,快來搶沙發吧! </li> </template> </ol> <button class="btn-more" x-show="meta.page < meta.pageCount" @click="loadMore">載入更多</button> </div> <!-- /.post-comment__body --> <div class="post-comment__footer" x-show="allowComment"> <div class="comment-editor" x-show="isLoggedIn"> <a href="#" class="comment-editor__avatar-link" aria-label="我的個人頁"> <img class="comment-editor__avatar" :src="user?.avatar" :alt="user?.display_name" loading="lazy" /> </a> <form class="comment-editor__form" action="" method="post"> <label for="comment-message" class="comment-editor__label" x-text="'以 ' + user?.display_name + ' 身份發表留言'"></label> <div class="comment-editor__input-wrap"> <textarea id="comment-message" name="comment" class="comment-editor__textarea" rows="3" placeholder="寫下你的留言..." x-model="newComment.content"></textarea> </div> <div class="comment-editor__footer"> <div class="comment-editor__visibility"> <label class="comment-editor__visibility-option"> <input type="radio" name="visibility" value="1" x-model="newComment.visibility" checked> <span>公開留言</span> </label> <label class="comment-editor__visibility-option"> <input type="radio" name="visibility" value="2" x-model="newComment.visibility"> <span>私密留言</span> </label> </div> <div class="comment-editor__actions"> <button type="submit" class="comment-editor__button comment-editor__button--primary" @click.prevent="submitComment()"> 發佈留言 </button> </div> </div> </form> </div> <div x-show="!isLoggedIn" style="text-align: center; padding: 2rem 0;"> <p style="color: #555;">請先 <a :href="loginUrl" style="color: #007bff; text-decoration: underline;">登入</a> 以發表留言。</p> </div> </div> <!-- /.post-comment__footer --> </div> <script type="text/javascript"> function commentComponent({ postId, blog_id, allowComment }) { return { postId, blog_id, allowComment, /* ------------------------- state -------------------------- */ user: null, isLoggedIn: false, isOwner() { return this.isLoggedIn && this.user.is_blogger && this.user.blog.id === this.blog_id }, comments: [], meta: { page: 1, pageSize: 10, pageCount: 1, totalCount: 0 }, loading: false, replyingTo: null, newComment: { content: "", visibility: 1 }, replyDraft: {}, guest: { name: "", contact: "" }, get loginUrl() { return '/auth/authorize?redirect_uri=' + encodeURIComponent(location.href) }, /* ------------------------- init -------------------------- */ async init() { await this.fetchUser() await this.fetchComments() }, /* ------------------------- user -------------------------- */ async fetchUser() { try { const res = await fetch("/auth/me") if (res.status === 401) { this.isLoggedIn = false return } const user = await res.json() this.user = user this.isLoggedIn = true } catch (e) { console.error("auth error", e) } }, /* ------------------------- comments -------------------------- */ async fetchComments(page = 1) { this.loading = true const res = await fetch( `/blog/get-comments?postId=${this.postId}&page=${page}` ) const json = await res.json() this.comments = json.data this.meta = json.meta this.comments.forEach(comment => { if (!this.replyDraft[comment.id]) { this.replyDraft[comment.id] = { content: "", visibility: "1" } } }) this.loading = false }, async loadMore() { if (this.meta.page >= this.meta.pageCount) return const nextPage = this.meta.page + 1 const res = await fetch( `/blog/get-comments?postId=${this.postId}&page=${nextPage}` ) const json = await res.json() this.comments = [...this.comments, ...json.data] this.meta = json.meta }, /* ------------------------- reply editor -------------------------- */ toggleReply(commentId) { if (this.replyingTo === commentId) { this.replyingTo = null } else { this.replyingTo = commentId if (!this.replyDraft[commentId]) { this.replyDraft[commentId] = { content: "", visibility: "public" } } } }, /* ------------------------- submit comment -------------------------- */ async submitComment() { if (!this.newComment.content.trim()) return const payload = { postId: this.postId, content: this.newComment.content, visibility: this.newComment.visibility, commenter: this.isLoggedIn ? this.user.display_name : this.guest.name, contact: this.isLoggedIn ? null : this.guest.contact } const res = await fetch("/blog/post-comment", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload) }) if (!res.ok) { const errorData = await res.json() alert(errorData.message || "留言失敗,請稍後再試") return } const comment = await res.json() this.comments.push(comment) this.newComment.content = "" }, /* ------------------------- submit reply -------------------------- */ async submitReply(commentId) { if (!this.isOwner()) return const draft = this.replyDraft[commentId] if (!draft || !draft.content.trim()) return const payload = { commentId: commentId, content: draft.content, visibility: draft.visibility } try { const res = await fetch("/blog/post-reply", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload) }) if (!res.ok) { const errorData = await res.json() alert(errorData.message || "回覆失敗,請稍後再試") return } const reply = await res.json(); const comment = this.comments.find(c => c.id === commentId) if (!comment.replies) { comment.replies = [] } comment.replies.push(reply) draft.content = "" this.replyingTo = null } catch (e) { console.error("reply error", e) } }, async changeCommentVisibility(commentId, visibility) { try { const res = await fetch("/blog/comments/visibility", { method: "PATCH", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ commentId, visibility: visibility == 'show' ? 1 : 2}) }) const data = await res.json() if (!res.ok) { alert(data.message || "操作失敗") return } const comment = this.comments.find(c => c.id === commentId) if (comment) { comment.visibility = visibility == 'show' ? 1 : 2; } } catch (e) { alert("系統錯誤,請稍後再試") console.error("show comment error", e) } }, async deleteComment(commentId) { if (!confirm("確定要刪除此留言嗎?")) return try { const res = await fetch(`/blog/comments/${commentId}`, { method: "DELETE" }) const data = await res.json() if (!res.ok) { alert(data.message || "操作失敗") return } this.comments = this.comments.filter(c => c.id !== commentId) } catch (e) { console.error("delete comment error", e) } }, async changeReplyVisibility(commentId, replyId, visibility) { try { const res = await fetch("/blog/replies/visibility", { method: "PATCH", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ commentId, replyId, visibility: visibility == 'show' ? 1 : 2 }) }) const data = await res.json() if (!res.ok) { alert(data.message || "操作失敗") return } const comment = this.comments.find(c => c.id === commentId) const reply = comment.replies.find(r => r.id === replyId) if (reply) { reply.visibility = visibility == 'show' ? 1 : 2; } } catch (e) { console.error("change reply visibility error", e) } }, async deleteReply(commentId, replyId) { if (!confirm("確定要刪除此回覆嗎?")) return try { const res = await fetch(`/blog/comments/${commentId}/replies/${replyId}`, { method: "DELETE" }) const data = await res.json() if (!res.ok) { alert(data.message || "操作失敗") return } const comment = this.comments.find(c => c.id === commentId) comment.replies = comment.replies.filter(r => r.id !== replyId) } catch (e) { console.error("delete reply error", e) } }, /* ------------------------- guest avatar -------------------------- */ guestAvatar() { const name = this.guest.name || "Guest" return `https://ui-avatars.com/api/?name=${encodeURIComponent(name)}` } } } </script> <section class="rcmd-related-posts" x-data="pixPostRecommendWidget({ postId: '9331777058', limit: 3, })" > <div class="rcmd-related-posts__inner"> <div class="rcmd-related-posts__header"> <div class="rcmd-related-posts__title-wrap"> <span class="rcmd-related-posts__eyebrow">Recommended</span> <h2 class="rcmd-related-posts__title">你可能也喜歡</h2> <p class="rcmd-related-posts__desc">為你精選 3 篇值得延伸閱讀的內容</p> </div> </div> <!-- loading --> <div class="rcmd-related-posts__state" x-show="loading" x-cloak> <div class="rcmd-related-posts__loading">載入推薦文章中...</div> </div> <!-- error --> <div class="rcmd-related-posts__state" x-show="!loading && error" x-cloak> <div class="rcmd-related-posts__error" x-text="error"></div> </div> <!-- empty --> <div class="rcmd-related-posts__state" x-show="!loading && !error && posts.length === 0" x-cloak> <div class="rcmd-related-posts__empty">目前沒有推薦文章</div> </div> <!-- list --> <div class="rcmd-related-posts__grid" x-show="!loading && !error && posts.length > 0" x-cloak> <template x-for="post in posts" :key="post.id"> <article class="rcmd-post-card"> <a class="rcmd-post-card__link" :href="post.url"> <div class="rcmd-post-card__image-wrap"> <img class="rcmd-post-card__image" :src="getImage(post)" :alt="post.title" loading="lazy" > </div> <div class="rcmd-post-card__body"> <div class="rcmd-post-card__meta"> <time :datetime="post.date" x-text="formatDate(post)"></time> </div> <h3 class="rcmd-post-card__title" x-text="post.title"></h3> <p class="rcmd-post-card__summary" x-show="post.summary" x-text="post.summary" ></p> <div class="rcmd-post-card__footer"> <span class="rcmd-post-card__readmore">閱讀文章</span> </div> </div> </a> </article> </template> </div> </div> </section> <script> function pixPostRecommendWidget(config = {}) { return { postId: config.postId || '', limit: Number(config.limit || 6), endpoint: '/blog/get-widget-data?name=pixPostRecommend&postId=', loading: false, error: '', posts: [], fallbackImage: 'https://picsum.photos/seed/pixpostrecommend/800/500', async init() { if (!this.postId) { this.error = '缺少 postId'; return; } this.loading = true; this.error = ''; try { const response = await fetch(`${this.endpoint}${encodeURIComponent(this.postId)}`, { method: 'GET', headers: { 'Accept': 'application/json' } }); if (!response.ok) { throw new Error(`HTTP ${response.status}`); } const result = await response.json(); if (!result || Number(result.code) !== 0 || !Array.isArray(result.data)) { throw new Error('API 回傳格式不正確'); } this.posts = result.data .slice(0, this.limit) .map(item => ({ id: item.id, title: item.title || '', url: item.url || '#', published_at: item.published_at || '', date: item.date || '', time: item.time || '', timestamp: item.timestamp || 0, views: item.views || '', feature_image: item.feature_image || null, summary: item.summary || '', })); } catch (err) { console.error('[pixPostRecommendWidget]', err); this.error = '推薦文章載入失敗'; } finally { this.loading = false; } }, getImage(post) { return post.feature_image || this.fallbackImage; }, formatDate(post) { if (post.date) { return post.date.replace(/-/g, '/'); } return post.published_at || ''; } }; } </script> <div id="pixnet-ad-after-footer"></div> </div> <!-- /.article-footer --> </div> </div> </div> </div> </div> <div id="links"> <div id="sidebar__inner"> <div id="links-row-1"> <div id="user-info" class="hslice box"> <h4 class="box-title entry-title"></h4> <div class="box-text entry-content"> <a class="user-img" href="#"> <img src="https://s3.1px.tw/blog/common/avatar/blog_cover_light.jpg" alt="" loading="lazy" style="width: 90px; height: 90px;" /> </a> <div class="user-action hoverable"> <button data-follow-state="關注" class="subscribe-btn member" ></button> </div> <dl> <dt>暱稱:</dt> <dd>sgusers7</dd> <dt>分類:</dt> <dd> <a href="#">生活綜合</a> </dd> <dt>好友:</dt> <dd> 累積中 <!-- 共75位{" "} <a href="#" id="user-info-open-friends-iframe"> (看全部) </a> --> </dd> <dt>地區:</dt> <dd> </dd> </dl> </div> </div> <div class="hslice box" data-identifier="pixHotArticle" id="hot-article"> <h4 class="box-title entry-title"></h4> <div class="box-text entry-content"> <ul id="hotArtUl"> </ul> </div> <script> (function () { async function loadHotArticle() { const box = document.querySelector('.box[data-identifier="pixHotArticle"]'); if (!box) return; const ul = box.querySelector("#hotArtUl"); if (!ul) return; if (ul.dataset.loaded) return; ul.dataset.loaded = "1"; try { const res = await fetch("/blog/get-widget-data?name=pixHotArticle", { method: "GET", headers: { "Accept": "application/json" } }); const json = await res.json(); if (json.code !== 0 || !Array.isArray(json.data)) return; const data = json.data; const fragment = document.createDocumentFragment(); data.forEach(item => { const li = document.createElement("li"); const a = document.createElement("a"); a.href = item.url; const span = document.createElement("span"); span.textContent = "(" + item.views + ") "; a.appendChild(span); a.appendChild(document.createTextNode(item.title)); li.appendChild(a); fragment.appendChild(li); }); ul.appendChild(fragment); } catch (err) { console.error("pixHotArticle load failed", err); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", loadHotArticle); } else { loadHotArticle(); } })(); </script> </div> <div class="hslice box" data-identifier="pixCategory" id="category"> <h4 class="box-title entry-title"> </h4> <div class="box-text entry-content"> <div class="box-more"></div> </div> <script type="text/javascript"> (function () { function formatNumber(num) { return new Intl.NumberFormat().format(num || 0); } function renderFolder(item) { const wrapper = document.createElement("div"); wrapper.className = "inner-box"; const h6 = document.createElement("h6"); h6.style.cursor = "pointer"; const img = document.createElement("img"); img.src = "//pixfs.1px.tw/blog/images/choc/plus.gif"; img.width = 11; img.height = 11; img.alt = "toggle"; const ul = document.createElement("ul"); ul.className = "category-" + item.id; ul.style.display = "none"; h6.appendChild(img); h6.appendChild(document.createTextNode(" " + item.name + " (" + (item.children?.length || 0) + ")")); h6.addEventListener("click", function () { const isHidden = ul.style.display === "none"; ul.style.display = isHidden ? "block" : "none"; img.src = isHidden ? "//pixfs.1px.tw/blog/images/choc/minus.gif" : "//pixfs.1px.tw/blog/images/choc/plus.gif"; }); (item.children || []).forEach(child => { const li = document.createElement("li"); const a = document.createElement("a"); a.href = child.url; a.textContent = child.name + " (" + formatNumber(child.post_count) + ")"; li.appendChild(a); ul.appendChild(li); }); wrapper.appendChild(h6); wrapper.appendChild(ul); return wrapper; } function renderCategoryList(data) { const ul = document.createElement("ul"); data .filter(item => item.type === "category") .forEach(item => { const li = document.createElement("li"); const a = document.createElement("a"); a.href = item.url; a.textContent = item.name + " (" + formatNumber(item.post_count) + ")"; li.appendChild(a); ul.appendChild(li); }); return ul; } async function loadPixCategory() { const box = document.querySelector('.box[data-identifier="pixCategory"]'); if (!box) return; const content = box.querySelector(".box-text.entry-content"); try { const res = await fetch("/blog/get-widget-data?name=pixCategory"); const json = await res.json(); if (json.code !== 0) return; const data = json.data; data.forEach(item => { if (item.type === "folder") { content.appendChild(renderFolder(item)); } }); const categoryList = renderCategoryList(data); content.appendChild(categoryList); } catch (err) { console.error("pixCategory load failed", err); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", loadPixCategory); } else { loadPixCategory(); } })(); </script> </div> <div class="hslice box" data-identifier="pixLatestArticle" id="latest-article"> <h4 class="box-title entry-title"> </h4> <div class="box-text entry-content"> <ul id="last-article-box"> </ul> </div> <script> (function () { async function loadLatestArticle() { const box = document.querySelector('.box[data-identifier="pixLatestArticle"]'); if (!box) return; const ul = box.querySelector("#last-article-box"); if (!ul) return; try { const res = await fetch("/blog/get-widget-data?name=pixLatestArticle", { method: "GET", headers: { "Accept": "application/json" } }); const json = await res.json(); if (json.code !== 0 || !Array.isArray(json.data)) return; const data = json.data; const fragment = document.createDocumentFragment(); data.forEach(item => { const li = document.createElement("li"); const a = document.createElement("a"); a.href = item.url; a.textContent = item.title; li.appendChild(a); fragment.appendChild(li); }); ul.appendChild(fragment); } catch (err) { console.error("pixLatestArticle load failed", err); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", loadLatestArticle); } else { loadLatestArticle(); } })(); </script> </div> <div class="hslice box" data-identifier="pixLatestComment" id="last-comment"> <h4 class="box-title entry-title"> </h4> <div class="box-text entry-content"> <div class="box-more"></div> <ul id="last-comment-box"> </ul> </div> <script> (function () { function truncate(str, len = 30) { if (!str) return ""; return str.length > len ? str.slice(0, len) + "..." : str; } async function loadLatestComment() { const box = document.querySelector('.box[data-identifier="pixLatestComment"]'); if (!box) return; const ul = box.querySelector("#last-comment-box"); if (!ul) return; if (ul.dataset.loaded) return; ul.dataset.loaded = "1"; try { const res = await fetch("/blog/get-widget-data?name=pixLatestComment"); const json = await res.json(); if (json.code !== 0 || !Array.isArray(json.data)) return; const fragment = document.createDocumentFragment(); json.data.forEach(item => { const li = document.createElement("li"); const a = document.createElement("a"); a.href = item.url; const title = truncate(item.post_title, 25); a.textContent = `[${item.time}] ${item.commenter} 於文章「${title}」`; li.appendChild(a); if (item.visibility === "public") { li.appendChild(document.createTextNode("留言:")); const br = document.createElement("br"); li.appendChild(br); li.appendChild(document.createTextNode(item.content)); } else { li.appendChild( document.createTextNode("發表了一則私密留言") ); } fragment.appendChild(li); }); ul.appendChild(fragment); } catch (err) { console.error("pixLatestComment load failed", err); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", loadLatestComment); } else { loadLatestComment(); } })(); </script> </div> <div class="hslice box" data-identifier="pixHits" id="counter"> <h4 class="box-title entry-title">參觀人氣</h4> <div class="box-text entry-content"> <ul> <li>本日人氣:<span id="blog_hit_daily"></span></li> <li>累積人氣:<span id="blog_hit_total"></span></li> </ul> </div> <script> (function () { async function loadPixHits() { const box = document.querySelector("#counter"); if (!box) return; const dailyEl = box.querySelector("#blog_hit_daily"); const totalEl = box.querySelector("#blog_hit_total"); if (!dailyEl || !totalEl) return; // 避免重複載入 if (box.dataset.loaded) return; box.dataset.loaded = "1"; try { const res = await fetch("/blog/get-widget-data?name=pixHits", { method: "GET", headers: { "Accept": "application/json" } }); const json = await res.json(); if (json.code !== 0 || !json.data) return; const data = json.data; dailyEl.textContent = data.views_today ?? "0"; totalEl.textContent = data.views_total ?? "0"; } catch (err) { console.error("pixHits load failed", err); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", loadPixHits); } else { loadPixHits(); } })(); </script> </div> </div> <div id="links-row-2"> <div id="sticky-sidebar-ad"></div> </div> </div> </div> </div> <div id="footer"> </div> <img src="/api/track/pv?postId=9331777058" alt="Blog Stats" width="1" height="1" style="display:none;" /> <script type="text/javascript" async src="https://static.1px.tw/blog/v1p2/js/stats.min.js?v=1783064100"></script> </div> <div id="extradiv11"></div> <div id="extradiv10"></div> <div id="extradiv9"></div> <div id="extradiv8"></div> </div> <div id="extradiv7"></div> <div id="extradiv6"></div> <div id="extradiv5"></div> <div id="extradiv4"></div> </div> <div id="extradiv3"></div> <div id="extradiv2"></div> <div id="extradiv1"></div> <div id="extradiv0"></div> </div> </div> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TRLQMPKX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <!-- Pixnet SDK --> <script type="text/javascript"> document.addEventListener("DOMContentLoaded", function () { // datalayer push event window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'hydration_complete' }) }); </script> <!-- End Pixnet SDK --> <div x-data="adultWarning()" x-init="init()" x-show="visible" x-cloak class="aw-overlay" :class="{ 'mobile': isMobile }" > <div class="aw-modal"> <div class="aw-icon"> ⚠️ </div> <h2 class="aw-title">成人內容提醒</h2> <p class="aw-desc"> 本部落格內容僅限年滿十八歲者瀏覽。<br> 若您未滿十八歲,請立即離開。 </p> <p class="aw-sub"> 已滿十八歲者,亦請勿將內容提供給未成年人士。 </p> <div class="aw-actions"> <button class="aw-btn primary" @click="accept()">我已滿18歲</button> <button class="aw-btn secondary" @click="decline()">離開</button> </div> </div> </div> <script> document.addEventListener('alpine:init', () => { Alpine.data('adultWarning', () => ({ visible: false, isMobile: false, storageKey: 'adult_warning_accepted_at', init() { this.isMobile = window.innerWidth < 768; if (!window.PIXNET?.options?.AdultWarning) return; const ts = localStorage.getItem(this.storageKey); if (ts && Date.now() - parseInt(ts) < 4 * 60 * 60 * 1000) return; this.visible = true; // 🔒 防止背景滾動 document.body.classList.add('modal-open'); }, accept() { localStorage.setItem(this.storageKey, Date.now().toString()); this.close(); }, decline() { window.location.href = 'https://www.pixnet.net/'; // 或其他安全的網站 }, close() { this.visible = false; document.body.classList.remove('modal-open'); } })) }) </script> <!-- end of adult warning --> <!-- PIXNET Tracking --> <script async type="text/javascript" src="https://static.1px.tw/blog/v1p2/lib/tracking.min.js?v=1783064100"></script> <!-- End PIXNET Tracking --> </body> </html>