diff --git a/app.js b/app.js index c2ed988..57850a8 100644 --- a/app.js +++ b/app.js @@ -35,7 +35,8 @@ class YotoCoversApp { backgroundStyle: 'comic', fontFamily: 'Comic Sans MS', fontWeight: 'bold', - footerColor: '#ff6b6b' + footerColor: '#ff6b6b', + fullBleed: false }, polaroid: { backgroundStyle: 'polaroid', @@ -551,7 +552,7 @@ class YotoCoversApp { // Set title options document.getElementById('card-title-font-size').value = variation.titleFontSize || 20; document.getElementById('card-title-x').value = variation.titleX !== undefined ? variation.titleX : 50; - document.getElementById('card-title-y').value = variation.titleY !== undefined ? variation.titleY : 20; + document.getElementById('card-title-y').value = variation.titleY !== undefined ? variation.titleY : 10; document.getElementById('card-title-draggable').checked = variation.titleDraggable === true; // Set image options @@ -612,13 +613,13 @@ class YotoCoversApp { console.log('No iframe document'); return; } - const titles = iframeDoc.querySelectorAll('.title'); + const titles = iframeDoc.querySelectorAll('.title, .comic-title-panel'); console.log('Found titles:', titles.length); titles.forEach((title, index) => { console.log(`Title ${index} cursor:`, title.style.cursor); - // Only make draggable if cursor is set to 'move' - if (title.style.cursor !== 'move') { + // Only make draggable if cursor is set to 'move' and not a comic panel + if (title.style.cursor !== 'move' || title.classList.contains('comic-title-panel')) { console.log(`Title ${index} not draggable, skipping`); return; } @@ -856,7 +857,7 @@ class YotoCoversApp { cardImagePosition = (variation && variation.imagePosition) || 'center'; cardTitleFontSize = (variation && variation.titleFontSize) || 20; cardTitleX = variation && variation.titleX !== undefined ? variation.titleX : 50; - cardTitleY = variation && variation.titleY !== undefined ? variation.titleY : 20; + cardTitleY = variation && variation.titleY !== undefined ? variation.titleY : 10; cardTitleDraggable = variation && variation.titleDraggable !== undefined ? variation.titleDraggable : false; } else { // No variations - auto-assign images @@ -880,7 +881,7 @@ class YotoCoversApp { cardImagePosition = 'center'; cardTitleFontSize = 20; cardTitleX = 50; - cardTitleY = 20; + cardTitleY = 10; cardTitleDraggable = false; } @@ -932,7 +933,7 @@ class YotoCoversApp { imagePosition: 'center', titleFontSize: 20, titleX: 50, - titleY: 20, + titleY: 10, titleDraggable: false, isVisible: false }); @@ -984,7 +985,7 @@ class YotoCoversApp { font-family: 'DejaVuSans', serif; ${card.isVisible && card.backgroundStyle === 'gradient' ? 'background: linear-gradient(135deg, #e8f4fd 0%, #d1e8f0 100%);' : ''} ${card.isVisible && card.backgroundStyle === 'pattern' ? 'background: linear-gradient(45deg, #f5f5dc 0%, #deb887 100%);' : ''} - ${card.isVisible && card.backgroundStyle === 'comic' ? 'background: repeating-linear-gradient(45deg, #fff 0px, #fff 2px, #000 2px, #000 4px), radial-gradient(circle at 20% 30%, #ff4444, #ff8844, #ffff44, #44ff44, #4444ff, #8844ff); box-shadow: inset 0 0 20px rgba(0,0,0,0.3); border: 3px solid #000;' : ''} + ${card.isVisible && card.backgroundStyle === 'comic' ? 'background: #f9f9f9; border: 1px solid #ccc;' : ''} ${card.isVisible && card.backgroundStyle === 'polaroid' ? 'border: 8px solid #fff; border-bottom: 24px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.3); position: relative;' : ''} ${card.isVisible && card.backgroundStyle === 'polaroid' && !card.fullBleed ? 'background: #f8f9fa;' : ''} ${card.isVisible && card.backgroundStyle === 'solid' ? 'background: #f8f9fa;' : ''} @@ -994,25 +995,102 @@ class YotoCoversApp { overflow: hidden; "> ${card.isVisible ? ` - ${card.showTitle ? `