summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--htdocs/config/types.conf49
-rw-r--r--htdocs/style/results.css11
-rwxr-xr-xhttpd/cgi-bin/check8
-rw-r--r--share/templates/en_US/valid.tmpl38
4 files changed, 83 insertions, 23 deletions
diff --git a/htdocs/config/types.conf b/htdocs/config/types.conf
index 7c3321b..913aa13 100644
--- a/htdocs/config/types.conf
+++ b/htdocs/config/types.conf
@@ -1,7 +1,7 @@
#
# Main Document Type Database for the W3C Markup Validation Service.
#
-# $Id: types.conf,v 1.22 2007-03-07 06:41:12 ot Exp $
+# $Id: types.conf,v 1.23 2007-03-14 07:43:50 ot Exp $
#
# Maintains all information for each of the document types we support.
# See 'perldoc Config::General' for the syntax, and be aware that the
@@ -29,7 +29,8 @@
Preferred = text/html
</Types>
<Badge>
- URI = http://validator.w3.org/images/vh20
+ URI = http://www.w3.org/Icons/valid-html20
+ ALT URI = http://www.w3.org/Icons/valid-html20-blue
</Badge>
</HTML_2_0>
@@ -44,7 +45,8 @@
Preferred = text/html
</Types>
<Badge>
- URI = http://validator.w3.org/images/vh20
+ URI = http://www.w3.org/Icons/valid-html20
+ ALT URI = http://www.w3.org/Icons/valid-html20-blue
</Badge>
</HTML_2_0_Level_2>
@@ -59,7 +61,8 @@
Preferred = text/html
</Types>
<Badge>
- URI = http://validator.w3.org/images/vh20
+ URI = http://www.w3.org/Icons/valid-html20
+ ALT URI = http://www.w3.org/Icons/valid-html20-blue
</Badge>
</HTML_2_0_Strict>
@@ -74,7 +77,8 @@
Preferred = text/html
</Types>
<Badge>
- URI = http://validator.w3.org/images/vh20
+ URI = http://www.w3.org/Icons/valid-html20
+ ALT URI = http://www.w3.org/Icons/valid-html20-blue
</Badge>
</HTML_2_0_Level_1>
@@ -89,7 +93,8 @@
Preferred = text/html
</Types>
<Badge>
- URI = http://validator.w3.org/images/vh20
+ URI = http://www.w3.org/Icons/valid-html20
+ ALT URI = http://www.w3.org/Icons/valid-html20-blue
</Badge>
</HTML_2_0_Strict_Level_1>
@@ -108,6 +113,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-html32
+ ALT URI = http://www.w3.org/Icons/valid-html32-blue
Height = 31
Width = 88
</Badge>
@@ -130,6 +136,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-html40
+ ALT URI = http://www.w3.org/Icons/valid-html40-blue
Height = 31
Width = 88
Alt = Valid HTML 4.0 Strict
@@ -149,6 +156,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-html40
+ ALT URI = http://www.w3.org/Icons/valid-html40-blue
Height = 31
Width = 88
Alt = Valid HTML 4.0 Transitional
@@ -168,6 +176,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-html40
+ ALT URI = http://www.w3.org/Icons/valid-html40-blue
Height = 31
Width = 88
Alt = Valid HTML 4.0 Frameset
@@ -187,6 +196,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-html401
+ ALT URI = http://www.w3.org/Icons/valid-html401-blue
Height = 31
Width = 88
Alt = Valid HTML 4.01 Strict
@@ -206,6 +216,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-html401
+ ALT URI = http://www.w3.org/Icons/valid-html401-blue
Height = 31
Width = 88
Alt = Valid HTML 4.01 Transitional
@@ -225,6 +236,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-html401
+ ALT URI = http://www.w3.org/Icons/valid-html401-blue
Height = 31
Width = 88
Alt = Valid HTML 4.01 Frameset
@@ -245,6 +257,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-xhtml10
+ ALT URI = http://www.w3.org/Icons/valid-xhtml10-blue
Height = 31
Width = 88
Alt = Valid XHTML 1.0 Strict
@@ -265,6 +278,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-xhtml10
+ ALT URI = http://www.w3.org/Icons/valid-xhtml10-blue
Height = 31
Width = 88
Alt = Valid XHTML 1.0 Transitional
@@ -285,6 +299,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-xhtml10
+ ALT URI = http://www.w3.org/Icons/valid-xhtml10-blue
Height = 31
Width = 88
Alt = Valid XHTML 1.0 Frameset
@@ -304,7 +319,8 @@
Preferred = application/xhtml+xml
</Types>
<Badge>
- URI = http://validator.w3.org/images/vxhtml-basic10
+ URI = http://www.w3.org/Icons/valid-xhtmlbasic10
+ ALT URI = http://www.w3.org/Icons/valid-xhtmlbasic10-blue
Height = 31
Width = 88
Alt = Valid XHTML Basic 1.0
@@ -324,6 +340,14 @@
Allowed = application/xhtml+xml
Preferred = application/xhtml+xml
</Types>
+ <Badge>
+ URI = http://www.w3.org/Icons/valid-xhtmlprint10
+ ALT URI = http://www.w3.org/Icons/valid-xhtmlprint10-blue
+ Height = 31
+ Width = 88
+ Alt = Valid XHTML-Print 1.0
+ </Badge>
+
</XHTML-Print_1_0>
<XHTML_1_1>
@@ -340,6 +364,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-xhtml11
+ ALT URI = http://www.w3.org/Icons/valid-xhtml11-blue
Height = 31
Width = 88
Alt = Valid XHTML 1.1
@@ -392,6 +417,13 @@
Allowed = application/mathml+xml
Preferred = application/mathml+xml
</Types>
+ <Badge>
+ URI = http://www.w3.org/Icons/valid-mathml20
+ ALT URI = http://www.w3.org/Icons/valid-mathml20-blue
+ Height = 31
+ Width = 88
+ Alt = Valid MathML 2.0
+ </Badge>
</MathML_2>
<XHTML_1.1_MathML_2>
@@ -436,6 +468,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-svg10
+ ALT URI = http://www.w3.org/Icons/valid-svg10-blue
Alt = Valid SVG 1.0
</Badge>
</SVG_1_0>
@@ -454,6 +487,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-svg11
+ ALT URI = http://www.w3.org/Icons/valid-svg11-blue
Alt = Valid SVG 1.1
</Badge>
</SVG_1_1>
@@ -472,6 +506,7 @@
</Types>
<Badge>
URI = http://www.w3.org/Icons/valid-svgtiny11
+ ALT URI = http://www.w3.org/Icons/valid-svgtiny11-blue
Alt = Valid SVG 1.1 Tiny
</Badge>
</SVG_1_1_Tiny>
diff --git a/htdocs/style/results.css b/htdocs/style/results.css
index 3db2cf9..ec3cf82 100644
--- a/htdocs/style/results.css
+++ b/htdocs/style/results.css
@@ -1,5 +1,5 @@
/* style sheet for the validator's results page */
-/* $Id: results.css,v 1.5 2007-03-09 07:16:46 ot Exp $ */
+/* $Id: results.css,v 1.6 2007-03-14 07:43:50 ot Exp $ */
.input {
color: black;
@@ -279,8 +279,17 @@ td.invalid
img.inline-badge {
float: left;
+ padding: 10px;
+ margin-left: 3em;
}
+pre.badgeSnippet {
+ margin-left: 108px !important; /* give room to the image */
+ padding-left: 3em;
+ font-size: x-small;
+ color: #777;
+ margin-bottom: 2em;
+}
p.backtop {
color: #bbc;
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index caaf364..fd9724e 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -14,7 +14,7 @@
# This source code is available under the license at:
# http://www.w3.org/Consortium/Legal/copyright-software
#
-# $Id: check,v 1.477 2007-03-14 06:33:35 ot Exp $
+# $Id: check,v 1.478 2007-03-14 07:43:50 ot Exp $
#
# Disable buffering on STDOUT!
@@ -180,7 +180,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.477 $;
+ $VERSION = q$Revision: 1.478 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -961,6 +961,10 @@ sub report_valid {
my $cfg = $CFG->{Types}->{$File->{DOCTYPE}};
$T->param(have_badge => TRUE);
$T->param(badge_uri => $cfg->{Badge}->{URI});
+ if (exists $CFG->{Types}->{$File->{DOCTYPE}}->{Badge}->{'ALT URI'}) {
+ $T->param(badge_alt_uri => $cfg->{Badge}->{'ALT URI'});
+ $T->param(have_alt_badge => TRUE);
+ }
$T->param(badge_alt => $cfg->{Badge}->{Alt});
$T->param(badge_h => $cfg->{Badge}->{Height});
$T->param(badge_w => $cfg->{Badge}->{Width});
diff --git a/share/templates/en_US/valid.tmpl b/share/templates/en_US/valid.tmpl
index 4c3bc20..a4e4e80 100644
--- a/share/templates/en_US/valid.tmpl
+++ b/share/templates/en_US/valid.tmpl
@@ -43,34 +43,46 @@
</TMPL_IF>
</p>
<TMPL_IF NAME="have_badge">
+<h4>"valid" Icon(s) on your Web page</h4>
<p>
- <img
- class="inline-badge" src="<TMPL_VAR NAME="badge_uri" ESCAPE="HTML">"
- alt="<TMPL_VAR NAME="badge_alt" ESCAPE="HTML">"
- <TMPL_IF NAME="badge_h">height="<TMPL_VAR NAME="badge_h">"</TMPL_IF>
- <TMPL_IF NAME="badge_w">width="<TMPL_VAR NAME="badge_w">"</TMPL_IF>
- />
To show your readers that you have taken the care to create an
interoperable Web page, you may display this icon on any page
that validates. Here is the HTML you could use to add this icon
to your Web page:
</p>
- <pre>
+ <img
+ class="inline-badge" src="<TMPL_VAR NAME="badge_uri" ESCAPE="HTML">"
+ alt="<TMPL_VAR NAME="badge_alt" ESCAPE="HTML">"
+ <TMPL_IF NAME="badge_h">height="<TMPL_VAR NAME="badge_h">"</TMPL_IF>
+ <TMPL_IF NAME="badge_w">width="<TMPL_VAR NAME="badge_w">"</TMPL_IF>
+ /> <pre class="badgeSnippet">
&lt;p&gt;
&lt;a href="<TMPL_VAR NAME="cfg_home_page" ESCAPE="HTML">check?uri=referer"&gt;&lt;img
src="<TMPL_VAR NAME="badge_uri" ESCAPE="HTML">"
<TMPL_IF NAME="badge_alt">alt="<TMPL_VAR NAME="badge_alt" ESCAPE="HTML">"</TMPL_IF> <TMPL_IF NAME="badge_h">height="<TMPL_VAR NAME="badge_h">"</TMPL_IF> <TMPL_IF NAME="badge_w">width="<TMPL_VAR NAME="badge_w">"</TMPL_IF><TMPL_VAR NAME="badge_tagc">&gt;&lt;/a&gt;
&lt;/p&gt;
</pre>
- <p>
- If you like, you can download a copy of this image (in
- <a href="<TMPL_VAR NAME="badge_uri" ESCAPE="HTML">.png">PNG</a> or
- <a href="<TMPL_VAR NAME="badge_uri" ESCAPE="HTML">.gif">GIF</a>
- format) to keep in your local web directory, and change the HTML fragment
+ <TMPL_IF NAME="have_alt_badge">
+ <img
+ class="inline-badge" src="<TMPL_VAR NAME="badge_alt_uri" ESCAPE="HTML">"
+ alt="<TMPL_VAR NAME="badge_alt" ESCAPE="HTML">"
+ <TMPL_IF NAME="badge_h">height="<TMPL_VAR NAME="badge_h">"</TMPL_IF>
+ <TMPL_IF NAME="badge_w">width="<TMPL_VAR NAME="badge_w">"</TMPL_IF>
+ /> <pre class="badgeSnippet">
+ &lt;p&gt;
+ &lt;a href="<TMPL_VAR NAME="cfg_home_page" ESCAPE="HTML">check?uri=referer"&gt;&lt;img
+ src="<TMPL_VAR NAME="badge_alt_uri" ESCAPE="HTML">"
+ <TMPL_IF NAME="badge_alt">alt="<TMPL_VAR NAME="badge_alt" ESCAPE="HTML">"</TMPL_IF> <TMPL_IF NAME="badge_h">height="<TMPL_VAR NAME="badge_h">"</TMPL_IF> <TMPL_IF NAME="badge_w">width="<TMPL_VAR NAME="badge_w">"</TMPL_IF><TMPL_VAR NAME="badge_tagc">&gt;&lt;/a&gt;
+ &lt;/p&gt;
+ </pre>
+ </TMPL_IF>
+ <p>A <a href="http://www.w3.org/QA/Tools/Icons">full list</a> of icons, with links to alternate formats and colors, is available:
+ If you like, you can download a copy of the icons
+ to keep in your local web directory, and change the HTML fragment
above to reference your local image rather than the one on this server.
</p>
- <p>A <a href="http://www.w3.org/QA/Tools/Icons">full list</a> of icons, with links to alternate formats and colors, is also available.</p>
</TMPL_IF>
+<h4>Validating CSS, linking to this result</h4>
<p>
If you use <a href="http://www.w3.org/Style/CSS/">CSS</a> in your document,
you should also