soon-ads 0.0.0 → 0.0.1

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,7 @@
1
+ export declare class SoonAdsPageProjects extends HTMLElement {
2
+ static observedAttributes: string[];
3
+ constructor();
4
+ update(): void;
5
+ attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
6
+ connectedCallback(): void;
7
+ }
@@ -1,256 +1,249 @@
1
- export class SoonAdsPageProjects extends HTMLElement {
2
- static observedAttributes = ["lang"]
3
-
4
- constructor() {
5
- super()
6
- }
7
- update() {
8
- const zh = [
9
- {
10
- title: "soon-mock",
11
- description: "一键生成增删查改, apifox本地化替代",
12
- tags: ["数据持久化", "jwt授权", "接口级权限控制", "未mock接口可转发其他服务端"],
13
- github: "https://github.com/leafio/soon-mock",
14
- },
15
- {
16
- title: "soon-fetch",
17
- description: "基于fetch,不到3K,axios替代",
18
- tags: ["超时断开", "快速定义api方法", "解析rest url 参数"],
19
- github: "https://github.com/leafio/soon-fetch",
20
- },
21
- {
22
- title: "soon-i18n",
23
- description: "react , vue , svelte , solid 均可使用的i18n库",
24
- tags: ["不到3K", "ts智能提醒", "适配框架, 数据状态不丢失"],
25
- github: "https://github.com/leafio/soon-i18n",
26
- },
27
- {
28
- title: "react-vmodel",
29
- description: "像v-model一样,简单、快捷地双向绑定",
30
- tags: ["ts智能提醒", "兼容 antd 、material ui"],
31
- github: "https://github.com/leafio/react-vmodel",
32
- },
33
- {
34
- title: "soon-admin-vue3",
35
- description: "vue3,完全 script setup 写成",
36
- tags: ["多标签", "i18n", "table页模板", "支持mobile"],
37
- github: "https://github.com/leafio/soon-admin-vue3",
38
- },
39
- {
40
- title: "soon-admin-express",
41
- description: "typescript,prisma",
42
- tags: ["接口级权限管理", "与登录接口结合的图片验证码"],
43
- github: "https://github.com/leafio/soon-admin-express",
44
- },
45
- ]
46
- const en = [
47
- {
48
- title: "soon-mock",
49
- description: "generate rest apis by just one press",
50
- tags: ["data persistence ", "jwt", "api level auth", "url redirect"],
51
- github: "https://github.com/leafio/soon-mock",
52
- },
53
- {
54
- title: "soon-fetch",
55
- description: "alternative for axios, based on fetch",
56
- tags: ["timeout disconnect", "fast define api", "restful url parse"],
57
- github: "https://github.com/leafio/soon-fetch",
58
- },
59
- {
60
- title: "soon-i18n",
61
- description: "i18n lib for react , vue , svelte , solid ...",
62
- tags: ["less than 3K", "ts prompt", "state keeping"],
63
- github: "https://github.com/leafio/soon-i18n",
64
- },
65
- {
66
- title: "react-vmodel",
67
- description: "like v-model, simple and fast two-way binding",
68
- tags: ["ts prompt", "could use with antd 、material ui"],
69
- github: "https://github.com/leafio/react-vmodel",
70
- },
71
- {
72
- title: "soon-admin-vue3",
73
- description: "vue3, totally written in script setup",
74
- tags: ["multi-tabs", "i18n", "table page template", "support pc and mobile"],
75
- github: "https://github.com/leafio/soon-admin-vue3",
76
- },
77
- {
78
- title: "soon-admin-express",
79
- description: "typescript,prisma",
80
- tags: ["api level auth", " captcha combined login api"],
81
- github: "https://github.com/leafio/soon-admin-express",
82
- },
83
- ]
84
-
85
- const data = {
86
- zh,
87
- en,
88
- ko: en,
89
- }
90
- const titles = { zh: "给个star,支持下吧", en: "Your star is important for me" }
91
- let lang = this.getAttribute("lang") ?? "zh"
92
- if (lang === 'ko') lang = 'en'
93
- const projects = data[lang as keyof typeof data]
94
- const title = titles[lang as keyof typeof titles]
95
- this.innerHTML = `
96
- <style>
97
-
98
- .container {
99
- max-width: 1400px;
100
- margin: 0 auto;
101
- padding: 24px;
102
- }
103
-
104
- .header {
105
- margin-bottom: 24px;
106
- text-align: center;
107
- }
108
-
109
- .header h1 {
110
- font-size: 2rem;
111
- color: #1d1d1f;
112
- margin-bottom: 8px;
113
- }
114
-
115
- .projects-grid {
116
- display: grid;
117
- grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
118
- gap: 24px;
119
- }
120
-
121
- .card {
122
- background: white;
123
- border-radius: 8px;
124
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
125
- overflow: hidden;
126
- transition: box-shadow 0.3s ease;
127
- display:flex;
128
- flex-direction: column;
129
- justify-content: space-between;
130
- }
131
-
132
- .card:hover {
133
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
134
- }
135
-
136
- .card-header {
137
- padding: 16px 24px;
138
- border-bottom: 1px solid #eee;
139
- }
140
-
141
- .card-title {
142
- font-size: 1.5rem;
143
- color: var(--soon-ads-primary-600, #8c57ff);
144
- margin: 0;
145
- font-weight: bold;
146
- }
147
-
148
- .card-body {
149
- padding: 16px 24px;
150
- }
151
-
152
- .card-description {
153
- margin: 12px 0;
154
- color: #555;
155
- }
156
-
157
- .tags-container {
158
- margin: 16px 0;
159
- display: flex;
160
- flex-wrap: wrap;
161
- gap: 8px;
162
- }
163
-
164
- .tag {
165
- background-color: var(--soon-ads-primary-100, #f4edff);
166
- color: var(--soon-ads-primary-600, #8c57ff);
167
- border: 1px solid var(--soon-ads-primary-600, #8c57ff);
168
- padding: 4px 12px;
169
- border-radius: 16px;
170
- font-size: 0.8rem;
171
- }
172
-
173
- .card-footer {
174
- padding: 16px 24px;
175
- border-top: 1px solid #eee;
176
- }
177
-
178
- .github-link {
179
- display: flex;
180
- align-items: center;
181
- color: #333;
182
- text-decoration: none;
183
- font-weight: 500;
184
- }
185
-
186
- .github-link:hover {
187
- var(--soon-ads-primary-600, #8c57ff)
188
- text-decoration: underline;
189
- }
190
-
191
- .github-icon {
192
- margin-right: 8px;
193
- width: 16px;
194
- height: 16px;
195
- }
196
-
197
- @media (max-width: 768px) {
198
- .projects-grid {
199
- grid-template-columns: 1fr;
200
- }
201
-
202
- .container {
203
- padding: 16px;
204
- }
205
- }
206
- </style>
207
- <div class="container">
208
- <div class="header">
209
- <h1>${title}</h1>
210
- </div>
211
-
212
- <div class="projects-grid">
213
-
214
-
215
- ${projects
216
- .map(
217
- (project) => `
218
- <div class="card">
219
- <div class="card-header">
220
- <h3 class="card-title">${project.title}</h3>
221
- </div>
222
- <div class="card-body">
223
- <p class="card-description">${project.description}</p>
224
- <div class="tags-container">
225
- ${project.tags.map((tag) => `<span class="tag">${tag}</span>`).join("")}
226
- </div>
227
- </div>
228
- <div class="card-footer">
229
- <a href="${project.github}" target="_blank" class="github-link">
230
- <svg class="github-icon" viewBox="0 0 16 16" fill="currentColor">
231
- <path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"/>
232
- </svg>
233
- ${project.github}
234
- </a>
235
- </div>
236
- </div>
237
- `,
238
- )
239
- .join("")}
240
-
241
-
242
-
243
- </div>
244
- </div>
245
-
246
- `
247
- }
248
- attributeChangedCallback(name: any, oldValue: any, newValue: any) {
249
- // console.log(`属性 ${name} 已由 ${oldValue} 变更为 ${newValue}。`)
250
- this.update()
251
- }
252
- connectedCallback() {
253
- // console.log("组件已挂载", this, this.lang)
254
- this.update()
255
- }
256
- }
1
+ class c extends HTMLElement {
2
+ static observedAttributes = ["lang"];
3
+ constructor() {
4
+ super();
5
+ }
6
+ update() {
7
+ const o = [
8
+ {
9
+ title: "soon-mock",
10
+ description: "一键生成增删查改, apifox本地化替代",
11
+ tags: ["数据持久化", "jwt授权", "接口级权限控制", "未mock接口可转发其他服务端"],
12
+ github: "https://github.com/leafio/soon-mock"
13
+ },
14
+ {
15
+ title: "soon-fetch",
16
+ description: "基于fetch,不到3K,axios替代",
17
+ tags: ["超时断开", "快速定义api方法", "解析rest url 参数"],
18
+ github: "https://github.com/leafio/soon-fetch"
19
+ },
20
+ {
21
+ title: "soon-i18n",
22
+ description: "react , vue , svelte , solid 均可使用的i18n",
23
+ tags: ["不到3K", "ts智能提醒", "适配框架, 数据状态不丢失"],
24
+ github: "https://github.com/leafio/soon-i18n"
25
+ },
26
+ {
27
+ title: "react-vmodel",
28
+ description: "像v-model一样,简单、快捷地双向绑定",
29
+ tags: ["ts智能提醒", "兼容 antd 、material ui"],
30
+ github: "https://github.com/leafio/react-vmodel"
31
+ },
32
+ {
33
+ title: "soon-admin-vue3",
34
+ description: "vue3,完全 script setup 写成",
35
+ tags: ["多标签", "i18n", "table页模板", "支持mobile"],
36
+ github: "https://github.com/leafio/soon-admin-vue3"
37
+ },
38
+ {
39
+ title: "soon-admin-express",
40
+ description: "typescript,prisma",
41
+ tags: ["接口级权限管理", "与登录接口结合的图片验证码"],
42
+ github: "https://github.com/leafio/soon-admin-express"
43
+ }
44
+ ], e = [
45
+ {
46
+ title: "soon-mock",
47
+ description: "generate rest apis by just one press",
48
+ tags: ["data persistence ", "jwt", "api level auth", "url redirect"],
49
+ github: "https://github.com/leafio/soon-mock"
50
+ },
51
+ {
52
+ title: "soon-fetch",
53
+ description: "alternative for axios, based on fetch",
54
+ tags: ["timeout disconnect", "fast define api", "restful url parse"],
55
+ github: "https://github.com/leafio/soon-fetch"
56
+ },
57
+ {
58
+ title: "soon-i18n",
59
+ description: "i18n lib for react , vue , svelte , solid ...",
60
+ tags: ["less than 3K", "ts prompt", "state keeping"],
61
+ github: "https://github.com/leafio/soon-i18n"
62
+ },
63
+ {
64
+ title: "react-vmodel",
65
+ description: "like v-model, simple and fast two-way binding",
66
+ tags: ["ts prompt", "could use with antd 、material ui"],
67
+ github: "https://github.com/leafio/react-vmodel"
68
+ },
69
+ {
70
+ title: "soon-admin-vue3",
71
+ description: "vue3, totally written in script setup",
72
+ tags: ["multi-tabs", "i18n", "table page template", "support pc and mobile"],
73
+ github: "https://github.com/leafio/soon-admin-vue3"
74
+ },
75
+ {
76
+ title: "soon-admin-express",
77
+ description: "typescript,prisma",
78
+ tags: ["api level auth", " captcha combined login api"],
79
+ github: "https://github.com/leafio/soon-admin-express"
80
+ }
81
+ ], a = {
82
+ zh: o,
83
+ en: e,
84
+ ko: e
85
+ }, s = { zh: "给个star,支持下吧", en: "Your star is important for me" };
86
+ let i = this.getAttribute("lang") ?? "zh";
87
+ i === "ko" && (i = "en");
88
+ const r = a[i], n = s[i];
89
+ this.innerHTML = `
90
+ <style>
91
+
92
+ .container {
93
+ max-width: 1400px;
94
+ margin: 0 auto;
95
+ padding: 24px;
96
+ }
97
+
98
+ .header {
99
+ margin-bottom: 24px;
100
+ text-align: center;
101
+ }
102
+
103
+ .header h1 {
104
+ font-size: 2rem;
105
+ color: #1d1d1f;
106
+ margin-bottom: 8px;
107
+ }
108
+
109
+ .projects-grid {
110
+ display: grid;
111
+ grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
112
+ gap: 24px;
113
+ }
114
+
115
+ .card {
116
+ background: white;
117
+ border-radius: 8px;
118
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
119
+ overflow: hidden;
120
+ transition: box-shadow 0.3s ease;
121
+ display:flex;
122
+ flex-direction: column;
123
+ justify-content: space-between;
124
+ }
125
+
126
+ .card:hover {
127
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
128
+ }
129
+
130
+ .card-header {
131
+ padding: 16px 24px;
132
+ border-bottom: 1px solid #eee;
133
+ }
134
+
135
+ .card-title {
136
+ font-size: 1.5rem;
137
+ color: var(--soon-ads-primary-600, #8c57ff);
138
+ margin: 0;
139
+ font-weight: bold;
140
+ }
141
+
142
+ .card-body {
143
+ padding: 16px 24px;
144
+ }
145
+
146
+ .card-description {
147
+ margin: 12px 0;
148
+ color: #555;
149
+ }
150
+
151
+ .tags-container {
152
+ margin: 16px 0;
153
+ display: flex;
154
+ flex-wrap: wrap;
155
+ gap: 8px;
156
+ }
157
+
158
+ .tag {
159
+ background-color: var(--soon-ads-primary-100, #f4edff);
160
+ color: var(--soon-ads-primary-600, #8c57ff);
161
+ border: 1px solid var(--soon-ads-primary-600, #8c57ff);
162
+ padding: 4px 12px;
163
+ border-radius: 16px;
164
+ font-size: 0.8rem;
165
+ }
166
+
167
+ .card-footer {
168
+ padding: 16px 24px;
169
+ border-top: 1px solid #eee;
170
+ }
171
+
172
+ .github-link {
173
+ display: flex;
174
+ align-items: center;
175
+ color: #333;
176
+ text-decoration: none;
177
+ font-weight: 500;
178
+ }
179
+
180
+ .github-link:hover {
181
+ var(--soon-ads-primary-600, #8c57ff)
182
+ text-decoration: underline;
183
+ }
184
+
185
+ .github-icon {
186
+ margin-right: 8px;
187
+ width: 16px;
188
+ height: 16px;
189
+ }
190
+
191
+ @media (max-width: 768px) {
192
+ .projects-grid {
193
+ grid-template-columns: 1fr;
194
+ }
195
+
196
+ .container {
197
+ padding: 16px;
198
+ }
199
+ }
200
+ </style>
201
+ <div class="container">
202
+ <div class="header">
203
+ <h1>${n}</h1>
204
+ </div>
205
+
206
+ <div class="projects-grid">
207
+
208
+
209
+ ${r.map(
210
+ (t) => `
211
+ <div class="card">
212
+ <div class="card-header">
213
+ <h3 class="card-title">${t.title}</h3>
214
+ </div>
215
+ <div class="card-body">
216
+ <p class="card-description">${t.description}</p>
217
+ <div class="tags-container">
218
+ ${t.tags.map((d) => `<span class="tag">${d}</span>`).join("")}
219
+ </div>
220
+ </div>
221
+ <div class="card-footer">
222
+ <a href="${t.github}" target="_blank" class="github-link">
223
+ <svg class="github-icon" viewBox="0 0 16 16" fill="currentColor">
224
+ <path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"/>
225
+ </svg>
226
+ ${t.github}
227
+ </a>
228
+ </div>
229
+ </div>
230
+ `
231
+ ).join("")}
232
+
233
+
234
+
235
+ </div>
236
+ </div>
237
+
238
+ `;
239
+ }
240
+ attributeChangedCallback(o, e, a) {
241
+ this.update();
242
+ }
243
+ connectedCallback() {
244
+ this.update();
245
+ }
246
+ }
247
+ export {
248
+ c as SoonAdsPageProjects
249
+ };
@@ -0,0 +1,148 @@
1
+ (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.index={}))})(this,(function(t){"use strict";class e extends HTMLElement{static observedAttributes=["lang"];constructor(){super()}update(){const s=[{title:"soon-mock",description:"一键生成增删查改, apifox本地化替代",tags:["数据持久化","jwt授权","接口级权限控制","未mock接口可转发其他服务端"],github:"https://github.com/leafio/soon-mock"},{title:"soon-fetch",description:"基于fetch,不到3K,axios替代",tags:["超时断开","快速定义api方法","解析rest url 参数"],github:"https://github.com/leafio/soon-fetch"},{title:"soon-i18n",description:"react , vue , svelte , solid 均可使用的i18n库",tags:["不到3K","ts智能提醒","适配框架, 数据状态不丢失"],github:"https://github.com/leafio/soon-i18n"},{title:"react-vmodel",description:"像v-model一样,简单、快捷地双向绑定",tags:["ts智能提醒","兼容 antd 、material ui"],github:"https://github.com/leafio/react-vmodel"},{title:"soon-admin-vue3",description:"vue3,完全 script setup 写成",tags:["多标签","i18n","table页模板","支持mobile"],github:"https://github.com/leafio/soon-admin-vue3"},{title:"soon-admin-express",description:"typescript,prisma",tags:["接口级权限管理","与登录接口结合的图片验证码"],github:"https://github.com/leafio/soon-admin-express"}],a=[{title:"soon-mock",description:"generate rest apis by just one press",tags:["data persistence ","jwt","api level auth","url redirect"],github:"https://github.com/leafio/soon-mock"},{title:"soon-fetch",description:"alternative for axios, based on fetch",tags:["timeout disconnect","fast define api","restful url parse"],github:"https://github.com/leafio/soon-fetch"},{title:"soon-i18n",description:"i18n lib for react , vue , svelte , solid ...",tags:["less than 3K","ts prompt","state keeping"],github:"https://github.com/leafio/soon-i18n"},{title:"react-vmodel",description:"like v-model, simple and fast two-way binding",tags:["ts prompt","could use with antd 、material ui"],github:"https://github.com/leafio/react-vmodel"},{title:"soon-admin-vue3",description:"vue3, totally written in script setup",tags:["multi-tabs","i18n","table page template","support pc and mobile"],github:"https://github.com/leafio/soon-admin-vue3"},{title:"soon-admin-express",description:"typescript,prisma",tags:["api level auth"," captcha combined login api"],github:"https://github.com/leafio/soon-admin-express"}],n={zh:s,en:a,ko:a},r={zh:"给个star,支持下吧",en:"Your star is important for me"};let o=this.getAttribute("lang")??"zh";o==="ko"&&(o="en");const d=n[o],p=r[o];this.innerHTML=`
2
+ <style>
3
+
4
+ .container {
5
+ max-width: 1400px;
6
+ margin: 0 auto;
7
+ padding: 24px;
8
+ }
9
+
10
+ .header {
11
+ margin-bottom: 24px;
12
+ text-align: center;
13
+ }
14
+
15
+ .header h1 {
16
+ font-size: 2rem;
17
+ color: #1d1d1f;
18
+ margin-bottom: 8px;
19
+ }
20
+
21
+ .projects-grid {
22
+ display: grid;
23
+ grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
24
+ gap: 24px;
25
+ }
26
+
27
+ .card {
28
+ background: white;
29
+ border-radius: 8px;
30
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
31
+ overflow: hidden;
32
+ transition: box-shadow 0.3s ease;
33
+ display:flex;
34
+ flex-direction: column;
35
+ justify-content: space-between;
36
+ }
37
+
38
+ .card:hover {
39
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
40
+ }
41
+
42
+ .card-header {
43
+ padding: 16px 24px;
44
+ border-bottom: 1px solid #eee;
45
+ }
46
+
47
+ .card-title {
48
+ font-size: 1.5rem;
49
+ color: var(--soon-ads-primary-600, #8c57ff);
50
+ margin: 0;
51
+ font-weight: bold;
52
+ }
53
+
54
+ .card-body {
55
+ padding: 16px 24px;
56
+ }
57
+
58
+ .card-description {
59
+ margin: 12px 0;
60
+ color: #555;
61
+ }
62
+
63
+ .tags-container {
64
+ margin: 16px 0;
65
+ display: flex;
66
+ flex-wrap: wrap;
67
+ gap: 8px;
68
+ }
69
+
70
+ .tag {
71
+ background-color: var(--soon-ads-primary-100, #f4edff);
72
+ color: var(--soon-ads-primary-600, #8c57ff);
73
+ border: 1px solid var(--soon-ads-primary-600, #8c57ff);
74
+ padding: 4px 12px;
75
+ border-radius: 16px;
76
+ font-size: 0.8rem;
77
+ }
78
+
79
+ .card-footer {
80
+ padding: 16px 24px;
81
+ border-top: 1px solid #eee;
82
+ }
83
+
84
+ .github-link {
85
+ display: flex;
86
+ align-items: center;
87
+ color: #333;
88
+ text-decoration: none;
89
+ font-weight: 500;
90
+ }
91
+
92
+ .github-link:hover {
93
+ var(--soon-ads-primary-600, #8c57ff)
94
+ text-decoration: underline;
95
+ }
96
+
97
+ .github-icon {
98
+ margin-right: 8px;
99
+ width: 16px;
100
+ height: 16px;
101
+ }
102
+
103
+ @media (max-width: 768px) {
104
+ .projects-grid {
105
+ grid-template-columns: 1fr;
106
+ }
107
+
108
+ .container {
109
+ padding: 16px;
110
+ }
111
+ }
112
+ </style>
113
+ <div class="container">
114
+ <div class="header">
115
+ <h1>${p}</h1>
116
+ </div>
117
+
118
+ <div class="projects-grid">
119
+
120
+
121
+ ${d.map(i=>`
122
+ <div class="card">
123
+ <div class="card-header">
124
+ <h3 class="card-title">${i.title}</h3>
125
+ </div>
126
+ <div class="card-body">
127
+ <p class="card-description">${i.description}</p>
128
+ <div class="tags-container">
129
+ ${i.tags.map(c=>`<span class="tag">${c}</span>`).join("")}
130
+ </div>
131
+ </div>
132
+ <div class="card-footer">
133
+ <a href="${i.github}" target="_blank" class="github-link">
134
+ <svg class="github-icon" viewBox="0 0 16 16" fill="currentColor">
135
+ <path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"/>
136
+ </svg>
137
+ ${i.github}
138
+ </a>
139
+ </div>
140
+ </div>
141
+ `).join("")}
142
+
143
+
144
+
145
+ </div>
146
+ </div>
147
+
148
+ `}attributeChangedCallback(s,a,n){this.update()}connectedCallback(){this.update()}}t.SoonAdsPageProjects=e,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,11 +1,22 @@
1
1
  {
2
2
  "name": "soon-ads",
3
- "version": "0.0.0",
3
+ "version": "0.0.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "tsc && vite build",
8
8
  "preview": "vite preview"
9
+ },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "main": "./dist/index.umd.cjs",
14
+ "module": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ "types": "./index.d.ts",
18
+ "import": "./dist/index.js",
19
+ "require": "./dist/index.umd.cjs"
9
20
  },
10
21
  "devDependencies": {
11
22
  "@types/node": "^25.0.9",
package/index.html DELETED
@@ -1,13 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>soon-ads</title>
8
- </head>
9
- <body>
10
- <div id="app"></div>
11
- <script type="module" src="/src/main.ts"></script>
12
- </body>
13
- </html>
package/src/counter.ts DELETED
@@ -1,9 +0,0 @@
1
- export function setupCounter(element: HTMLButtonElement) {
2
- let counter = 0
3
- const setCounter = (count: number) => {
4
- counter = count
5
- element.innerHTML = `count is ${counter}`
6
- }
7
- element.addEventListener('click', () => setCounter(counter + 1))
8
- setCounter(0)
9
- }
package/src/main.ts DELETED
@@ -1,24 +0,0 @@
1
- import './style.css'
2
- import typescriptLogo from './typescript.svg'
3
- import viteLogo from '/vite.svg'
4
- import { setupCounter } from './counter.ts'
5
-
6
- document.querySelector<HTMLDivElement>('#app')!.innerHTML = `
7
- <div>
8
- <a href="https://vite.dev" target="_blank">
9
- <img src="${viteLogo}" class="logo" alt="Vite logo" />
10
- </a>
11
- <a href="https://www.typescriptlang.org/" target="_blank">
12
- <img src="${typescriptLogo}" class="logo vanilla" alt="TypeScript logo" />
13
- </a>
14
- <h1>Vite + TypeScript</h1>
15
- <div class="card">
16
- <button id="counter" type="button"></button>
17
- </div>
18
- <p class="read-the-docs">
19
- Click on the Vite and TypeScript logos to learn more
20
- </p>
21
- </div>
22
- `
23
-
24
- setupCounter(document.querySelector<HTMLButtonElement>('#counter')!)
package/src/style.css DELETED
@@ -1,96 +0,0 @@
1
- :root {
2
- font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
- line-height: 1.5;
4
- font-weight: 400;
5
-
6
- color-scheme: light dark;
7
- color: rgba(255, 255, 255, 0.87);
8
- background-color: #242424;
9
-
10
- font-synthesis: none;
11
- text-rendering: optimizeLegibility;
12
- -webkit-font-smoothing: antialiased;
13
- -moz-osx-font-smoothing: grayscale;
14
- }
15
-
16
- a {
17
- font-weight: 500;
18
- color: #646cff;
19
- text-decoration: inherit;
20
- }
21
- a:hover {
22
- color: #535bf2;
23
- }
24
-
25
- body {
26
- margin: 0;
27
- display: flex;
28
- place-items: center;
29
- min-width: 320px;
30
- min-height: 100vh;
31
- }
32
-
33
- h1 {
34
- font-size: 3.2em;
35
- line-height: 1.1;
36
- }
37
-
38
- #app {
39
- max-width: 1280px;
40
- margin: 0 auto;
41
- padding: 2rem;
42
- text-align: center;
43
- }
44
-
45
- .logo {
46
- height: 6em;
47
- padding: 1.5em;
48
- will-change: filter;
49
- transition: filter 300ms;
50
- }
51
- .logo:hover {
52
- filter: drop-shadow(0 0 2em #646cffaa);
53
- }
54
- .logo.vanilla:hover {
55
- filter: drop-shadow(0 0 2em #3178c6aa);
56
- }
57
-
58
- .card {
59
- padding: 2em;
60
- }
61
-
62
- .read-the-docs {
63
- color: #888;
64
- }
65
-
66
- button {
67
- border-radius: 8px;
68
- border: 1px solid transparent;
69
- padding: 0.6em 1.2em;
70
- font-size: 1em;
71
- font-weight: 500;
72
- font-family: inherit;
73
- background-color: #1a1a1a;
74
- cursor: pointer;
75
- transition: border-color 0.25s;
76
- }
77
- button:hover {
78
- border-color: #646cff;
79
- }
80
- button:focus,
81
- button:focus-visible {
82
- outline: 4px auto -webkit-focus-ring-color;
83
- }
84
-
85
- @media (prefers-color-scheme: light) {
86
- :root {
87
- color: #213547;
88
- background-color: #ffffff;
89
- }
90
- a:hover {
91
- color: #747bff;
92
- }
93
- button {
94
- background-color: #f9f9f9;
95
- }
96
- }
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path fill="#007ACC" d="M0 128v128h256V0H0z"></path><path fill="#FFF" d="m56.612 128.85l-.081 10.483h33.32v94.68h23.568v-94.68h33.321v-10.28c0-5.69-.122-10.444-.284-10.566c-.122-.162-20.4-.244-44.983-.203l-44.74.122l-.121 10.443Zm149.955-10.742c6.501 1.625 11.459 4.51 16.01 9.224c2.357 2.52 5.851 7.111 6.136 8.208c.08.325-11.053 7.802-17.798 11.988c-.244.162-1.22-.894-2.317-2.52c-3.291-4.795-6.745-6.867-12.028-7.233c-7.76-.528-12.759 3.535-12.718 10.321c0 1.992.284 3.17 1.097 4.795c1.707 3.536 4.876 5.649 14.832 9.956c18.326 7.883 26.168 13.084 31.045 20.48c5.445 8.249 6.664 21.415 2.966 31.208c-4.063 10.646-14.14 17.879-28.323 20.276c-4.388.772-14.79.65-19.504-.203c-10.28-1.828-20.033-6.908-26.047-13.572c-2.357-2.6-6.949-9.387-6.664-9.874c.122-.163 1.178-.813 2.356-1.504c1.138-.65 5.446-3.129 9.509-5.485l7.355-4.267l1.544 2.276c2.154 3.29 6.867 7.801 9.712 9.305c8.167 4.307 19.383 3.698 24.909-1.26c2.357-2.153 3.332-4.388 3.332-7.68c0-2.966-.366-4.266-1.91-6.501c-1.99-2.845-6.054-5.242-17.595-10.24c-13.206-5.69-18.895-9.224-24.096-14.832c-3.007-3.25-5.852-8.452-7.03-12.8c-.975-3.617-1.22-12.678-.447-16.335c2.723-12.76 12.353-21.659 26.25-24.3c4.51-.853 14.994-.528 19.424.569Z"></path></svg>
@@ -1,24 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "useDefineForClassFields": true,
5
- "module": "ESNext",
6
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
- "skipLibCheck": true,
8
-
9
- /* Bundler mode */
10
- "moduleResolution": "bundler",
11
- "allowImportingTsExtensions": true,
12
- "isolatedModules": true,
13
- "moduleDetection": "force",
14
- "noEmit": true,
15
-
16
- /* Linting */
17
- "strict": true,
18
- "noUnusedLocals": true,
19
- "noUnusedParameters": true,
20
- "noFallthroughCasesInSwitch": true,
21
- "noUncheckedSideEffectImports": true
22
- },
23
- "include": ["lib"]
24
- }
package/tsconfig.json DELETED
@@ -1,26 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "useDefineForClassFields": true,
5
- "module": "ESNext",
6
- "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
- "types": ["vite/client"],
8
- "skipLibCheck": true,
9
-
10
- /* Bundler mode */
11
- "moduleResolution": "bundler",
12
- "allowImportingTsExtensions": true,
13
- "verbatimModuleSyntax": true,
14
- "moduleDetection": "force",
15
- "noEmit": true,
16
-
17
- /* Linting */
18
- "strict": true,
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "erasableSyntaxOnly": true,
22
- "noFallthroughCasesInSwitch": true,
23
- "noUncheckedSideEffectImports": true
24
- },
25
- "include": ["src"]
26
- }
package/vite.config.ts DELETED
@@ -1,18 +0,0 @@
1
- /// <reference types="vitest" />
2
- import { defineConfig } from 'vite'
3
-
4
- import dts from 'vite-plugin-dts'
5
- import { resolve } from 'path'
6
-
7
- export default defineConfig({
8
-
9
- build: {
10
- lib: {
11
- entry: resolve(__dirname, 'lib/index.ts'),
12
- name: 'index',
13
- fileName: 'index',
14
- },
15
- }, plugins: [
16
- dts({ tsconfigPath: './tsconfig.build.json' })
17
- ],
18
- })