Skip to content

Commit ef7ee20

Browse files
authored
Merge pull request #130 from DefGuard/blog/ssl-vpn-article
Blog/ssl vpn article
2 parents ef8b13c + fe57f59 commit ef7ee20

File tree

4 files changed

+473
-0
lines changed

4 files changed

+473
-0
lines changed
1.97 MB
Loading

src/components/TableWrapper.astro

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
// src/components/TableWrapper.astro
3+
// Wrapper component for responsive tables in MDX
4+
---
5+
6+
<div class="table-wrapper">
7+
<slot />
8+
</div>
9+
10+
<style>
11+
.table-wrapper {
12+
width: 100%;
13+
overflow-x: auto;
14+
-webkit-overflow-scrolling: touch;
15+
border: 1px solid #e0e0e0;
16+
border-radius: 8px;
17+
margin: 2rem 0;
18+
}
19+
20+
.table-wrapper :global(table) {
21+
min-width: 600px;
22+
width: 100%;
23+
margin: 0;
24+
border: none;
25+
box-shadow: none;
26+
border-collapse: collapse;
27+
}
28+
29+
.table-wrapper :global(th),
30+
.table-wrapper :global(td) {
31+
padding: 12px 16px;
32+
border-bottom: 1px solid #dee2e6;
33+
text-align: left;
34+
vertical-align: top;
35+
}
36+
37+
.table-wrapper :global(th) {
38+
font-weight: 600;
39+
color: var(--text-body-primary);
40+
background-color: #f8f9fa;
41+
}
42+
43+
.table-wrapper :global(td) {
44+
color: var(--text-body-primary);
45+
}
46+
47+
.table-wrapper :global(tbody tr:nth-child(even)) {
48+
background-color: #fdfdfd;
49+
}
50+
51+
.table-wrapper :global(tbody tr:last-child td) {
52+
border-bottom: none;
53+
}
54+
55+
/* Subtle hint that table is scrollable */
56+
@media (max-width: 768px) {
57+
.table-wrapper::after {
58+
content: '← Scroll →';
59+
display: block;
60+
text-align: center;
61+
font-size: 0.75rem;
62+
color: #999;
63+
padding: 8px;
64+
background: linear-gradient(to right, transparent, #f8f9fa 20%, #f8f9fa 80%, transparent);
65+
}
66+
}
67+
</style>
68+
69+

0 commit comments

Comments
 (0)