-
-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy patharchweb-mobile.css
More file actions
236 lines (215 loc) · 6.67 KB
/
archweb-mobile.css
File metadata and controls
236 lines (215 loc) · 6.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
/**
* Archweb Mobile Responsive Overrides
*
* This stylesheet provides minimalist mobile responsiveness for archweb.
* It is included after all other CSS to allow for surgical overrides.
*
* Design Constraints:
* 1. ZERO impact on desktop views (>= 850px).
* 2. Pure CSS implementation for the mobile menu (Checkbox Hack).
* 3. Coordination with archlinux_common_style without modifying the submodule.
*/
/* Hide mobile-only interactive elements on desktop to prevent layout shifts */
#anb-toggle, #anb-label {
display: none;
}
@media (max-width: 849px) {
/* Global Reset: Remove fixed min-widths and ensure fluid containers */
body {
min-width: 0 !important;
padding: 0 !important;
}
/* Main Content Container: Uniform spacing and flex-column layout for stacking */
#content {
width: 100% !important;
padding: 0 10px !important;
box-sizing: border-box !important;
display: flex !important;
flex-direction: column !important;
margin-top: 1.5em !important; /* Standardized vertical gap across all templates */
}
/*
* Layout Reordering:
* Uses 'display: contents' on wrapper divs to allow children to participate
* directly in the #content flexbox, enabling precise reordering via 'order'.
*/
#content-left-wrapper,
#content-left,
#content-right {
display: contents !important;
float: none !important;
width: auto !important;
margin: 0 !important;
}
/* Homepage Element Sequence: Intro -> Search -> Updates -> News */
#intro {
order: 1 !important;
margin-top: 0 !important;
}
#pkgsearch {
order: 2 !important;
position: static !important;
}
#pkg-updates {
order: 3 !important;
}
#news {
order: 4 !important;
}
#nav-sidebar { order: 5 !important; }
.widget { order: 6 !important; }
#footer { order: 7 !important; }
header {
position: relative !important;
margin-bottom: 0 !important;
}
/* Suppress empty developer navbar margins to prevent excessive whitespace */
#archdev-navbar {
margin: 0 !important;
display: none !important;
}
/* News Feed: Clear floats and restore logical horizontal flow for headers/icons */
#news h3 {
float: left !important;
display: block !important;
width: auto !important;
margin-bottom: 0.5em !important;
}
#news .rss-icon {
float: right !important;
display: block !important;
margin-top: 0.5em !important;
margin-bottom: 0.5em !important;
}
#news h4 {
clear: both !important;
}
/**
* Mobile Navigation (Hamburger Menu)
* Implementation: Uses a simple "☰" character to avoid external assets.
* Positioning: Anchored to the far right of the relative header wrapper.
*/
#anb-label {
display: block !important;
position: absolute !important;
top: 10px !important;
right: 15px !important;
left: auto !important;
width: 40px !important;
height: 40px !important;
cursor: pointer !important;
z-index: 1001 !important;
}
#anb-label span,
#anb-label span::before,
#anb-label span::after {
display: block !important;
position: absolute !important;
width: 25px !important;
height: 2px !important;
background: #fff !important;
transition: all 0.2s ease-in-out !important;
}
#anb-label span {
top: 19px !important;
right: 7px !important;
}
#anb-label span::before {
content: "" !important;
top: -8px !important;
}
#anb-label span::after {
content: "" !important;
top: 8px !important;
}
#anb-toggle:checked ~ #anb-label span {
background: transparent !important;
}
#anb-toggle:checked ~ #anb-label span::before {
top: 0 !important;
transform: rotate(45deg) !important;
}
#anb-toggle:checked ~ #anb-label span::after {
top: 0 !important;
transform: rotate(-45deg) !important;
}
/* Dropdown Toggle: Displays #archnavbarmenu when checkbox is checked */
#archnavbarmenu {
display: none !important;
width: 100% !important;
background: #333 !important;
clear: both !important;
padding-top: 10px !important;
}
#anb-toggle:checked ~ #archnavbar #archnavbarmenu {
display: block !important;
}
#archnavbar {
position: relative !important;
padding: 10px 15px !important;
height: auto !important;
text-align: left !important;
}
/* Transform horizontal list to vertical stacked items */
#archnavbarlist {
text-align: left !important;
}
#archnavbarlist li {
display: block !important;
padding: 10px 0 !important;
border-bottom: 1px solid #444 !important;
padding-top: 10px !important;
padding-bottom: 10px !important;
}
#archnavbarlist li:last-child {
border-bottom: none !important;
}
/* Input Fields: Ensure full-width fluid behavior on small screens */
input[type=text], input[type=password], textarea {
max-width: 100% !important;
box-sizing: border-box !important;
}
#sys-message {
width: 90% !important;
box-sizing: border-box !important;
}
/* Tables: Enable horizontal scrolling for overflow-prone data grids */
table {
display: block !important;
overflow-x: auto !important;
width: 100% !important;
}
/**
* Package Search Autocomplete
* Override: homepage.js calculates coordinates relative to the viewport.
* Here we force absolute positioning relative to the form container.
*/
#pkgsearch-form {
position: relative !important;
display: block !important;
}
#pkgsearch fieldset {
margin: 0 !important;
padding: 0 !important;
}
#pkgsearch input {
float: none !important;
width: 100% !important;
margin-top: 0.5em !important;
box-sizing: border-box !important;
}
/* Force dropdown visibility and alignment directly under the search input */
.pkgsearch-typeahead {
top: 100% !important;
left: 0 !important;
width: 100% !important;
box-sizing: border-box !important;
position: absolute !important;
display: none;
margin-top: 0 !important;
background: #f6f9fc !important;
border: 1px solid #09c !important;
z-index: 2000 !important;
text-align: left !important;
}
}