@@ -94,27 +94,159 @@ if (!isset($config["languages"])) {
94
94
</head>
95
95
<body class="<?php echo $ curr ; ?> <?php echo $ classes ; ?> ">
96
96
97
- <nav id="head-nav" class="navbar navbar-fixed-top">
98
- <div class="navbar-inner clearfix">
99
- <a href="/" class="brand"><img src="/images/logos/php-logo.svg" width="48" height="24" alt="php"></a>
100
- <div id="mainmenu-toggle-overlay"></div>
101
- <input type="checkbox" id="mainmenu-toggle">
102
- <ul class="nav">
103
- <li class="<?php echo $ curr == "downloads " ? "active " : "" ?> "><a href="/downloads">Downloads</a></li>
104
- <li class="<?php echo $ curr == "docs " ? "active " : "" ?> "><a href="/docs.php">Documentation</a></li>
105
- <li class="<?php echo $ curr == "community " ? "active " : "" ?> "><a href="/get-involved" >Get Involved</a></li>
106
- <li class="<?php echo $ curr == "help " ? "active " : "" ?> "><a href="/support">Help</a></li>
107
- <li class="<?php echo $ curr === "php8 " ? "active " : "" ?> ">
108
- <a href="/releases/8.3/index.php">
109
- <img src="/images/php8/logo_php8_3.svg" alt="php8.3" height="22" width="60">
110
- </a>
111
- </li>
112
- </ul>
113
- <form class="navbar-search" id="topsearch" action="/search.php">
114
- <input type="hidden" name="show" value="quickref">
115
- <input type="search" name="pattern" class="search-query" placeholder="Search" accesskey="s">
116
- </form>
97
+ <nav class="navbar navbar-fixed-top">
98
+ <div class="navbar__inner">
99
+ <a href="/" aria-label="PHP Home" class="navbar__brand">
100
+ <img
101
+ src="/images/logos/php-logo-white.svg"
102
+ aria-hidden="true"
103
+ width="80"
104
+ height="40"
105
+ >
106
+ </a>
107
+
108
+ <div
109
+ id="navbar__offcanvas"
110
+ tabindex="-1"
111
+ class="navbar__offcanvas"
112
+ aria-label="Menu"
113
+ >
114
+ <button
115
+ id="navbar__close-button"
116
+ class="navbar__icon-item navbar_icon-item--visually-aligned navbar__close-button"
117
+ >
118
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24" fill="currentColor"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>
119
+ </button>
120
+
121
+ <ul class="navbar__nav">
122
+ <?php foreach (get_nav_items () as $ entry ): ?>
123
+ <?php
124
+ $ isActive = $ curr == $ entry ->id ;
125
+ $ activeClass = $ isActive ? 'navbar__link--active ' : '' ;
126
+ $ releaseClass = $ entry ->image ? 'navbar__release ' : '' ;
127
+ ?>
128
+ <li class="navbar__item">
129
+ <a
130
+ href="<?= $ entry ->href ?> "
131
+ <?= $ isActive ? 'aria-current="page" ' : '' ?>
132
+ class="navbar__link <?= "$ activeClass $ releaseClass " ?> "
133
+ >
134
+ <?php if ($ entry ->image ): ?>
135
+ <img src="<?= $ entry ->image ?> " alt="<?= $ entry ->name ?> ">
136
+ <?php else : ?>
137
+ <?= $ entry ->name ?>
138
+ <?php endif ; ?>
139
+ </a>
140
+ </li>
141
+ <?php endforeach ; ?>
142
+ </ul>
143
+ </div>
144
+
145
+ <div class="navbar__right">
146
+ <?php
147
+ // https://feathericons.com search
148
+ $ searchIcon = <<<SVG
149
+ <svg
150
+ xmlns="http://www.w3.org/2000/svg"
151
+ aria-hidden="true"
152
+ width="24"
153
+ viewBox="0 0 24 24"
154
+ fill="none"
155
+ stroke="currentColor"
156
+ stroke-width="2"
157
+ stroke-linecap="round"
158
+ stroke-linejoin="round"
159
+ >
160
+ <circle cx="11" cy="11" r="8"></circle>
161
+ <line x1="21" y1="21" x2="16.65" y2="16.65"></line>
162
+ </svg>
163
+ SVG ;
164
+
165
+ // https://pictogrammers.com/library/mdi/icon/menu/
166
+ $ menuIcon = <<<SVG
167
+ <svg xmlns="http://www.w3.org/2000/svg"
168
+ aria-hidden="true"
169
+ width="24"
170
+ viewBox="0 0 24 24"
171
+ fill="currentColor"
172
+ >
173
+ <path d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" />
174
+ </svg>
175
+ SVG ;
176
+ ?>
177
+
178
+ <!-- Desktop default search -->
179
+ <form
180
+ action="/manual-lookup.php"
181
+ class="navbar__search-form"
182
+ >
183
+ <label for="navbar__search-input" aria-label="Search docs">
184
+ <?= $ searchIcon ?>
185
+ </label>
186
+ <input
187
+ type="search"
188
+ name="pattern"
189
+ id="navbar__search-input"
190
+ class="navbar__search-input"
191
+ placeholder="Search docs"
192
+ accesskey="s"
193
+ >
194
+ <input type="hidden" name="scope" value="quickref">
195
+ </form>
196
+
197
+ <!-- Desktop encanced search -->
198
+ <button
199
+ id="navbar__search-button"
200
+ class="navbar__search-button"
201
+ hidden
202
+ >
203
+ <?= $ searchIcon ?>
204
+ Search docs
205
+ </button>
206
+
207
+ <!-- Mobile default items -->
208
+ <a
209
+ id="navbar__search-link"
210
+ href="/lookup-form.php"
211
+ aria-label="Search docs"
212
+ class="navbar__icon-item navbar__search-link"
213
+ >
214
+ <?= $ searchIcon ?>
215
+ </a>
216
+ <a
217
+ id="navbar__menu-link"
218
+ href="/menu.php"
219
+ aria-label="Menu"
220
+ class="navbar__icon-item navbar_icon-item--visually-aligned navbar_menu-link"
221
+ >
222
+ <?= $ menuIcon ?>
223
+ </a>
224
+
225
+ <!-- Mobile enhanced items -->
226
+ <button
227
+ id="navbar__search-button-mobile"
228
+ aria-label="Search docs"
229
+ class="navbar__icon-item navbar__search-button-mobile"
230
+ hidden
231
+ >
232
+ <?= $ searchIcon ?>
233
+ </button>
234
+ <button
235
+ id="navbar__menu-button"
236
+ aria-label="Menu"
237
+ class="navbar__icon-item navbar_icon-item--visually-aligned"
238
+ hidden
239
+ >
240
+ <?= $ menuIcon ?>
241
+ </button>
242
+ </div>
243
+
244
+ <div
245
+ id="navbar__backdrop"
246
+ class="navbar__backdrop"
247
+ ></div>
117
248
</div>
249
+
118
250
<div id="flash-message"></div>
119
251
</nav>
120
252
<?php if (!empty ($ config ["headsup " ])): ?>
0 commit comments