Use html5 instead of xhtml for directory indexer output

This commit is contained in:
Jaex 2016-02-02 20:51:48 +02:00
parent e062be9908
commit f83c60a2cb
5 changed files with 5 additions and 25 deletions

View file

@ -42,7 +42,11 @@ public IndexerHtml(IndexerSettings indexerSettings)
public override string Index(string folderPath)
{
StringBuilder sbHtmlIndex = new StringBuilder();
sbHtmlIndex.AppendLine(Resources.doctype_xhtml);
sbHtmlIndex.AppendLine("<!DOCTYPE html>");
sbHtmlIndex.AppendLine(HtmlHelper.StartTag("html"));
sbHtmlIndex.AppendLine(HtmlHelper.StartTag("head"));
sbHtmlIndex.AppendLine("<meta charset=\"UTF-8\">");
sbHtmlIndex.AppendLine("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">");
sbHtmlIndex.AppendLine(HtmlHelper.Tag("title", "Index for " + Path.GetFileName(folderPath)));
sbHtmlIndex.AppendLine(GetCssStyle());
sbHtmlIndex.AppendLine(HtmlHelper.EndTag("head"));

View file

@ -60,19 +60,6 @@ internal Resources() {
}
}
/// <summary>
/// Looks up a localized string similar to &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;
///&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
///&lt;head&gt;
///&lt;meta http-equiv=&quot;content-type&quot; content=&quot;application/xhtml+xml; charset=utf-8&quot; /&gt;
///&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=Edge&quot; /&gt;.
/// </summary>
internal static string doctype_xhtml {
get {
return ResourceManager.GetString("doctype_xhtml", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to body {
/// font-family: Arial, Helvetica, sans-serif;

View file

@ -118,9 +118,6 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="doctype_xhtml" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\doctype_xhtml.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="IndexerDefault" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\indexerdefault.css;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>

View file

@ -1,5 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

View file

@ -97,9 +97,6 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\doctype_xhtml.txt" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\IndexerDefault.css" />
</ItemGroup>