Skip to content

Commit 52e86d3

Browse files
authored
Merge pull request #89 from CitComAI-Hub/develop
Refactor catalogs width tables
2 parents c109feb + d87f557 commit 52e86d3

2 files changed

Lines changed: 39 additions & 4 deletions

File tree

docs/assets/css/ai_assess_catalog.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
.ai-assessment-table table {
55
table-layout: fixed;
66
width: 100%;
7-
min-width: 1500px;
7+
/* Responsive: let container and column min-widths define overflow */
8+
min-width: 0;
89
border-collapse: collapse;
910
}
1011

@@ -92,12 +93,15 @@
9293

9394
/* Widen the page content area for this catalogue */
9495
.catalog-page .md-grid {
95-
max-width: 1600px;
96-
width: min(96vw, 1600px);
96+
/* Fixed side gutters: 24px each, consistent at any viewport width */
97+
max-width: none;
98+
width: calc(100vw - 500px);
9799
}
98100

99101
.catalog-page .md-content__inner {
100-
margin: 0 0.75rem 2.5rem;
102+
/* Keep constant gutters handled by .md-grid; avoid extra padding */
103+
margin: 0 auto 2.5rem;
104+
padding-inline: 0;
101105
}
102106

103107
/* Hide the toggle while the sidebar is open */

docs/data_catalog/index.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,37 @@ hide:
1919
</script>
2020

2121

22+
<!-- Floating toggle for showing the left navigation on hover (Data Catalog) -->
23+
<button class="catalog-nav-toggle" aria-label="Show navigation" title="Show navigation">
24+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
25+
<path d="M3 12c0-.55.45-1 1-1h12.59l-4.3-4.29a1.003 1.003 0 0 1 1.42-1.42l6 6c.39.39.39 1.02 0 1.41l-6 6a1.003 1.003 0 0 1-1.42-1.42L16.59 13H4c-.55 0-1-.45-1-1Z"/>
26+
</svg>
27+
</button>
28+
29+
<script>
30+
// Page-scoped nav hover behaviour for Data Catalog
31+
document.addEventListener('DOMContentLoaded', function () {
32+
const body = document.body;
33+
body.classList.add('catalog-page');
34+
35+
const primary = document.querySelector('.md-sidebar--primary');
36+
const toggle = document.querySelector('.catalog-nav-toggle');
37+
if (!primary || !toggle) return;
38+
39+
let inside = false;
40+
41+
const open = () => body.classList.add('catalog-nav-open');
42+
const close = () => { if (!inside) body.classList.remove('catalog-nav-open'); };
43+
44+
toggle.addEventListener('mouseenter', () => { inside = true; open(); });
45+
toggle.addEventListener('mouseleave', () => { inside = false; setTimeout(close, 120); });
46+
toggle.addEventListener('click', () => { body.classList.toggle('catalog-nav-open'); });
47+
48+
primary.addEventListener('mouseenter', () => { inside = true; open(); });
49+
primary.addEventListener('mouseleave', () => { inside = false; setTimeout(close, 150); });
50+
});
51+
</script>
52+
2253
<div class="catalog-header" markdown>
2354
<div markdown>
2455
The data catalog is a centralized hub to keep track of available datasets. It is regularly updated to include new data as it becomes available in any TEF node. If you want access to any dataset, please click "Contact" to reach the owners.

0 commit comments

Comments
 (0)