Skip to content

Commit 7051d21

Browse files
authored
Merge pull request #157 from YoonKeumJae/YoonKeumJae/fix
[fix] 색상 변수 생성 및 적용
2 parents 49cdf1d + 3eb8626 commit 7051d21

6 files changed

Lines changed: 51 additions & 3 deletions

File tree

index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
<body
3030
class="bg-background-light dark:bg-background-dark h-full flex-col text-base dark:text-white"
3131
>
32+
<!-- 숨겨진 div: Tailwind가 사용할 클래스들을 강제 인식하게 함 -->
33+
<div class="hidden bg-docker-primary bg-docker-hover text-docker-link"></div>
34+
3235
<!-- 최상단 헤더 -->
3336
<header-component></header-component>
3437

src/scripts/components/button-component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default class ButtonComponent extends HTMLElement {
2121

2222
this.innerHTML = `
2323
<button type="button" class="not-prose my-4">
24-
<a href="${href}" class="cursor-pointer py-2 px-4 rounded bg-[#086dd7] hover:bg-[#2560ff] text-white!">
24+
<a href="${href}" class="cursor-pointer py-2 px-4 rounded bg-docker-primary hover:bg-docker-hover text-white!">
2525
${title}
2626
</a>
2727
</button>

src/scripts/components/footer-component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class FooterComponent extends HTMLElement {
55

66
connectedCallback() {
77
this.innerHTML = `
8-
<footer class="w-screen text-center py-4 bg-[#086dd7] text-white relative bottom-0">
8+
<footer class="w-screen text-center py-4 bg-docker-primary text-white relative bottom-0">
99
© 2025 Docker 한국어 문서 프로젝트 |
1010
<a href="https://github.com/docker-ko/docker-ko.github.io" class="hover:underline text-[#b0c4de]">GitHub</a>
1111
</footer>

src/scripts/components/header-component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class HeaderComponent extends HTMLElement {
2424

2525
connectedCallback() {
2626
this.innerHTML = `
27-
<header class="w-full sticky top-0 z-20 h-16 px-6 text-white bg-[#086dd7]">
27+
<header class="w-full sticky top-0 z-20 h-16 px-6 text-white bg-docker-primary">
2828
<div class="max-w-[1920px] mx-auto flex lg:gap-8 gap-2 h-full items-center justify-between">
2929
<div class="flex h-full items-center lg:gap-8 gap-2">
3030
<div>

src/styles/content_style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
#content pre {
6666
padding: 0.5rem;
6767
border: 2px solid #e1e2e6;
68+
background: #f8f9fa;
6869
border-radius: 8px;
6970
overflow-x: auto;
7071
line-height: 1.5;

tailwind.config.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,48 @@ module.exports = {
66
'./public/**/*.md',
77
'./src/scripts/components/*.{js,ts,jsx,tsx}'
88
],
9+
safelist: [
10+
'bg-docker-primary',
11+
'bg-docker-hover',
12+
'text-docker-link',
13+
'border-border-light',
14+
'border-border-primary',
15+
'bg-surface-card',
16+
'bg-surface-code',
17+
'border-surface-code-border'
18+
],
19+
theme: {
20+
extend: {
21+
colors: {
22+
// Docker 브랜드 색상
23+
'docker-primary': '#086dd7', // 메인 브랜드 블루
24+
'docker-hover': '#2560ff', // 호버 시 블루
25+
'docker-link': '#007bff', // 링크 색상
26+
27+
// 배경 색상
28+
'bg-light': '#ffffff', // 라이트 모드 배경
29+
'bg-dark': '#1a1a1a', // 다크 모드 배경
30+
'bg-sidebar': '#f9f9fa', // 사이드바 배경
31+
32+
// 텍스트 색상
33+
'txt-primary': '#222222', // 메인 텍스트
34+
'txt-secondary': '#444444', // 서브 텍스트
35+
'txt-muted': '#555555', // 음소거된 텍스트
36+
'txt-inverse': '#ffffff', // 역방향 텍스트 (다크 배경에서)
37+
'txt-black': '#000000', // 순수 검정
38+
39+
// 테두리 색상
40+
'border-light': '#e1e2e6', // 기본 테두리
41+
'border-primary': '#007bff', // 강조 테두리 (blockquote 등)
42+
43+
// 회색 계열 (다크모드 지원)
44+
'gray-dark-100': '#2d2d2d', // 다크모드 회색
45+
46+
// 상태별 색상
47+
'surface-card': '#ffffff', // 카드 배경
48+
'surface-code': '#f8f9fa', // 코드 블록 배경
49+
'surface-code-border': '#e1e2e6', // 코드 블록 테두리
50+
}
51+
}
52+
}
953
};

0 commit comments

Comments
 (0)