올 초부터 옵시디언을 사용하기 시작하며 그간 생소했던 마크다운 문법과 CSS 등을 배우고 있다.
동네 사람들 모두 에버노트 쓸 때도, 번거롭고 유료 앱이라고 쓰기를 거부했던 나였는데...
이젠 출근과 동시에 옵시디언부터 무조건 키고 하루를 시작한다.
GPT 유료 버전에 한 번 맛들린 후로 정보화 도구의 활용도에 따라서 얼마나 삶의 질이 달라질 수 있는가를 체험한 것이 컸다.
작년, 교육청에서 교원들의 정보화 역량 증진을 위해 10만워 가량의 바우처를 지급했었는데, 처음 받을 당시엔 왜 이런 귀찮은 일을 또 시키나... 했었건만, 결과적으로 나같은 사람 한 명은 본청의 계획대로(?) 변하고야 말았다.
잡설이 길었는데...
여하튼, 마크다운 문법에 익숙해지다보니 자연스럽게 밀쳐두었던 티스토리 블로그도 다시 살려볼까 싶어 쪼물딱거리는 중이다.
아무래도 모든 업무 환경이 다크모드인지라, 내 눈에 편하게 꾸며보자는 심산으로 CSS를 건드는 중이다.
이번에도 GPT가 큰 역할을 했다.
혹시나 필요하신 분이라면 아래의 코드블럭을 참고하시길 바란다.
물론, 디테일한 부분에선 문제가 남아있다.
이 부분은 내가 놓친 부분일 수도 있고, 나의 공부가 부족해서 제대로 대응하지 못하는 부분일 수도 있다.
그럼에도 누군가가 참고할 만한 자료로 쓰이길 바라며 기록으로 남겨둔다.
PS. 현재 스킨의 완성본은 코드가 다듬어지는 대로 백업을 위해 올려둬볼까 싶다.
/*
===================================================================
만년교생의 티스토리 블로그 다크모드 & UI 커스터마이징 스타일 정리
===================================================================
📌 이 문서는 다크모드 환경에서 티스토리 블로그를 보다 깔끔하고 일관되게 보이도록 하기 위해 적용한 CSS를 정리한 것입니다.
📌 ChatGPT를 활용하여 작성되었으며, 디테일한 수정을 위해 오리지널 CSS에도 수정이 들어갔습니다.
🧩 주요 목적:
- 전체 배경 및 텍스트 색상 통일
- 헤딩 스타일 색상 커스터마이징
- hover 시 레이아웃 깨짐 방지
- 사이드바 및 썸네일 영역의 통일감 유지
⚠️ 주의사항:
- 모든 색상은 `prefers-color-scheme: dark` 조건에서만 작동합니다.
- 스킨 구조마다 class명이 다를 수 있으므로 반드시 사전 테스트 필요
- `!important`는 필요한 경우에만 사용하며, 우선순위가 꼬일 수 있으니 주의
*/
/* ===================================================================
1. 다크모드 전체 스타일 적용
=================================================================== */
@media (prefers-color-scheme: dark) {
/* 공통 배경 및 텍스트 */
body,
.comment-list ul li ul {
background-color: #1e1e1e !important;
color: #e0e0e0 !important;
font-family: 'Pretendard', ChosunGu;
}
/* 본문 텍스트 및 첨부파일 */
#content,
.entry-content,
.entry-content p,
.entry-content li,
.entry-content span,
.attachment,
.file-name {
color: #e0e0e0 !important;
}
/* 헤더 제목 영역 */
#header h1 {
background-color: #1e1e1e !important;
color: #e0e0e0 !important;
}
/* 사이드바 및 링크 영역 */
.box_header .link_logo,
.area_sidebar .tt_category,
.area_sidebar .link_item,
.area_sidebar .link_sub_item,
.area_sidebar .t_menu_home a,
.area_sidebar .t_menu_tag a,
.area_sidebar .t_menu_guestbook a,
.area_sidebar .link_tool,
.area_sidebar .link_add,
.area_sidebar .btn_close,
.area_popup .link_logo {
color: #e0e0e0 !important;
}
/* 검색 돋보기 아이콘 */
#header .util .search::before {
background-color: transparent !important;
border: none !important;
filter: brightness(0.8) !important;
}
/* 본문 헤딩 스타일: 파스텔 계열 색상 사용 */
#content h1, #content h2, #content h3,
#content h4, #content h5, #content h6 {
margin-top: 1em;
margin-bottom: 0.1em;
font-weight: bold;
font-family: 'Pretendard', ChosunGu;
}
#content h1 { font-size: 1.5em; color: #f28b82 !important; }
#content h2 { font-size: 1.4em; color: #ffb74d !important; }
#content h3 { font-size: 1.3em; color: #fff176 !important; }
#content h4 { font-size: 1.2em; color: #81c784 !important; }
#content h5 { font-size: 1.1em; color: #64b5f6 !important; }
#content h6 { font-size: 1.0em; color: #9575cd !important; }
/* 본문 링크 스타일 */
#content a:link {
color: #b6cdfb !important;
}
#content a:visited {
color: #fed8ff !important;
}
#content a:hover,
#content a:active {
text-decoration: underline !important;
}
/* 본문 외 링크 스타일 */
a:not(#content a) {
color: #e0e0e0 !important;
text-decoration: none !important;
}
a:not(#content a):hover,
a:not(#content a):active {
color: #ffffff !important;
text-decoration: underline !important;
}
/* 기타 공통 UI 영역 배경 처리 */
.info_profile,
.list_toolbar,
.wrap_list,
.area_sidebar .inner_sidebar,
.area_popup,
textarea,
#wf-form,
#container .wf-form {
background-color: #2a2a2a !important;
color: #e0e0e0 !important;
}
/* GNB 영역 제거 */
#gnb {
display: none !important;
}
/* 모바일 환경에서 헤더 배경 고정 */
@media screen and (max-width: 767px) {
#header h1 {
background-color: #1e1e1e !important;
}
}
/* ===================================================================
2. 공통 Hover 효과 및 그림자 강조
=================================================================== */
:root {
--ambient-purple: rgba(178, 132, 255, 0.25);
--ambient-glow: 0 0 12px 3px var(--ambient-purple);
}
/* 카드형 글 요소 */
.post-item,
.cover-thumbnail,
.cover-list li,
.article {
transition: box-shadow 0.3s ease, background-color 0.3s ease;
border-radius: 8px;
padding: 0 !important;
}
.post-item:hover,
.cover-thumbnail:hover,
.cover-list li:hover,
.article:hover {
box-shadow: var(--ambient-glow);
background-color: rgba(178, 132, 255, 0.05);
}
/* 사이드바 항목 */
.area_sidebar .link_item,
.area_sidebar .link_sub_item,
.area_sidebar .tt_category,
.sidebar .category_list > li {
transition: box-shadow 0.3s ease, background-color 0.3s ease;
border-radius: 10px;
}
.area_sidebar .link_item:hover,
.area_sidebar .link_sub_item:hover,
.area_sidebar .tt_category:hover,
.sidebar .category_list > li:hover {
box-shadow: var(--ambient-glow);
background-color: rgba(178, 132, 255, 0.07);
}
.sidebar .category_list > li > a:hover {
color: #ffffff;
}
.sidebar .category_list li ul li a:hover {
background-color: rgba(178, 132, 255, 0.12);
color: #ffffff;
}
/* ===================================================================
3. 네임카드 숨기기
=================================================================== */
div[data-tistory-react-app="Namecard"] {
display: none; /* 보이지 않기 */
}
/* ===================================================================
4. 수정/삭제 팝업 메뉴 스타일
=================================================================== */
.my_edit .layer_edit {
background-color: #1e1e1e !important;
color: #e0e0e0 !important;
border: 1px solid #3a3a3a !important;
border-radius: 4px;
}
.my_edit .layer_edit li a {
display: block;
padding: 8px 16px;
color: #e0e0e0 !important;
text-decoration: none;
transition: background-color 0.2s ease;
}
.my_edit .layer_edit li a:hover {
background-color: #333333 !important;
color: #ffffff !important;
}
/* ===================================================================
5. 사이드바 카테고리 메뉴
=================================================================== */
.sidebar .category_list > li {
background-color: #2b2b2b;
border-radius: 10px;
margin-bottom: 6px;
transition: background-color 0.3s ease;
}
.sidebar .category_list > li > a {
display: block;
color: #f0f0f0;
padding: 10px 16px;
text-decoration: none;
font-weight: 500;
}
.sidebar .category_list li ul {
display: block;
padding: 8px 0 8px 16px;
background-color: #1e1e1e;
border-radius: 0 0 10px 10px;
}
.sidebar .category_list li ul li a {
display: block;
color: #cccccc;
padding: 6px 10px;
text-decoration: none;
font-size: 0.95em;
border-radius: 6px;
transition: background-color 0.2s ease;
}
/* 만년교생의 커스터마이징 끝 */
'590. 기반연구 > About Tistory' 카테고리의 다른 글
다크모드에서 Syntax Highlight가 출력되지 않는 문제 해결 방법 (0) | 2025.03.31 |
---|---|
CSS 편집으로 네임카드 숨기기 (0) | 2025.03.30 |
CSS가 안 먹힌다고? (0) | 2023.09.04 |
티스토리에 적응하는 것이 쉽지가 않다. (0) | 2023.08.31 |
티스토리 블로그를 시작합니다. (0) | 2023.08.22 |