adding uploads to org authoring server
All checks were successful
Build Org Website / build (push) Successful in 54s
All checks were successful
Build Org Website / build (push) Successful in 54s
This commit is contained in:
@@ -819,7 +819,7 @@ APP_HTML = r"""<!doctype html>
|
|||||||
<button type="button" data-md="quote">Quote</button>
|
<button type="button" data-md="quote">Quote</button>
|
||||||
<button type="button" data-md="link">Link</button>
|
<button type="button" data-md="link">Link</button>
|
||||||
<button type="button" id="pageLinkBtn">Link to page</button>
|
<button type="button" id="pageLinkBtn">Link to page</button>
|
||||||
<button type="button" id="attachBtn">Insert attachment</button>
|
<button type="button" id="attachBtn">Insert image</button>
|
||||||
<input id="attachInput" type="file" accept="image/*" />
|
<input id="attachInput" type="file" accept="image/*" />
|
||||||
</div>
|
</div>
|
||||||
<div id="pageLinkPicker" class="link-picker" hidden>
|
<div id="pageLinkPicker" class="link-picker" hidden>
|
||||||
@@ -1147,7 +1147,7 @@ APP_HTML = r"""<!doctype html>
|
|||||||
editor.date.closest("label").hidden = isLima;
|
editor.date.closest("label").hidden = isLima;
|
||||||
editor.comments.closest("label").hidden = isLima;
|
editor.comments.closest("label").hidden = isLima;
|
||||||
editor.section.closest("label").hidden = editor.pageType.value !== "post";
|
editor.section.closest("label").hidden = editor.pageType.value !== "post";
|
||||||
attachBtn.hidden = isOrg;
|
attachBtn.hidden = false;
|
||||||
previewWrap.hidden = !isLima;
|
previewWrap.hidden = !isLima;
|
||||||
contentLayout.classList.toggle("previewing", isLima);
|
contentLayout.classList.toggle("previewing", isLima);
|
||||||
pageLinkPicker.hidden = true;
|
pageLinkPicker.hidden = true;
|
||||||
@@ -1313,7 +1313,7 @@ APP_HTML = r"""<!doctype html>
|
|||||||
async function uploadAttachment() {
|
async function uploadAttachment() {
|
||||||
const file = attachInput.files[0];
|
const file = attachInput.files[0];
|
||||||
if (!file) return;
|
if (!file) return;
|
||||||
saveMessage.textContent = "Uploading attachment.";
|
saveMessage.textContent = "Uploading image.";
|
||||||
const body = new FormData();
|
const body = new FormData();
|
||||||
body.append("attachment", file);
|
body.append("attachment", file);
|
||||||
body.append("pagePath", currentEditorPath() || "index.org");
|
body.append("pagePath", currentEditorPath() || "index.org");
|
||||||
@@ -1322,7 +1322,7 @@ APP_HTML = r"""<!doctype html>
|
|||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
if (!res.ok) throw new Error(data.error || "Upload failed");
|
if (!res.ok) throw new Error(data.error || "Upload failed");
|
||||||
replaceSelection(`\n${data.insertText || data.markdown}\n`);
|
replaceSelection(`\n${data.insertText || data.markdown}\n`);
|
||||||
saveMessage.textContent = "Attachment inserted.";
|
saveMessage.textContent = "Image inserted.";
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
saveMessage.textContent = err.message;
|
saveMessage.textContent = err.message;
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
See the categories: @@html:<a href="../home/categories.html">Categories</a>@@
|
See the categories: @@html:<a href="../home/categories.html">Categories</a>@@
|
||||||
|
|
||||||
* Posts:
|
* Posts:
|
||||||
- [[file:career/career-list.org][Career List]] @@html:<span class="post-date">08-05-2026 00:03</span>@@
|
- [[file:career/career-list.org][Career List]] @@html:<span class="post-date">08-05-2026 11:29</span>@@
|
||||||
- [[file:posts-list.sync-conflict-20260417-233432-VT6366A.org][Posts List]] @@html:<span class="post-date">14-04-2026 16:36</span>@@
|
- [[file:posts-list.sync-conflict-20260417-233432-VT6366A.org][Posts List]] @@html:<span class="post-date">14-04-2026 16:36</span>@@
|
||||||
- [[file:career/ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:<span class="post-date">11-03-2026 17:18</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
- [[file:career/ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:<span class="post-date">11-03-2026 17:18</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
||||||
- [[file:career/javascript.org][Understands the Javascript language]] @@html:<span class="post-date">11-03-2026 16:52</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
- [[file:career/javascript.org][Understands the Javascript language]] @@html:<span class="post-date">11-03-2026 16:52</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
- [[file:tags/notes.org][Tag: notes]]
|
- [[file:tags/notes.org][Tag: notes]]
|
||||||
- [[file:tags/review.org][Tag: review]]
|
- [[file:tags/review.org][Tag: review]]
|
||||||
- [[file:tags/website.org][Tag: website]]
|
- [[file:tags/website.org][Tag: website]]
|
||||||
|
- [[file:tags/update.org][Tag: update]]
|
||||||
- [[file:tags/life.org][Tag: life]]
|
- [[file:tags/life.org][Tag: life]]
|
||||||
- [[file:tags/education.org][Tag: education]]
|
- [[file:tags/education.org][Tag: education]]
|
||||||
- [[file:tags/update.org][Tag: update]]
|
|
||||||
- [[file:tags/insights.org][Tag: insights]]
|
- [[file:tags/insights.org][Tag: insights]]
|
||||||
- [[file:tags/emacs.org][Tag: emacs]]
|
|
||||||
- [[file:tags/reading.org][Tag: reading]]
|
- [[file:tags/reading.org][Tag: reading]]
|
||||||
|
- [[file:tags/emacs.org][Tag: emacs]]
|
||||||
- [[file:tags/maths.org][Tag: maths]]
|
- [[file:tags/maths.org][Tag: maths]]
|
||||||
- home
|
- home
|
||||||
- [[file:home/countdown.org][Countdown]]
|
- [[file:home/countdown.org][Countdown]]
|
||||||
|
|||||||
Reference in New Issue
Block a user