/* 단일 글: 첫 요소 상단 여백 제거(테마 상단 margin/padding 무력화) */
body.item-view .post-body { padding-top:0 !important; }
body.item-view .post-body > *:first-child { margin-top:0 !important; }
/* 목록/라벨/아카이브에서는 썸네일 블록을 보이게 유지 */
body.index-view .post-body .only-list-thumb,
body.label-view .post-body .only-list-thumb,
body.archive-view .post-body .only-list-thumb { display:block !important; }
body.item-view #content-first { margin-top: -120px !important; }
/* 단일 글에서만: 썸네일 블록과 앞쪽 빈 단락/래퍼를 완전히 제거 */
(function () {
if (!document.body.classList.contains(‘item-view’)) return;
const body = document.querySelector(‘.post-body’);
if (!body) return;
// 1) 썸네일 전용 블록 제거(단일 글 공백 원흉)
body.querySelectorAll(‘.only-list-thumb’).forEach(el => el.remove());
// 2) 에디터가 감싼 래퍼(.separator 등) 중, 위 블록만 포함한 요소 제거
body.querySelectorAll(‘.separator, p, div’).forEach(el => {
const hasImgOnlyThumb = el.querySelector(‘.only-list-thumb’);
if (hasImgOnlyThumb) el.remove();
});
// 3) 본문 시작부의 빈 요소(p/br 등) 5개까지 정리
let node = body.firstElementChild, guard = 0;
while (node && guard < 5) {
const next = node.nextElementSibling;
const isEmpty =
node.tagName === 'BR' ||
(node.textContent.trim() === '' &&
!node.querySelector('img, video, iframe, svg, canvas'));
if (isEmpty) node.remove(); else break;
node = next; guard++;
}
})();
/* 셀렉트 기본 스타일 (브라우저 호환) */
.fl-select{width:100%;height:44px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;padding:0 12px;font-weight:800}
.fl-tab.on{background:#17a6e6 !important;color:#fff !important}
(function(){
var API = “https://gs25deocksu-fortune.t01040454570.workers.dev/api/fortune_html”;
// 오늘
var t = new Date();
document.getElementById(“fl-today”).textContent =
t.toLocaleDateString(“ko-KR”,{year:”numeric”,month:”long”,day:”numeric”,weekday:”short”});
// 상태
var state = {
cal: “solar”, leap: 0,
y: t.getFullYear(), m: t.getMonth()+1, d: t.getDate(), h: 0
};
// 요소
var $year = document.getElementById(“fl-year”);
var $month= document.getElementById(“fl-month”);
var $day = document.getElementById(“fl-day”);
var $hour = document.getElementById(“fl-hour”);
var $name = document.getElementById(“fl-name”);
var $out = document.getElementById(“fl-out”);
var $tabs = document.querySelectorAll(“.fl-tab”);
var $leapWrap = document.getElementById(“fl-leap-wrap”);
var $leap = document.getElementById(“fl-leap”);
// 드롭다운 채우기
function fillYear(){
$year.innerHTML = “”;
var now = new Date().getFullYear();
for (var y=now; y>=1900; y–){
var o=document.createElement(“option”);
o.value=y; o.textContent=y+”년”; if (y===state.y) o.selected=true;
$year.appendChild(o);
}
}
function fillMonth(){
$month.innerHTML = “”;
for (var m=1;mmax) state.d=max;
$day.innerHTML = “”;
for (var d=1; d<=max; d++){
var o=document.createElement("option");
o.value=d; o.textContent=d+"일"; if (d===state.d) o.selected=true;
$day.appendChild(o);
}
}
function fillHour(){
$hour.innerHTML = "";
for (var h=0; hb.classList.remove(“on”));
this.classList.add(“on”);
state.cal = this.dataset.cal; // “solar” / “lunar”
$leapWrap.style.display = (state.cal===”lunar” ? “inline-block” : “none”);
});
});
$leap.onchange = function(){ state.leap = this.checked?1:0; };
// 초기화
document.getElementById(“fl-reset”).onclick = function(){
var now = new Date();
state = { cal:”solar”, leap:0, y:now.getFullYear(), m:now.getMonth()+1, d:now.getDate(), h:0 };
document.querySelector(‘[data-cal=”solar”]’).click();
$leap.checked = false; $name.value=””;
fillYear(); fillMonth(); fillDay(); fillHour();
$out.innerHTML = ‘
‘;
};
// 운세 보기
document.getElementById(“fl-run”).onclick = function(){
var qs = new URLSearchParams({
y: state.y, m: state.m, d: state.d, h: state.h,
tz: “Asia/Seoul”, lang: “ko”, cal: state.cal, leap: state.leap
});
var nm = ($name.value || “”).trim();
if (nm) qs.set(“name”, nm);
// 호출
fetch(API + “?” + qs.toString(), { cache:”no-store” })
.then(function(r){ return r.text(); })
.then(function(html){ $out.innerHTML = html; })
.catch(function(e){ $out.innerHTML = ‘오류: ‘+ e.message; });
};
})();
![AI가 알려주는 오늘의 운세 [GS25 포항 덕수점]](https://gs25deocksu.com/wp-content/uploads/2026/08/AI가-알려주는-오늘의-운세.png)