cdnhost 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_search_banner.css +107 -0
- package/_search_banner.js +62 -89
- package/package.json +1 -1
- package/_fr.png +0 -0
- package/_ham.png +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
|
|
2
|
+
.fhl-widget-wrapper {
|
|
3
|
+
position: fixed;
|
|
4
|
+
z-index: 1000;
|
|
5
|
+
bottom: 15px;
|
|
6
|
+
left: 50%;
|
|
7
|
+
transform: translateX(-50%);
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
gap: 8px;
|
|
11
|
+
height: 48px;
|
|
12
|
+
width: calc(100% - 30px);
|
|
13
|
+
max-width: 480px;
|
|
14
|
+
padding: 0 8px 0 12px;
|
|
15
|
+
margin: 0;
|
|
16
|
+
border-radius: 14px;
|
|
17
|
+
background-color: rgba(255, 255, 255, 0.95);
|
|
18
|
+
backdrop-filter: blur(10px);
|
|
19
|
+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
|
|
20
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.fhl-widget-wrapper *, .fhl-widget-wrapper *::before, .fhl-widget-wrapper *::after {
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.fhl-widget-wrapper .fhl-search-input {
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
width: 60px;
|
|
30
|
+
height: 32px;
|
|
31
|
+
padding: 0 4px;
|
|
32
|
+
margin: 0;
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
color: #333;
|
|
35
|
+
background-color: transparent;
|
|
36
|
+
border: none;
|
|
37
|
+
border-bottom: 1px solid #ccc;
|
|
38
|
+
border-radius: 0;
|
|
39
|
+
-webkit-appearance: none;
|
|
40
|
+
}
|
|
41
|
+
.fhl-widget-wrapper .fhl-search-input:focus {
|
|
42
|
+
outline: none;
|
|
43
|
+
border-bottom-color: #007bff;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.fhl-widget-wrapper .fhl-list-container {
|
|
47
|
+
flex: 1;
|
|
48
|
+
min-width: 0;
|
|
49
|
+
height: 100%;
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
gap: 8px;
|
|
53
|
+
overflow-x: auto;
|
|
54
|
+
padding: 0;
|
|
55
|
+
margin: 0;
|
|
56
|
+
scroll-behavior: smooth;
|
|
57
|
+
-ms-overflow-style: none;
|
|
58
|
+
scrollbar-width: none;
|
|
59
|
+
}
|
|
60
|
+
.fhl-widget-wrapper .fhl-list-container::-webkit-scrollbar {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.fhl-widget-wrapper .fhl-list-item {
|
|
65
|
+
flex-shrink: 0;
|
|
66
|
+
display: block;
|
|
67
|
+
padding: 7px 14px;
|
|
68
|
+
margin: 0;
|
|
69
|
+
font-size: 14px;
|
|
70
|
+
font-weight: 500;
|
|
71
|
+
color: #333;
|
|
72
|
+
text-decoration: none;
|
|
73
|
+
white-space: nowrap;
|
|
74
|
+
background-color: #f1f1f1;
|
|
75
|
+
border: 1px solid #ddd;
|
|
76
|
+
border-radius: 10px;
|
|
77
|
+
transition: background-color 0.2s ease;
|
|
78
|
+
}
|
|
79
|
+
.fhl-widget-wrapper .fhl-list-item:hover {
|
|
80
|
+
background-color: #e5e5e5;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.fhl-widget-wrapper .fhl-scroll-arrow {
|
|
84
|
+
flex-shrink: 0;
|
|
85
|
+
width: 32px;
|
|
86
|
+
height: 32px;
|
|
87
|
+
padding: 0;
|
|
88
|
+
margin: 0;
|
|
89
|
+
font-size: 18px;
|
|
90
|
+
font-weight: bold;
|
|
91
|
+
color: white;
|
|
92
|
+
background-color: #007bff;
|
|
93
|
+
border: none;
|
|
94
|
+
border-radius: 50%;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
display: flex;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
align-items: center;
|
|
99
|
+
}
|
|
100
|
+
@media (min-width: 600px) {
|
|
101
|
+
.fhl-widget-wrapper {
|
|
102
|
+
left: auto;
|
|
103
|
+
right: 20px;
|
|
104
|
+
transform: none;
|
|
105
|
+
width: auto;
|
|
106
|
+
}
|
|
107
|
+
}
|
package/_search_banner.js
CHANGED
|
@@ -1,98 +1,71 @@
|
|
|
1
|
-
document.addEventListener("DOMContentLoaded", function () {
|
|
2
|
-
const links = [
|
|
3
|
-
{ href: "https://099.kr", text: "AI매지션" },
|
|
4
|
-
{ href: "https://logig.im", text: "로긱" },
|
|
5
|
-
{ href: "https://blog.099.kr", text: "블로긱" },
|
|
6
|
-
{ href: "https://snapp.im", text: "스냅" },
|
|
7
|
-
{ href: "https://seekr.kr", text: "시커" },
|
|
8
|
-
{ href: "https://adsense.ko-kr.workers.dev", text: "애드센스포럼" },
|
|
9
|
-
{ href: "https://youtube.ko-kr.workers.dev", text: "유튜브포럼" },
|
|
10
|
-
{ href: "https://199.kr", text: "해외주식갤러리" },
|
|
11
|
-
{ href: "https://919.kr", text: "미국주식갤러리" },
|
|
12
|
-
{ href: "https://ranovel.kr", text: "라노벨KR" },
|
|
13
|
-
{ href: "https://manatoki.kr", text: "유머토끼" },
|
|
14
|
-
{ href: "https://hham.ko-kr.workers.dev", text: "유머햄" },
|
|
15
|
-
{ href: "https://wallpaper.ko-kr.workers.dev", text: "배경화면포럼" },
|
|
16
|
-
];
|
|
17
1
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
text-decoration:none;white-space:nowrap;background:#f1f1f1;border:1px solid #ddd;border-radius:10px;
|
|
35
|
-
transition:background-color .2s ease}
|
|
36
|
-
.fhl-list-item:hover{background:#e5e5e5}
|
|
37
|
-
.fhl-scroll-arrow{flex-shrink:0;width:32px;height:32px;padding:0;margin:0;font-size:18px;font-weight:700;color:#fff;
|
|
38
|
-
background:#007bff;border:none;border-radius:50%;cursor:pointer;display:flex;justify-content:center;align-items:center}
|
|
39
|
-
@media(min-width:600px){.fhl-widget-wrapper{left:auto;right:20px;transform:none;width:auto}}
|
|
40
|
-
`;
|
|
41
|
-
document.head.appendChild(style);
|
|
2
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
3
|
+
const itemsData = [
|
|
4
|
+
{ name: 'AI매지션', url: 'https://099.kr' },
|
|
5
|
+
{ name: '로긱', url: 'https://logig.im' },
|
|
6
|
+
{ name: '블로긱', url: 'https://blog.099.kr' },
|
|
7
|
+
{ name: '스냅', url: 'https://snapp.im' },
|
|
8
|
+
{ name: '시커', url: 'https://seekr.kr' },
|
|
9
|
+
{ name: '애드센스포럼', url: 'https://adsense.ko-kr.workers.dev' },
|
|
10
|
+
{ name: '유튜브포럼', url: 'https://youtube.ko-kr.workers.dev' },
|
|
11
|
+
{ name: '배경화면포럼', url: 'https://wallpaper.ko-kr.workers.dev' },
|
|
12
|
+
{ name: '유머햄', url: 'https://hham.ko-kr.workers.dev' },
|
|
13
|
+
{ name: '해외주식갤러리', url: 'https://199.kr' },
|
|
14
|
+
{ name: '미국주식갤러리', url: 'https://919.kr' },
|
|
15
|
+
{ name: '라노벨KR', url: 'https://ranovel.kr' },
|
|
16
|
+
{ name: '유머토끼', url: 'https://manatoki.kr' },
|
|
17
|
+
];
|
|
42
18
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
wrapper.className = "fhl-widget-wrapper";
|
|
19
|
+
const fhlWidgetWrapper = document.createElement('div');
|
|
20
|
+
fhlWidgetWrapper.className = 'fhl-widget-wrapper';
|
|
46
21
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
wrapper.appendChild(searchInput);
|
|
22
|
+
const fhlSearchInput = document.createElement('input');
|
|
23
|
+
fhlSearchInput.type = 'text';
|
|
24
|
+
fhlSearchInput.className = 'fhl-search-input';
|
|
25
|
+
fhlSearchInput.placeholder = '검색';
|
|
26
|
+
fhlSearchInput.autocomplete = 'off';
|
|
53
27
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
links.forEach(link => {
|
|
57
|
-
const a = document.createElement("a");
|
|
58
|
-
a.href = link.href;
|
|
59
|
-
a.target = "_blank";
|
|
60
|
-
a.className = "fhl-list-item";
|
|
61
|
-
a.textContent = link.text;
|
|
62
|
-
listContainer.appendChild(a);
|
|
63
|
-
});
|
|
64
|
-
wrapper.appendChild(listContainer);
|
|
28
|
+
const fhlListContainer = document.createElement('div');
|
|
29
|
+
fhlListContainer.className = 'fhl-list-container';
|
|
65
30
|
|
|
66
|
-
|
|
67
|
-
scrollArrow.className = "fhl-scroll-arrow";
|
|
68
|
-
scrollArrow.setAttribute("aria-label", "다음으로 스크롤");
|
|
69
|
-
scrollArrow.textContent = "›";
|
|
70
|
-
wrapper.appendChild(scrollArrow);
|
|
31
|
+
const fhlListItems = [];
|
|
71
32
|
|
|
72
|
-
|
|
33
|
+
itemsData.forEach(item => {
|
|
34
|
+
const listItem = document.createElement('a');
|
|
35
|
+
listItem.href = item.url;
|
|
36
|
+
listItem.target = '_blank';
|
|
37
|
+
listItem.className = 'fhl-list-item';
|
|
38
|
+
listItem.textContent = item.name;
|
|
39
|
+
fhlListContainer.appendChild(listItem);
|
|
40
|
+
fhlListItems.push(listItem);
|
|
41
|
+
});
|
|
73
42
|
|
|
74
|
-
|
|
75
|
-
|
|
43
|
+
const fhlScrollArrow = document.createElement('button');
|
|
44
|
+
fhlScrollArrow.className = 'fhl-scroll-arrow';
|
|
45
|
+
fhlScrollArrow.setAttribute('aria-label', '다음으로 스크롤');
|
|
46
|
+
fhlScrollArrow.textContent = '›';
|
|
76
47
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
Math.abs(
|
|
81
|
-
listContainer.scrollWidth -
|
|
82
|
-
listContainer.clientWidth -
|
|
83
|
-
listContainer.scrollLeft
|
|
84
|
-
) < 1;
|
|
85
|
-
listContainer.scrollTo({
|
|
86
|
-
left: isAtEnd ? 0 : listContainer.scrollLeft + scrollAmount,
|
|
87
|
-
behavior: "smooth",
|
|
88
|
-
});
|
|
89
|
-
});
|
|
48
|
+
fhlWidgetWrapper.appendChild(fhlSearchInput);
|
|
49
|
+
fhlWidgetWrapper.appendChild(fhlListContainer);
|
|
50
|
+
fhlWidgetWrapper.appendChild(fhlScrollArrow);
|
|
90
51
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
52
|
+
document.body.appendChild(fhlWidgetWrapper);
|
|
53
|
+
|
|
54
|
+
fhlScrollArrow.addEventListener('click', function() {
|
|
55
|
+
const scrollAmount = fhlListContainer.clientWidth * 0.8;
|
|
56
|
+
const isAtEnd = Math.abs(fhlListContainer.scrollWidth - fhlListContainer.clientWidth - fhlListContainer.scrollLeft) < 1;
|
|
57
|
+
|
|
58
|
+
fhlListContainer.scrollTo({
|
|
59
|
+
left: isAtEnd ? 0 : fhlListContainer.scrollLeft + scrollAmount,
|
|
60
|
+
behavior: 'smooth'
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
fhlSearchInput.addEventListener('input', function() {
|
|
65
|
+
const searchTerm = fhlSearchInput.value.toLowerCase();
|
|
66
|
+
fhlListItems.forEach(function(item) {
|
|
67
|
+
const itemText = item.textContent.toLowerCase();
|
|
68
|
+
item.style.display = itemText.includes(searchTerm) ? 'block' : 'none';
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
});
|
package/package.json
CHANGED
package/_fr.png
DELETED
|
Binary file
|
package/_ham.png
DELETED
|
Binary file
|