{#if svgContent}
-
+
{@html svgContent}
{:else if logoUrl}
@@ -260,4 +264,4 @@
height: 60px;
}
}
-
\ No newline at end of file
+
diff --git a/src/lib/components/ProjectList.svelte b/src/lib/components/ProjectList.svelte
index 60a056a..a5820f9 100644
--- a/src/lib/components/ProjectList.svelte
+++ b/src/lib/components/ProjectList.svelte
@@ -30,14 +30,14 @@
{/if}
{#each projects as project, index}
-
{/each}
@@ -91,6 +91,5 @@
padding: $unit-3x;
text-align: center;
color: $grey-40;
- font-family: 'cstd', 'Helvetica Neue', Arial, sans-serif;
}
-
\ No newline at end of file
+
diff --git a/src/lib/components/SegmentedController.svelte b/src/lib/components/SegmentedController.svelte
index 6cfa688..08c693b 100644
--- a/src/lib/components/SegmentedController.svelte
+++ b/src/lib/components/SegmentedController.svelte
@@ -162,7 +162,6 @@
text-decoration: none;
font-size: 1rem;
font-weight: 400;
- font-family: 'cstd', 'Helvetica Neue', Helvetica, Arial, sans-serif;
position: relative;
z-index: 2;
transition:
diff --git a/src/lib/components/SmartImage.svelte b/src/lib/components/SmartImage.svelte
new file mode 100644
index 0000000..dda4be7
--- /dev/null
+++ b/src/lib/components/SmartImage.svelte
@@ -0,0 +1,133 @@
+
+
+

