Skip to content

Commit c81507a

Browse files
committed
test2
1 parent 7f2c45e commit c81507a

2 files changed

Lines changed: 78 additions & 34 deletions

File tree

_includes/bnl_download-box.html

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
1-
<div class="download-box">
2-
<a href="{{ include.file }}">
1+
<div class="download-box {% if include.disabled %}disabled{% endif %}">
2+
{% if include.disabled %}
3+
<span class="download-btn">
34
Download
45
{% if include.filename and include.filename != "" %}
56
{{ include.filename }}
67
{% else %}
78
{{ include.file | split:'/' | last }}
89
{% endif %}
9-
</a><br>
10-
{% if include.description and include.description != "" %}
11-
{{ include.description }} /
12-
{% endif %}
13-
password: <span class="password">{{ include.password }}</span>
10+
</span>
11+
{% else %}
12+
<a href="{{ include.file }}" class="download-btn">
13+
Download
14+
{% if include.filename and include.filename != "" %}
15+
{{ include.filename }}
16+
{% else %}
17+
{{ include.file | split:'/' | last }}
18+
{% endif %}
19+
</a>
20+
{% endif %}
21+
22+
<br>
23+
24+
{% if include.description and include.description != "" %}
25+
{{ include.description }} /
26+
{% endif %}
27+
28+
password: <span class="password">{{ include.password }}</span>
1429
</div>

_sass/bluenlive/_contents.scss

Lines changed: 56 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,42 +14,71 @@
1414
* 다운로드 아이콘 및 password
1515
***---------------------------------------------------*/
1616

17-
.download-box {
18-
text-align: center; /* 영역 전체 가운데 정렬 */
17+
.download-box {
18+
text-align: center;
1919
margin: 1.2em auto;
2020
line-height: 1.4;
21-
}
2221

23-
.download-box a {
24-
display: inline-block;
25-
padding: 0.9em 1.8em;
26-
border-radius: 6px;
27-
background-color: #ffffff;
28-
border: 2px solid #2f5ca8;
29-
color: #2f5ca8;
30-
font-size: 1.15em;
31-
font-weight: 700;
32-
text-decoration: none;
33-
transition: all 0.2s ease-in-out;
34-
box-shadow: 0 3px 8px rgba(0,0,0,0.12);
35-
margin-bottom: 0.15em;
36-
37-
&:hover {
38-
background-color: #2f5ca8;
39-
color: #ffffff;
40-
transform: translateY(-2px);
41-
box-shadow: 0 5px 12px rgba(0,0,0,0.18);
22+
// 공통 버튼 스타일 (a와 span 모두에 적용)
23+
.download-btn {
24+
display: inline-block;
25+
padding: 0.9em 1.8em;
26+
border-radius: 6px;
27+
background-color: #ffffff;
28+
border: 2px solid #2f5ca8;
29+
color: #2f5ca8;
30+
font-size: 1.15em;
31+
font-weight: 700;
32+
text-decoration: none;
33+
transition: all 0.2s ease-in-out;
34+
box-shadow: 0 3px 8px rgba(0,0,0,0.12);
35+
margin-bottom: 0.15em;
36+
37+
&:hover {
38+
background-color: #2f5ca8;
39+
color: #ffffff;
40+
transform: translateY(-2px);
41+
box-shadow: 0 5px 12px rgba(0,0,0,0.18);
42+
}
43+
44+
&:active {
45+
transform: translateY(1px);
46+
box-shadow: 0 2px 6px rgba(0,0,0,0.15);
47+
}
4248
}
4349

44-
&:active {
45-
transform: translateY(1px); /* 클릭 시 아래로 눌린 듯 */
46-
box-shadow: 0 2px 6px rgba(0,0,0,0.15); /* 그림자 줄여서 눌린 느낌 */
50+
// 비활성화 상태 스타일
51+
&.disabled {
52+
.download-btn {
53+
border-color: #ccc; /* 회색 테두리 */
54+
color: #999; /* 회색 글자 */
55+
background-color: #f5f5f5; /* 연회색 배경 */
56+
cursor: default; /* 커서 변화 방지 */
57+
box-shadow: none; /* 그림자 제거 혹은 약하게 */
58+
59+
// 호버 및 클릭 효과 무력화
60+
&:hover, &:active {
61+
background-color: #f5f5f5;
62+
color: #999;
63+
transform: none;
64+
box-shadow: none;
65+
}
66+
}
67+
68+
// 비밀번호 색상도 함께 흐리게 처리 (선택 사항)
69+
.password {
70+
color: #aaa;
71+
text-decoration: line-through; /* 만료된 느낌을 위해 취소선 추가 가능 */
72+
}
73+
74+
// 전체적인 텍스트 색상 조정
75+
color: #999;
4776
}
4877
}
4978

50-
/* 비밀번호 표시 */
79+
/* 기존 password 스타일 유지 */
5180
.password {
52-
color: #d32f2f; /* 강한 빨강 */
81+
color: #d32f2f;
5382
font-size: 1.3em;
5483
font-weight: bold;
5584
margin-top: 0.6em;

0 commit comments

Comments
 (0)