mirror of
https://github.com/dpnmw/community-landing.git
synced 2026-03-18 09:27:16 +00:00
Console Logging Enabled
Checking for where the video upload is failing
This commit is contained in:
@@ -44,7 +44,7 @@ const DESCRIPTIONS = {
|
||||
title_font_name: "Separate Google Font for titles and headings. Leave blank to use the body font.",
|
||||
|
||||
// ── Icons ──
|
||||
fontawesome_enabled: "Load FontAwesome 6 Free icons from CDN for use on buttons.",
|
||||
icon_library: "Icon library for buttons and titles. 'fontawesome' = FA 6 Free, 'google' = Material Symbols Outlined.",
|
||||
|
||||
// ── Navbar ──
|
||||
navbar_signin_label: "Sign-in link text. Use 'icon | Label' for FA icon before or 'Label | icon' for after (e.g. 'right-to-bracket | Sign In').",
|
||||
@@ -248,6 +248,8 @@ const DESCRIPTIONS = {
|
||||
footer_links: 'Footer links as JSON array: [{\"label\":\"Terms\",\"url\":\"/tos\"}].',
|
||||
footer_bg_dark: "Footer background for dark mode. Leave blank for default.",
|
||||
footer_bg_light: "Footer background for light mode.",
|
||||
footer_text_color_dark: "Footer text color for dark mode. Applies to site name, links, copyright, and description.",
|
||||
footer_text_color_light: "Footer text color for light mode.",
|
||||
footer_border_style: "Border style at the top of the footer bar.",
|
||||
};
|
||||
|
||||
@@ -264,7 +266,7 @@ const TABS = [
|
||||
"orb_color", "orb_opacity",
|
||||
"scroll_animation", "staggered_reveal_enabled", "dynamic_background_enabled",
|
||||
"mouse_parallax_enabled", "scroll_progress_enabled",
|
||||
"google_font_name", "title_font_name", "fontawesome_enabled"
|
||||
"google_font_name", "title_font_name", "icon_library"
|
||||
])
|
||||
},
|
||||
{
|
||||
@@ -391,7 +393,9 @@ const TABS = [
|
||||
label: "Footer",
|
||||
settings: new Set([
|
||||
"footer_description", "footer_text", "footer_links",
|
||||
"footer_bg_dark", "footer_bg_light", "footer_border_style"
|
||||
"footer_bg_dark", "footer_bg_light",
|
||||
"footer_text_color_dark", "footer_text_color_light",
|
||||
"footer_border_style"
|
||||
])
|
||||
}
|
||||
];
|
||||
@@ -958,23 +962,38 @@ function getCsrfToken() {
|
||||
}
|
||||
|
||||
async function uploadFile(file) {
|
||||
console.log("[CL Upload] Starting upload:", {
|
||||
name: file.name,
|
||||
type: file.type,
|
||||
size: `${(file.size / 1024 / 1024).toFixed(2)} MB`,
|
||||
});
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
formData.append("upload_type", "site_setting");
|
||||
formData.append("for_site_setting", "true");
|
||||
formData.append("synchronous_uploads", "true");
|
||||
|
||||
const csrfToken = getCsrfToken();
|
||||
console.log("[CL Upload] CSRF token present:", !!csrfToken);
|
||||
|
||||
const response = await fetch("/uploads.json", {
|
||||
method: "POST",
|
||||
headers: { "X-CSRF-Token": getCsrfToken() },
|
||||
headers: { "X-CSRF-Token": csrfToken },
|
||||
body: formData,
|
||||
});
|
||||
|
||||
console.log("[CL Upload] Response status:", response.status, response.statusText);
|
||||
|
||||
if (!response.ok) {
|
||||
const text = await response.text();
|
||||
console.error("[CL Upload] Error response body:", text);
|
||||
throw new Error(`Upload failed (${response.status}): ${text}`);
|
||||
}
|
||||
return response.json();
|
||||
|
||||
const data = await response.json();
|
||||
console.log("[CL Upload] Success:", { id: data.id, url: data.url, short_url: data.short_url });
|
||||
return data;
|
||||
}
|
||||
|
||||
async function pinUpload(uploadId, settingName) {
|
||||
|
||||
@@ -179,7 +179,7 @@ html.dark-scheme .cl-admin-tabs .cl-admin-tab:hover {
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="footer_"],
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="google_"],
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="title_font"],
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="fontawesome_enabled"] {
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="icon_library"] {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ html.dark-scheme .cl-admin-tabs .cl-admin-tab:hover {
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="accent_color"],
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="scroll_animation"],
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="google_font_name"],
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="fontawesome_enabled"],
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="icon_library"],
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="social_twitter_url"],
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="navbar_signin_label"],
|
||||
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="hero_title"],
|
||||
@@ -216,7 +216,7 @@ html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="l
|
||||
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="accent_color"],
|
||||
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="scroll_animation"],
|
||||
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="google_font_name"],
|
||||
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="fontawesome_enabled"],
|
||||
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="icon_library"],
|
||||
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="social_twitter_url"],
|
||||
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="navbar_signin_label"],
|
||||
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="hero_title"],
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
--cl-border-hover: rgba(196, 146, 46, 0.25);
|
||||
--cl-hero-bg: #faf9f6;
|
||||
--cl-hero-text: #1a1a2e;
|
||||
--cl-footer-bg: #f5f4ef;
|
||||
--cl-footer-bg: #ffffff;
|
||||
--cl-shadow: rgba(0, 0, 0, 0.04);
|
||||
--cl-glass: rgba(255, 255, 255, 0.7);
|
||||
--cl-glass-border: rgba(0, 0, 0, 0.04);
|
||||
@@ -81,7 +81,7 @@
|
||||
--cl-border-hover: rgba(212, 162, 78, 0.3);
|
||||
--cl-hero-bg: #faf6f0;
|
||||
--cl-hero-text: #1a1a2e;
|
||||
--cl-footer-bg: #f5f0e8;
|
||||
--cl-footer-bg: #ffffff;
|
||||
--cl-shadow: rgba(0, 0, 0, 0.06);
|
||||
--cl-glass: rgba(255, 255, 255, 0.6);
|
||||
--cl-glass-border: rgba(0, 0, 0, 0.05);
|
||||
@@ -390,6 +390,18 @@ html, .cl-body {
|
||||
margin: 0 0.35em;
|
||||
}
|
||||
|
||||
/* Google Material Symbols icon spacing inside buttons */
|
||||
.cl-btn .material-symbols-outlined {
|
||||
margin: 0 0.35em;
|
||||
font-size: 1.1em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.cl-participation-stat__icon.material-symbols-outlined {
|
||||
font-size: 0.85em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
1. NAVBAR — logo left, theme toggle + auth right
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
@@ -1514,8 +1526,9 @@ html, .cl-body {
|
||||
border-radius: 6px;
|
||||
font-size: 0.65rem;
|
||||
font-weight: 800;
|
||||
color: #fff;
|
||||
background: var(--cat-color);
|
||||
color: var(--cl-text-strong);
|
||||
background: var(--cl-secondary-btn-bg, var(--cl-accent-subtle));
|
||||
border: 1px solid var(--cl-accent);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
white-space: nowrap;
|
||||
@@ -2034,7 +2047,7 @@ html, .cl-body {
|
||||
}
|
||||
|
||||
.cl-footer-desc__text {
|
||||
color: var(--cl-muted);
|
||||
color: var(--cl-footer-text, var(--cl-muted));
|
||||
font-size: 0.88rem;
|
||||
line-height: 1.7;
|
||||
}
|
||||
@@ -2077,7 +2090,7 @@ html, .cl-body {
|
||||
.cl-footer__site-name {
|
||||
font-size: 0.95rem;
|
||||
font-weight: 700;
|
||||
color: var(--cl-text-strong);
|
||||
color: var(--cl-footer-text, var(--cl-text-strong));
|
||||
}
|
||||
|
||||
.cl-footer__links {
|
||||
@@ -2088,7 +2101,7 @@ html, .cl-body {
|
||||
}
|
||||
|
||||
.cl-footer__link {
|
||||
color: var(--cl-muted);
|
||||
color: var(--cl-footer-text, var(--cl-muted));
|
||||
text-decoration: none;
|
||||
font-size: 0.82rem;
|
||||
transition: color 0.2s;
|
||||
@@ -2106,11 +2119,11 @@ html, .cl-body {
|
||||
|
||||
.cl-footer__copy {
|
||||
font-size: 0.75rem;
|
||||
color: var(--cl-muted);
|
||||
color: var(--cl-footer-text, var(--cl-muted));
|
||||
}
|
||||
|
||||
.cl-footer__text {
|
||||
color: var(--cl-muted);
|
||||
color: var(--cl-footer-text, var(--cl-muted));
|
||||
font-size: 0.82rem;
|
||||
padding: 1rem 0 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user