+
+
\ No newline at end of file
diff --git a/src/lib/components/admin/AdminNavBar.svelte b/src/lib/components/admin/AdminNavBar.svelte
index 2f8209f..b2f0b21 100644
--- a/src/lib/components/admin/AdminNavBar.svelte
+++ b/src/lib/components/admin/AdminNavBar.svelte
@@ -1,20 +1,24 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/lib/components/admin/DeleteConfirmationModal.svelte b/src/lib/components/admin/DeleteConfirmationModal.svelte
index d2b1c3e..a740b98 100644
--- a/src/lib/components/admin/DeleteConfirmationModal.svelte
+++ b/src/lib/components/admin/DeleteConfirmationModal.svelte
@@ -1,5 +1,6 @@
@@ -77,11 +84,11 @@
content={data}
{onUpdate}
editable={!readOnly}
- {showToolbar}
+ showToolbar={!simpleMode && showToolbar}
{placeholder}
- showSlashCommands={true}
- showLinkBubbleMenu={true}
- showTableBubbleMenu={true}
+ showSlashCommands={!simpleMode}
+ showLinkBubbleMenu={!simpleMode}
+ showTableBubbleMenu={false}
class="editor-content"
/>
@@ -171,7 +178,6 @@
}
:global(.edra .ProseMirror) {
- font-family: 'cstd', 'Helvetica Neue', Arial, sans-serif;
font-size: 16px;
line-height: 1.6;
color: $grey-10;
@@ -180,7 +186,6 @@
}
:global(.edra .ProseMirror h1) {
- font-family: 'cstd', 'Helvetica Neue', Arial, sans-serif;
font-size: 2rem;
font-weight: 700;
margin: $unit-3x 0 $unit-2x;
@@ -188,7 +193,6 @@
}
:global(.edra .ProseMirror h2) {
- font-family: 'cstd', 'Helvetica Neue', Arial, sans-serif;
font-size: 1.5rem;
font-weight: 600;
margin: $unit-3x 0 $unit-2x;
@@ -196,7 +200,6 @@
}
:global(.edra .ProseMirror h3) {
- font-family: 'cstd', 'Helvetica Neue', Arial, sans-serif;
font-size: 1.25rem;
font-weight: 600;
margin: $unit-3x 0 $unit-2x;
@@ -335,7 +338,6 @@
:global(.edra-media-placeholder-text) {
font-size: 1rem;
color: $grey-30;
- font-family: 'cstd', 'Helvetica Neue', Arial, sans-serif;
}
// Image container styles
@@ -372,7 +374,6 @@
border-radius: 4px;
font-size: 0.875rem;
color: $grey-30;
- font-family: 'cstd', 'Helvetica Neue', Arial, sans-serif;
background: $grey-95;
&:focus {
diff --git a/src/lib/components/admin/EditorWithUpload.svelte b/src/lib/components/admin/EditorWithUpload.svelte
index ce32827..2a95455 100644
--- a/src/lib/components/admin/EditorWithUpload.svelte
+++ b/src/lib/components/admin/EditorWithUpload.svelte
@@ -69,7 +69,7 @@
// Filter out unwanted commands
const getFilteredCommands = () => {
const filtered = { ...commands }
-
+
// Remove these groups entirely
delete filtered['undo-redo']
delete filtered['headings'] // In text style dropdown
@@ -77,60 +77,60 @@
delete filtered['alignment'] // Not needed
delete filtered['table'] // Not needed
delete filtered['media'] // Will be in media dropdown
-
+
// Reorganize text-formatting commands
if (filtered['text-formatting']) {
const allCommands = filtered['text-formatting'].commands
const basicFormatting = []
const advancedFormatting = []
-
+
// Group basic formatting first
const basicOrder = ['bold', 'italic', 'underline', 'strike']
- basicOrder.forEach(name => {
- const cmd = allCommands.find(c => c.name === name)
+ basicOrder.forEach((name) => {
+ const cmd = allCommands.find((c) => c.name === name)
if (cmd) basicFormatting.push(cmd)
})
-
+
// Then link and code
const advancedOrder = ['link', 'code']
- advancedOrder.forEach(name => {
- const cmd = allCommands.find(c => c.name === name)
+ advancedOrder.forEach((name) => {
+ const cmd = allCommands.find((c) => c.name === name)
if (cmd) advancedFormatting.push(cmd)
})
-
+
// Create two groups
filtered['basic-formatting'] = {
name: 'Basic Formatting',
label: 'Basic Formatting',
commands: basicFormatting
}
-
+
filtered['advanced-formatting'] = {
name: 'Advanced Formatting',
label: 'Advanced Formatting',
commands: advancedFormatting
}
-
+
// Remove original text-formatting
delete filtered['text-formatting']
}
-
+
return filtered
}
-
+
// Get media commands, but filter out iframe
const getMediaCommands = () => {
if (commands.media) {
- return commands.media.commands.filter(cmd => cmd.name !== 'iframe-placeholder')
+ return commands.media.commands.filter((cmd) => cmd.name !== 'iframe-placeholder')
}
return []
}
-
+
const filteredCommands = getFilteredCommands()
const colorCommands = commands.colors.commands
const fontCommands = commands.fonts.commands
const excludedCommands = ['colors', 'fonts']
-
+
// Get current text style for dropdown
const getCurrentTextStyle = (editor: Editor) => {
if (editor.isActive('heading', { level: 1 })) return 'Heading 1'
@@ -143,7 +143,7 @@
if (editor.isActive('blockquote')) return 'Blockquote'
return 'Paragraph'
}
-
+
// Calculate dropdown position
const updateDropdownPosition = () => {
if (dropdownTriggerRef) {
@@ -154,7 +154,7 @@
}
}
}
-
+
// Toggle dropdown with position update
const toggleDropdown = () => {
if (!showTextStyleDropdown) {
@@ -162,7 +162,7 @@
}
showTextStyleDropdown = !showTextStyleDropdown
}
-
+
// Update media dropdown position
const updateMediaDropdownPosition = () => {
if (mediaDropdownTriggerRef) {
@@ -173,7 +173,7 @@
}
}
}
-
+
// Toggle media dropdown
const toggleMediaDropdown = () => {
if (!showMediaDropdown) {
@@ -181,7 +181,7 @@
}
showMediaDropdown = !showMediaDropdown
}
-
+
// Close dropdown when clicking outside
const handleClickOutside = (event: MouseEvent) => {
const target = event.target as HTMLElement
@@ -192,7 +192,7 @@
showMediaDropdown = false
}
}
-
+
$effect(() => {
if (showTextStyleDropdown || showMediaDropdown) {
document.addEventListener('click', handleClickOutside)
@@ -341,18 +341,26 @@
@@ -384,14 +404,14 @@
{editor}
style={`color: ${editor.getAttributes('textStyle').color};`}
onclick={() => {
- const color = editor.getAttributes('textStyle').color;
- const hasColor = editor.isActive('textStyle', { color });
+ const color = editor.getAttributes('textStyle').color
+ const hasColor = editor.isActive('textStyle', { color })
if (hasColor) {
- editor.chain().focus().unsetColor().run();
+ editor.chain().focus().unsetColor().run()
} else {
- const color = prompt('Enter the color of the text:');
+ const color = prompt('Enter the color of the text:')
if (color !== null) {
- editor.chain().focus().setColor(color).run();
+ editor.chain().focus().setColor(color).run()
}
}
}}
@@ -401,13 +421,13 @@
{editor}
style={`background-color: ${editor.getAttributes('highlight').color};`}
onclick={() => {
- const hasHightlight = editor.isActive('highlight');
+ const hasHightlight = editor.isActive('highlight')
if (hasHightlight) {
- editor.chain().focus().unsetHighlight().run();
+ editor.chain().focus().unsetHighlight().run()
} else {
- const color = prompt('Enter the color of the highlight:');
+ const color = prompt('Enter the color of the highlight:')
if (color !== null) {
- editor.chain().focus().setHighlight({ color }).run();
+ editor.chain().focus().setHighlight({ color }).run()
}
}
}}
@@ -445,38 +465,77 @@
{#if showMediaDropdown}
-