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.
@@ -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
- const style = document.createElement("style");
20
- style.textContent = `
21
- .fhl-widget-wrapper{position:fixed;z-index:1000;bottom:15px;left:50%;transform:translateX(-50%);
22
- display:flex;align-items:center;gap:8px;height:48px;width:calc(100% - 30px);max-width:480px;
23
- padding:0 8px 0 12px;margin:0;border-radius:14px;
24
- background-color:rgba(255,255,255,.95);backdrop-filter:blur(10px);
25
- box-shadow:0 4px 15px rgba(0,0,0,.2);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}
26
- .fhl-widget-wrapper *, .fhl-widget-wrapper *::before, .fhl-widget-wrapper *::after{box-sizing:border-box}
27
- .fhl-search-input{flex-shrink:0;width:60px;height:32px;padding:0 4px;margin:0;font-size:14px;color:#333;
28
- background:transparent;border:none;border-bottom:1px solid #ccc;border-radius:0;-webkit-appearance:none}
29
- .fhl-search-input:focus{outline:none;border-bottom-color:#007bff}
30
- .fhl-list-container{flex:1;min-width:0;height:100%;display:flex;align-items:center;gap:8px;
31
- overflow-x:auto;padding:0;margin:0;scroll-behavior:smooth;-ms-overflow-style:none;scrollbar-width:none}
32
- .fhl-list-container::-webkit-scrollbar{display:none}
33
- .fhl-list-item{flex-shrink:0;display:block;padding:7px 14px;margin:0;font-size:14px;font-weight:500;color:#333;
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
- // --- 위젯 DOM 생성 ---
44
- const wrapper = document.createElement("div");
45
- wrapper.className = "fhl-widget-wrapper";
19
+ const fhlWidgetWrapper = document.createElement('div');
20
+ fhlWidgetWrapper.className = 'fhl-widget-wrapper';
46
21
 
47
- const searchInput = document.createElement("input");
48
- searchInput.type = "text";
49
- searchInput.className = "fhl-search-input";
50
- searchInput.placeholder = "검색";
51
- searchInput.autocomplete = "off";
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
- const listContainer = document.createElement("div");
55
- listContainer.className = "fhl-list-container";
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
- const scrollArrow = document.createElement("button");
67
- scrollArrow.className = "fhl-scroll-arrow";
68
- scrollArrow.setAttribute("aria-label", "다음으로 스크롤");
69
- scrollArrow.textContent = "›";
70
- wrapper.appendChild(scrollArrow);
31
+ const fhlListItems = [];
71
32
 
72
- document.body.appendChild(wrapper);
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
- const listItems = listContainer.querySelectorAll(".fhl-list-item");
43
+ const fhlScrollArrow = document.createElement('button');
44
+ fhlScrollArrow.className = 'fhl-scroll-arrow';
45
+ fhlScrollArrow.setAttribute('aria-label', '다음으로 스크롤');
46
+ fhlScrollArrow.textContent = '›';
76
47
 
77
- scrollArrow.addEventListener("click", function () {
78
- const scrollAmount = listContainer.clientWidth * 0.8;
79
- const isAtEnd =
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
- searchInput.addEventListener("input", function () {
92
- const searchTerm = searchInput.value.toLowerCase();
93
- listItems.forEach(function (item) {
94
- const itemText = item.textContent.toLowerCase();
95
- item.style.display = itemText.includes(searchTerm) ? "block" : "none";
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cdnhost",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "cdnhost",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/_fr.png DELETED
Binary file
package/_ham.png DELETED
Binary file