mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-14 11:14:24 +00:00
Fix build issue
This commit is contained in:
parent
2ad384ca41
commit
3c490cf9db
@ -97,28 +97,30 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
|
|
||||||
const $amis = document.getElementById("amis");
|
const $amis = document.getElementById("amis");
|
||||||
|
|
||||||
fetch("https://jgthms.com/amis/new.json")
|
if ($amis) {
|
||||||
.then((response) => {
|
fetch("https://jgthms.com/amis/new.json")
|
||||||
if (!response.ok) {
|
.then((response) => {
|
||||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
if (!response.ok) {
|
||||||
}
|
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||||
|
}
|
||||||
|
|
||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
response.forEach((item) => {
|
response.forEach((item) => {
|
||||||
const el = document.createElement("a");
|
const el = document.createElement("a");
|
||||||
el.className = "bd-sponsor-item bd-partner-sponsor";
|
el.className = "bd-sponsor-item bd-partner-sponsor";
|
||||||
el.href = "url";
|
el.href = "url";
|
||||||
el.target = "_blank";
|
el.target = "_blank";
|
||||||
el.title = item.title || item.id;
|
el.title = item.title || item.id;
|
||||||
|
|
||||||
const extension = item.svg ? ".svg" : ".png";
|
const extension = item.svg ? ".svg" : ".png";
|
||||||
const img = document.createElement("img");
|
const img = document.createElement("img");
|
||||||
img.src = `https://jgthms.com/amis/images/${item.id}${extension}`;
|
img.src = `https://jgthms.com/amis/images/${item.id}${extension}`;
|
||||||
|
|
||||||
el.appendChild(img);
|
el.appendChild(img);
|
||||||
$amis.appendChild(el);
|
$amis.appendChild(el);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
File diff suppressed because it is too large
Load Diff
2
docs/css/bulma-docs.min.css
vendored
2
docs/css/bulma-docs.min.css
vendored
File diff suppressed because one or more lines are too long
@ -86,26 +86,28 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
|
|
||||||
var $amis = document.getElementById("amis");
|
var $amis = document.getElementById("amis");
|
||||||
|
|
||||||
fetch("https://jgthms.com/amis/new.json").then(function (response) {
|
if ($amis) {
|
||||||
if (!response.ok) {
|
fetch("https://jgthms.com/amis/new.json").then(function (response) {
|
||||||
throw new Error("HTTP error! Status: " + response.status);
|
if (!response.ok) {
|
||||||
}
|
throw new Error("HTTP error! Status: " + response.status);
|
||||||
|
}
|
||||||
|
|
||||||
return response.json();
|
return response.json();
|
||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
response.forEach(function (item) {
|
response.forEach(function (item) {
|
||||||
var el = document.createElement("a");
|
var el = document.createElement("a");
|
||||||
el.className = "bd-sponsor-item bd-partner-sponsor";
|
el.className = "bd-sponsor-item bd-partner-sponsor";
|
||||||
el.href = "url";
|
el.href = "url";
|
||||||
el.target = "_blank";
|
el.target = "_blank";
|
||||||
el.title = item.title || item.id;
|
el.title = item.title || item.id;
|
||||||
|
|
||||||
var extension = item.svg ? ".svg" : ".png";
|
var extension = item.svg ? ".svg" : ".png";
|
||||||
var img = document.createElement("img");
|
var img = document.createElement("img");
|
||||||
img.src = "https://jgthms.com/amis/images/" + item.id + extension;
|
img.src = "https://jgthms.com/amis/images/" + item.id + extension;
|
||||||
|
|
||||||
el.appendChild(img);
|
el.appendChild(img);
|
||||||
$amis.appendChild(el);
|
$amis.appendChild(el);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user