add environ error message

add to environ some data and some codereview pages
some fix oembed and OpenGraph
This commit is contained in:
Дмитрий Шиманский
2023-12-20 23:57:55 +03:00
parent 8a73f597cf
commit 921b8f3db3
14 changed files with 96 additions and 94 deletions

View File

@@ -1,18 +1,19 @@
let blogId = $("#blogId").text();
function loadComments () {
fetch(`/api/Blog/${blogId}/comments`)
.then(response => {
let data = response.json();
data.then(k => {
for (let i = 0; i < k.length; i++) {
let date = new Date(k[i].dateTime * 1000);
$("#commentBar").after(
`<div class="d-flex flex flex-start bg-dark bot-1">
function loadComments() {
if (document.location.pathname.startsWith("/Blog")) {
fetch(`/api/Blog/${blogId}/comments`)
.then(response => {
let data = response.json();
data.then(k => {
for (let i = 0; i < k.length; i++) {
let date = new Date(k[i].dateTime * 1000);
$("#commentBar").after(
`<div class="d-flex flex flex-start bg-dark bot-1">
<div class="container">
<h6 class="fw-bold mb-1">${k[i].creatorMail}</h6>
<div class="d-flex align-items-center mb-3">
<p class="mb-0">
${date.toLocaleString() }
${date.toLocaleString()}
</p>
</div>
<p class="mb-0">
@@ -20,10 +21,11 @@ function loadComments () {
</p>
</div>
</div>`
)
}
)
}
});
});
});
}
}
$("#postComment").click(
function () {