From f609da6ad7a2fdc05aa03d13b870ca12a7844b26 Mon Sep 17 00:00:00 2001 From: davegilligan Date: Sun, 24 May 2026 16:33:29 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20dashboard=20tool=20cards=20min-height=20?= =?UTF-8?q?=E2=80=94=20cards=20were=20collapsing=20to=20~100px?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restored min-height:200px + display:flex on .dashboard-tool-card in CSS, and removed the conflicting min-height:0 inline overrides on each card div. Co-Authored-By: Claude Sonnet 4.6 --- assets/css/tools.css | 38 ++------- dashboard.php | 197 ++++++++++++++----------------------------- 2 files changed, 70 insertions(+), 165 deletions(-) diff --git a/assets/css/tools.css b/assets/css/tools.css index 3f2464b..cff16df 100644 --- a/assets/css/tools.css +++ b/assets/css/tools.css @@ -240,14 +240,17 @@ body { .dashboard-tool-card { position: relative; - min-height: 250px; - padding: 22px; + display: flex; + flex-direction: column; + padding: 18px 20px; border: 1px solid var(--dbn-line); border-radius: 8px; background: rgba(255, 255, 255, 0.82); color: var(--dbn-ink); text-decoration: none; overflow: hidden; + min-height: 200px; + cursor: pointer; } .dashboard-tool-card:hover { @@ -255,37 +258,13 @@ body { border-color: rgba(186, 12, 47, 0.36); } -.dashboard-tool-card__icon { - color: rgba(0, 32, 91, 0.14); - font-size: 4.8rem; - font-weight: 900; - line-height: 1; -} - -.dashboard-tool-card__badge { - position: absolute; - top: 20px; - right: 18px; - color: var(--dbn-red); - font-size: 0.75rem; - font-weight: 900; - text-transform: uppercase; -} - -.dashboard-tool-card h2 { - margin: 12px 0 8px; - font-size: 1.45rem; -} - .dashboard-tool-card p { color: #514b43; line-height: 1.48; } -.dashboard-tool-card strong { - position: absolute; - bottom: 20px; - color: var(--dbn-blue); +.dashboard-tool-card--workbench { + border-color: rgba(0, 32, 91, 0.2); } .dbn-public-tools { @@ -466,9 +445,6 @@ body { grid-template-columns: 1fr; } - .dashboard-tool-card { - min-height: 220px; - } } * { diff --git a/dashboard.php b/dashboard.php index 9504287..babb056 100644 --- a/dashboard.php +++ b/dashboard.php @@ -51,6 +51,23 @@ if ($dashIsSso && $dashDetail) { } } +// Tool emoji icons +$toolEmoji = [ + 'transcribe' => '🎙️', + 'timeline' => '📅', + 'redact' => '🔒', + 'summarize' => '📝', + 'legal-analysis'=> '🏛️', + 'korrespond' => '✉️', + 'barnevernet' => '🔍', + 'advocate' => '⚖️', + 'deep-research' => '🔬', + 'discrepancy' => '🔎', + 'corpus' => '📚', + 'citations' => '🔗', + 'translate' => '🌐', +]; + // Tool → MCP slug $toolMcpSlugs = [ 'transcribe' => 'dbn.transcribe_audio', @@ -65,11 +82,11 @@ $toolMcpSlugs = [ 'citations' => 'dbn.citation_graph', ]; -// Tool → About page -$toolAboutPages = [ - 'advocate' => '/advocate-about.php', - 'timeline' => '/timeline-about.php', - 'korrespond' => '/korrespond-about.php', +// Tool → [about, guide, tech] doc page links +$toolDocLinks = [ + 'advocate' => ['/advocate-about.php', '/advocate-guide.php', '/advocate-tech.php'], + 'timeline' => ['/timeline-about.php', '/timeline-guide.php', '/timeline-tech.php'], + 'korrespond' => ['/korrespond-about.php', '/korrespond-guide.php', '/korrespond-tech.php'], ]; // Localized strings for new sections @@ -185,55 +202,6 @@ $dashL = [ ]; $dl = $dashL[$uiLang] ?? $dashL['en']; -// Three flagship tools reference data -$toolRefCards = [ - 'advocate' => [ - 'icon' => '⚖️', - 'mcp' => 'dbn.advocate_brief', - 'about' => '/advocate-about.php', - 'guide' => '/advocate-guide.php', - 'tech' => '/advocate-tech.php', - 'tool' => '/advocate.php', - 'name' => ['en' => 'Advocate', 'no' => 'Advokat', 'uk' => 'Адвокат', 'pl' => 'Adwokat'], - 'desc' => [ - 'en' => 'AI-generated partisan brief grounded in Lovdata + ECHR, framed for your party role. 9 role presets, 220 K+ verified legal passages.', - 'no' => 'AI-generert partisk prosedyre basert på Lovdata + EMD, formulert for din partsrolle. 9 roller, 220 K+ verifiserte rettskilder.', - 'uk' => 'ШІ-стислий виклад позиції на основі Lovdata + ЄСПЛ. 9 ролей, 220 K+ верифікованих правових пасажів.', - 'pl' => 'Brief AI oparty na Lovdata + ETPC, z Twojej perspektywy. 9 ról, 220 K+ zweryfikowanych źródeł prawnych.', - ], - ], - 'timeline' => [ - 'icon' => '📅', - 'mcp' => 'dbn.timeline', - 'about' => '/timeline-about.php', - 'guide' => '/timeline-guide.php', - 'tech' => '/timeline-tech.php', - 'tool' => '/timeline.php', - 'name' => ['en' => 'Timeline', 'no' => 'Tidslinje', 'uk' => 'Хронологія', 'pl' => 'Oś czasu'], - 'desc' => [ - 'en' => 'Extract every key date from case documents into a confidence-scored chronology. Recognises 12+ Norwegian date formats, 5 event types.', - 'no' => 'Trekk ut alle viktige datoer til en konfidensscorert kronologi. Gjenkjenner 12+ norske datoformater og 5 hendelsestyper.', - 'uk' => 'Витягуйте ключові дати з документів справи. 12+ форматів, 5 типів подій, оцінка достовірності.', - 'pl' => 'Wyodrębnij daty z dokumentów sprawy w ocenioną chronologię. 12+ formatów dat, 5 typów zdarzeń.', - ], - ], - 'korrespond' => [ - 'icon' => '✉️', - 'mcp' => 'dbn.korrespond', - 'about' => '/korrespond-about.php', - 'guide' => '/korrespond-guide.php', - 'tech' => '/korrespond-tech.php', - 'tool' => '/korrespond.php', - 'name' => ['en' => 'Korrespond', 'no' => 'Korrespond', 'uk' => 'Кореспонд', 'pl' => 'Korrespond'], - 'desc' => [ - 'en' => 'Statute-grounded authority letters in Norwegian bokmål + your language, side-by-side. Hard-RAG: every § verified — no hallucinated citations.', - 'no' => 'Lovsikre myndighetsbrev på norsk bokmål + ditt språk, side ved side. Hard-RAG: alle §§ verifisert — ingen hallusinerte kilder.', - 'uk' => 'Офіційні листи, підкріплені законами, норвезькою та вашою мовою. Hard-RAG: кожен § перевірений.', - 'pl' => 'Pisma urzędowe oparte na przepisach, po norwesku i w Twoim języku. Hard-RAG: każdy § zweryfikowany.', - ], - ], -]; - require_once __DIR__ . '/includes/tool-svgs.php'; $langSuffix = $uiLang !== 'en' ? '?lang=' . urlencode($uiLang) : ''; ?> @@ -363,66 +331,61 @@ window.DBN_TOOLS_LANG = ;
+
- - -

-

+ onclick="location.href=''" + onkeydown="if(event.key==='Enter'||event.key===' ')location.href=''"> +
+ + + dbn.case_workbench_plan +
+

$item): - $mcpSlug = $toolMcpSlugs[$slug] ?? null; - $aboutUrl = isset($toolAboutPages[$slug]) ? htmlspecialchars($toolAboutPages[$slug] . $langSuffix) : null; - $cardUrl = htmlspecialchars($item['url']); + $mcpSlug = $toolMcpSlugs[$slug] ?? null; + $docs = $toolDocLinks[$slug] ?? null; + $emoji = $toolEmoji[$slug] ?? '🛠️'; + $cardUrl = htmlspecialchars($item['url']); ?>
- - -

-

- @@ -478,41 +441,6 @@ Authorization: Bearer dbn_user
- -
-
-

-

-
-
- $ref): - $refName = $ref['name'][$uiLang] ?? $ref['name']['en']; - $refDesc = $ref['desc'][$uiLang] ?? $ref['desc']['en']; - ?> -
-
- - - - - -
-

-
- - · - - · - - -
-
- -
-
-