Skip to content

Commit 1dd0ba2

Browse files
committed
Add responsive CSS for wide screens and mobile devices
- Custom SCSS for better wide screen support (> 1400px, > 1800px) - Mobile improvements for readability (< 768px, < 480px) - Better table, code block, and button styling - Improved navigation and search box styling
1 parent 8cfbbf5 commit 1dd0ba2

2 files changed

Lines changed: 157 additions & 0 deletions

File tree

docs/_config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ repository: aws-samples/sample-bedrock-agentcore-gateway-user-federation
1313
theme: just-the-docs
1414
color_scheme: light
1515

16+
# Responsive layout
17+
ga_tracking: false
18+
nav_external_links_new_tab: true
19+
20+
# Custom SASS for responsive design
21+
sass:
22+
style: compressed
23+
1624
# Plugins
1725
plugins:
1826
- jekyll-seo-tag

docs/_sass/custom/custom.scss

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
// Custom responsive styles for AgentCore Gateway documentation
2+
3+
// Wide screen improvements (> 1400px)
4+
@media (min-width: 1400px) {
5+
.main-content {
6+
max-width: 1200px;
7+
}
8+
9+
.side-bar {
10+
width: 300px;
11+
}
12+
13+
// Better code block width on wide screens
14+
.highlight {
15+
max-width: 100%;
16+
}
17+
18+
// Wider tables
19+
.table-wrapper {
20+
max-width: 100%;
21+
overflow-x: auto;
22+
}
23+
}
24+
25+
// Extra wide screens (> 1800px)
26+
@media (min-width: 1800px) {
27+
.main-content {
28+
max-width: 1400px;
29+
}
30+
31+
.side-bar {
32+
width: 320px;
33+
}
34+
}
35+
36+
// Mobile improvements (< 768px)
37+
@media (max-width: 768px) {
38+
// Improve readability on mobile
39+
.main-content {
40+
padding: 1rem;
41+
font-size: 16px;
42+
line-height: 1.6;
43+
}
44+
45+
// Better heading sizes on mobile
46+
h1 {
47+
font-size: 1.75rem !important;
48+
}
49+
50+
h2 {
51+
font-size: 1.5rem !important;
52+
}
53+
54+
// Stack table cells on mobile
55+
.table-wrapper {
56+
overflow-x: auto;
57+
-webkit-overflow-scrolling: touch;
58+
}
59+
60+
// Better code blocks on mobile
61+
.highlight {
62+
font-size: 14px;
63+
overflow-x: auto;
64+
}
65+
66+
pre {
67+
padding: 0.75rem;
68+
}
69+
70+
// Better button sizing on mobile
71+
.btn {
72+
display: block;
73+
width: 100%;
74+
margin-bottom: 0.5rem;
75+
text-align: center;
76+
}
77+
}
78+
79+
// Small mobile (< 480px)
80+
@media (max-width: 480px) {
81+
.main-content {
82+
padding: 0.75rem;
83+
}
84+
85+
h1.fs-9 {
86+
font-size: 1.5rem !important;
87+
}
88+
89+
.fs-6 {
90+
font-size: 1rem !important;
91+
}
92+
}
93+
94+
// General improvements
95+
.main-content {
96+
// Smooth transitions
97+
transition: max-width 0.2s ease;
98+
}
99+
100+
// Better table styling
101+
table {
102+
width: 100%;
103+
border-collapse: collapse;
104+
}
105+
106+
th, td {
107+
padding: 0.75rem;
108+
text-align: left;
109+
border-bottom: 1px solid #e1e4e8;
110+
}
111+
112+
// Improve code readability
113+
code {
114+
font-size: 0.9em;
115+
padding: 0.2em 0.4em;
116+
border-radius: 3px;
117+
}
118+
119+
// Better link visibility
120+
a:hover {
121+
text-decoration: underline;
122+
}
123+
124+
// Navigation improvements
125+
.site-nav {
126+
padding-top: 1rem;
127+
}
128+
129+
.nav-list-link {
130+
padding: 0.5rem 1rem;
131+
transition: background-color 0.15s ease;
132+
}
133+
134+
.nav-list-link:hover {
135+
background-color: rgba(0, 0, 0, 0.05);
136+
}
137+
138+
// Search box improvements
139+
.search-input {
140+
border-radius: 4px;
141+
padding: 0.5rem 1rem;
142+
}
143+
144+
// Footer styling
145+
.site-footer {
146+
padding: 1rem;
147+
font-size: 0.85rem;
148+
border-top: 1px solid #e1e4e8;
149+
}

0 commit comments

Comments
 (0)