Clean up codebase: remove unused demos and test files

- Remove dan-eden-portfolio and devigo-web demo sites
- Clean up demo testing infrastructure and scripts
- Remove frontend test files (html-preservation, style-detection tests)
- Update configuration and auth improvements
- Simplify demo structure to focus on core functionality

This cleanup reduces repository size and focuses on essential demos.
This commit is contained in:
2025-10-19 22:38:17 +02:00
parent dbdd4361b7
commit 74de64c66b
67 changed files with 56 additions and 6026 deletions

View File

@@ -4,6 +4,7 @@ import (
"strings"
"golang.org/x/net/html"
"slices"
)
// GetClasses extracts CSS classes from an HTML node
@@ -19,12 +20,7 @@ func GetClasses(node *html.Node) []string {
// ContainsClass checks if a class list contains a specific class
func ContainsClass(classes []string, target string) bool {
for _, class := range classes {
if class == target {
return true
}
}
return false
return slices.Contains(classes, target)
}
// getAttribute gets an attribute value from an HTML node
@@ -37,29 +33,6 @@ func getAttribute(node *html.Node, key string) string {
return ""
}
// hasOnlyTextContent checks if a node contains only text content (no nested HTML elements)
// DEPRECATED: Use hasEditableContent for more sophisticated detection
func hasOnlyTextContent(node *html.Node) bool {
if node.Type != html.ElementNode {
return false
}
for child := node.FirstChild; child != nil; child = child.NextSibling {
switch child.Type {
case html.ElementNode:
// Found a nested HTML element - not text-only
return false
case html.TextNode:
// Text nodes are fine, continue checking
continue
default:
// Comments, etc. - continue checking
continue
}
}
return true
}
// Inline formatting elements that are safe for editing
var inlineFormattingTags = map[string]bool{
"strong": true,