Commit
β’
08b96f2
1
Parent(s):
c7348be
Align buttons
Browse files
script.js
CHANGED
@@ -8,17 +8,19 @@ function createCard(title, text, url) {
|
|
8 |
if (url) {
|
9 |
|
10 |
let template = `
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
22 |
return template;
|
23 |
|
24 |
} else {
|
@@ -27,10 +29,12 @@ function createCard(title, text, url) {
|
|
27 |
<h2>${title}</h2>
|
28 |
<p>${text}</p>
|
29 |
<a href="https://huggingface.co/docs/hub/spaces" target="_blank"><img alt="Image for posts to rectruit collaborators" width="500" src="images/lead_announcement.png"></a>
|
|
|
30 |
<a href="https://huggingface.co/docs/hub/spaces" target="_blank"><button class="button-4" role="button">Edit this template</button></a>
|
31 |
<a href="https://x.com/intent/post?text=${url_text}" target="_blank"><button class="button-4" role="button">Share in X</button></a>
|
32 |
<a href="https://www.linkedin.com/feed/?shareActive=true&text=${url_text}" target="_blank"><button class="button-4" role="button">Share in LinkedIn</button></a>
|
33 |
<a href="https://bsky.app/intent/compose?text=${url_text}" target="_blank"><button class="button-4" role="button">Share in Bluesky</button></a>
|
|
|
34 |
</div>
|
35 |
</br>
|
36 |
`
|
|
|
8 |
if (url) {
|
9 |
|
10 |
let template = `
|
11 |
+
<div class="card">
|
12 |
+
<h2>${title}</h2>
|
13 |
+
${text}<p>${url}</p>
|
14 |
+
<a href="https://huggingface.co/docs/hub/spaces" target="_blank"><img alt="Image for posts to rectruit collaborators" width="500" src="images/lead_announcement.png"></a>
|
15 |
+
<div class="button-container" align="center">
|
16 |
+
<a href="https://huggingface.co/docs/hub/spaces" target="_blank"><button class="button-4" role="button">Edit this template</button></a>
|
17 |
+
<a href="https://x.com/intent/post?text=${url_text}${url}" target="_blank"><button class="button-4" role="button">Share in X</button></a>
|
18 |
+
<a href="https://www.linkedin.com/feed/?shareActive=true&text=${url_text}${url}" target="_blank"><button class="button-4" role="button">Share in LinkedIn</button></a>
|
19 |
+
<a href="https://bsky.app/intent/compose?text=${url_text}${url}" target="_blank"><button class="button-4" role="button">Share in Bluesky</button></a>
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
</br>
|
23 |
+
`
|
24 |
return template;
|
25 |
|
26 |
} else {
|
|
|
29 |
<h2>${title}</h2>
|
30 |
<p>${text}</p>
|
31 |
<a href="https://huggingface.co/docs/hub/spaces" target="_blank"><img alt="Image for posts to rectruit collaborators" width="500" src="images/lead_announcement.png"></a>
|
32 |
+
<div class="button-container" align="center">
|
33 |
<a href="https://huggingface.co/docs/hub/spaces" target="_blank"><button class="button-4" role="button">Edit this template</button></a>
|
34 |
<a href="https://x.com/intent/post?text=${url_text}" target="_blank"><button class="button-4" role="button">Share in X</button></a>
|
35 |
<a href="https://www.linkedin.com/feed/?shareActive=true&text=${url_text}" target="_blank"><button class="button-4" role="button">Share in LinkedIn</button></a>
|
36 |
<a href="https://bsky.app/intent/compose?text=${url_text}" target="_blank"><button class="button-4" role="button">Share in Bluesky</button></a>
|
37 |
+
</div>
|
38 |
</div>
|
39 |
</br>
|
40 |
`
|