From bad7089e8948149230036c1346f1b0cd5f6cb107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?= Date: Wed, 12 Aug 2026 15:31:47 +0300 Subject: [PATCH] refactor: simplify Teknopark KDV box by removing interactive toggle and update markdown table rendering to include responsive overflow wrappers --- resources/views/proposals/show.blade.php | 158 +++++++++-------------- 1 file changed, 62 insertions(+), 96 deletions(-) diff --git a/resources/views/proposals/show.blade.php b/resources/views/proposals/show.blade.php index ea710d6..86980bb 100644 --- a/resources/views/proposals/show.blade.php +++ b/resources/views/proposals/show.blade.php @@ -74,65 +74,55 @@ box-shadow: 0 0 8px var(--accent-color-glow); } - /* Rendered Markdown Styling */ - .proposal-content h1 { - font-family: 'Outfit', sans-serif; - font-size: 2.25rem; - font-weight: 800; - color: #0f172a; - margin-top: 2rem; - margin-bottom: 1rem; - line-height: 1.2; + /* Rendered Markdown Styling & Responsive Overflow Control */ + .proposal-content { + word-break: break-word; + overflow-wrap: anywhere; } - .dark .proposal-content h1 { color: #f8fafc; } - - .proposal-content h2 { - font-family: 'Outfit', sans-serif; - font-size: 1.6rem; - font-weight: 700; - color: #1e293b; - margin-top: 2.5rem; - margin-bottom: 1rem; - padding-bottom: 0.5rem; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); - line-height: 1.3; - } - .dark .proposal-content h2 { - color: #f1f5f9; - border-bottom: 1px solid rgba(255, 255, 255, 0.05); - } - - .proposal-content h3 { - font-family: 'Outfit', sans-serif; - font-size: 1.25rem; - font-weight: 600; - color: #334155; - margin-top: 1.8rem; - margin-bottom: 0.75rem; - } - .dark .proposal-content h3 { color: #e2e8f0; } - .proposal-content p { - font-size: 1rem; - line-height: 1.7; - color: #475569; - margin-bottom: 1.25rem; + .proposal-content img { + max-width: 100%; + height: auto; + border-radius: 12px; + } + + .proposal-content pre { + max-width: 100%; + overflow-x: auto; + border-radius: 12px; + white-space: pre-wrap; + word-break: break-word; + } + + .proposal-content code { + word-break: break-word; + } + + /* Responsive Table Wrapper */ + .table-responsive { + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + margin: 1.5rem 0; + border-radius: 12px; + border: 1px solid rgba(0, 0, 0, 0.06); + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03); + } + .dark .table-responsive { + border: 1px solid rgba(255, 255, 255, 0.06); + box-shadow: none; } - .dark .proposal-content p { color: #94a3b8; } - /* Tables inside Markdown styling */ .proposal-content table { width: 100%; - margin: 2rem 0; + min-width: 600px; + margin: 0; border-collapse: collapse; - font-size: 0.925rem; - border-radius: 12px; - overflow: hidden; - border: 1px solid rgba(0, 0, 0, 0.05); - box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); + font-size: 0.9rem; + border: none; } .dark .proposal-content table { - border: 1px solid rgba(255, 255, 255, 0.05); + border: none; box-shadow: none; } @@ -706,8 +696,8 @@ - - @if($proposal->total_price && ($proposal->meta['show_calculator'] ?? true)) + + @if($proposal->total_price)
@@ -719,39 +709,29 @@ - Teknopark KDV Muafiyeti Avantajı + Teknopark KDV Muafiyeti (%0 KDV)

- 4691 Sayılı Kanun KDV Muafiyeti + 4691 Sayılı Kanun KDV Muafiyetli Net Fiyat

- Trunçgil Teknoloji, Gaziantep Üniversitesi Teknoparkı bünyesinde AR-GE yürüten tescilli bir kuruluştur. Kanun kapsamında geliştirdiğimiz yazılım çözümleri KDV'den (%0 KDV) istisnadır. Bu sayede maliyetlerinizde doğrudan avantaj sağlarsınız. + Trunçgil Teknoloji, Gaziantep Üniversitesi Teknoparkı bünyesinde AR-GE yürüten tescilli bir kuruluştur. 4691 Sayılı Kanun kapsamında geliştirdiğimiz yazılım çözümleri KDV'den (%0 KDV) istisnadır.

- +
-
- KDV Muafiyeti Göster - - - -
- -
-
Teknopark Avantajlı Fiyat (%0 KDV)
-
+
+
Teknopark Muafiyetli Net Fiyat (%0 KDV)
+
{{ number_format($proposal->total_price, 2, ',', '.') }} {{ $proposal->currency === 'USD' ? 'USD' : ($proposal->currency === 'EUR' ? 'EUR' : 'TL') }}
-
+
- %20 standart KDV oranına kıyasla toplamda {{ number_format($proposal->total_price * 0.20, 2, ',', '.') }} kazanç sağladınız. + %20 standart KDV oranına kıyasla toplamda {{ number_format($proposal->total_price * 0.20, 2, ',', '.') }} {{ $proposal->currency === 'USD' ? 'USD' : ($proposal->currency === 'EUR' ? 'EUR' : 'TL') }} net KDV tasarrufu sağlandı.
@@ -1024,6 +1004,16 @@ const preprocessedText = parseGithubAlerts(rawMarkdown); contentDiv.innerHTML = marked.parse(preprocessedText); + // Auto-wrap markdown tables in responsive overflow wrapper to prevent design overflow + contentDiv.querySelectorAll('table').forEach(table => { + if (!table.parentElement.classList.contains('table-responsive')) { + const wrapper = document.createElement('div'); + wrapper.className = 'table-responsive'; + table.parentNode.insertBefore(wrapper, table); + wrapper.appendChild(table); + } + }); + // Render Mermaid Diagrams const isDark = document.documentElement.classList.contains('dark'); mermaid.initialize({ @@ -1495,31 +1485,7 @@ }); }); - // 4. KDV Switch Calculator Logic - const kdvToggle = document.getElementById('kdv-toggle'); - const kdvLabel = document.getElementById('kdv-label'); - const kdvPrice = document.getElementById('kdv-price'); - const kdvBenefitBox = document.getElementById('kdv-benefit-box'); - - if (kdvToggle) { - const totalPrice = parseFloat('{{ $proposal->total_price }}'); - const currencySymbol = '{{ $proposal->currency === 'USD' ? 'USD' : ($proposal->currency === 'EUR' ? 'EUR' : 'TL') }}'; - - kdvToggle.addEventListener('change', function() { - if (this.checked) { - // %0 KDV selected (Teknopark exemption) - kdvLabel.textContent = 'Teknopark Avantajlı Fiyat (%0 KDV)'; - kdvPrice.textContent = new Intl.NumberFormat('tr-TR', { minimumFractionDigits: 2 }).format(totalPrice) + ' ' + currencySymbol; - kdvBenefitBox.classList.remove('hidden'); - } else { - // %20 standard KDV added - const priceWithVat = totalPrice * 1.20; - kdvLabel.textContent = 'Standart Fiyat (+%20 KDV)'; - kdvPrice.textContent = new Intl.NumberFormat('tr-TR', { minimumFractionDigits: 2 }).format(priceWithVat) + ' ' + currencySymbol; - kdvBenefitBox.classList.add('hidden'); - } - }); - } + // 4. Client Interaction Actions & Tabs switching // 5. Client Interaction Actions & Tabs switching function switchTab(tab) {