Skip to content

Commit 706bf4a

Browse files
committed
api.jquery.com: move version support notice to category content
1 parent c92acbe commit 706bf4a

File tree

4 files changed

+15
-121
lines changed

4 files changed

+15
-121
lines changed

themes/api.jquery.com/category.php

-71
This file was deleted.

themes/api.jquery.com/style.css

+5-7
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ a {
3535
padding-left: 1em;
3636
}
3737

38-
/* Support warning at top of API pages */
38+
/* Version support warning at top of API pages */
3939

40-
#support-warning-box {
41-
padding-top: 8px;
42-
padding-left: 8px;
43-
padding-bottom: 8px;
40+
#version-support-warning {
4441
display: flex;
45-
position: relative;
46-
z-index: 1;
42+
align-items: center;
43+
gap: 0.25em;
44+
padding: 0.5em 0 0.5em 0.5em;
4745
}

themes/jquery/css/base.css

+10-2
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ body {
103103
font-weight: normal;
104104
font-style: normal;
105105
}
106+
[class^="icon-"]:before,
107+
[class*=" icon-"]:before {
108+
font-size: 1.2em;
109+
text-decoration: inherit;
110+
display: inline-block;
111+
speak: none;
112+
}
113+
.icon-info-sign:before { content: "\f05a"; }
106114

107115
/* ==========================================================================
108116
Links
@@ -887,10 +895,10 @@ iframe {
887895
#banner {
888896
text-align: center;
889897
background-color: #dddddd;
890-
padding: 4px 20px;
891-
font-size: 15px;
898+
padding: 0.25em 1.25em;
892899
color: #333; /* jQuery Black */
893900
}
901+
894902
#banner a:hover {
895903
text-decoration: none;
896904
}

themes/jquery/functions.php

-41
Original file line numberDiff line numberDiff line change
@@ -252,46 +252,6 @@ function jq_image_posted_on() {
252252
return $classes;
253253
} );
254254

255-
/*
256-
* Determine if the current page is for a deprecated version of jQuery.
257-
* We are concened with two URL structures:
258-
* category/deprecated/deprecated-1.3/
259-
* category/version/1.9/
260-
*
261-
* @returns int True or false
262-
*/
263-
function jq_is_version_deprecated($url) {
264-
$parsedUrl = parse_url($url);
265-
$path = $parsedUrl['path'];
266-
$segments = explode('/', trim($path, '/'));
267-
268-
$versionLessThan3 = false;
269-
270-
if (count($segments) > 2) {
271-
switch (strtolower($segments[1])) {
272-
// Check first URL structure:
273-
// category/deprecated/deprecated-1.3/
274-
case 'deprecated':
275-
// Obtain the version number from the third slug.
276-
$version = floatval(substr($segments[2], 11));
277-
278-
if ($version < 3) $versionLessThan3 = true;
279-
280-
break;
281-
282-
// Check second URL structure:
283-
// category/version/1.9/
284-
case 'version':
285-
$version = floatval($segments[2]);
286-
287-
if ($version < 3) $versionLessThan3 = true;
288-
289-
break;
290-
}
291-
}
292-
return $versionLessThan3;
293-
}
294-
295255
/**
296256
* Content Security Policy
297257
*/
@@ -336,4 +296,3 @@ function jq_content_security_policy() {
336296
}
337297

338298
add_action( 'send_headers', 'jq_content_security_policy' );
339-

0 commit comments

Comments
 (0)